refactor: Update splitViews module and split-views configuration

This commit is contained in:
Mauro Balades 2024-08-06 11:16:53 +02:00
parent 0b1af942fe
commit dcc7aafbe9
3 changed files with 4 additions and 2 deletions

View file

@ -2,7 +2,7 @@
declare type SplitType = 'horizontal' | 'vertical' | 'grid';
declare interface SplitViewConfig extends Config {
keyIndicator: string; // e.g. "split-tab='true'"
splitIndicator: string; // e.g. "split-tab='true'"
defaultSplitView: SplitType;
};

View file

@ -7,7 +7,7 @@ Some components used by @zen-browser and @Floorp-Projects as an attempt to make
import("chrome://../browser-splitView.mjs").then(
({ SplitViews }) => {
window.gSplitView = new SplitViews({
keyIndicator: "zen-splitted",
splitIndicator: "zen-splitted",
browserName: "zen",
defaultSplitView: "grid",
});

View file

@ -13,6 +13,8 @@ class SplitViewsBase {
this.data = [];
this.currentView = -1;
this.addEventListeners();
// Added to "navigator-toolbox" element
this.parentSplitIndicator = this.config.splitIndicator + '-view';
this.log('SplitViewsBase initialized');
}