mirror of
https://github.com/zen-browser/components.git
synced 2025-07-08 15:09:59 +02:00
refactor: Update splitViews module and split-views configuration
This commit is contained in:
parent
0b1af942fe
commit
dcc7aafbe9
3 changed files with 4 additions and 2 deletions
2
@types/split-views.d.ts
vendored
2
@types/split-views.d.ts
vendored
|
@ -2,7 +2,7 @@
|
||||||
declare type SplitType = 'horizontal' | 'vertical' | 'grid';
|
declare type SplitType = 'horizontal' | 'vertical' | 'grid';
|
||||||
|
|
||||||
declare interface SplitViewConfig extends Config {
|
declare interface SplitViewConfig extends Config {
|
||||||
keyIndicator: string; // e.g. "split-tab='true'"
|
splitIndicator: string; // e.g. "split-tab='true'"
|
||||||
defaultSplitView: SplitType;
|
defaultSplitView: SplitType;
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -7,7 +7,7 @@ Some components used by @zen-browser and @Floorp-Projects as an attempt to make
|
||||||
import("chrome://../browser-splitView.mjs").then(
|
import("chrome://../browser-splitView.mjs").then(
|
||||||
({ SplitViews }) => {
|
({ SplitViews }) => {
|
||||||
window.gSplitView = new SplitViews({
|
window.gSplitView = new SplitViews({
|
||||||
keyIndicator: "zen-splitted",
|
splitIndicator: "zen-splitted",
|
||||||
browserName: "zen",
|
browserName: "zen",
|
||||||
defaultSplitView: "grid",
|
defaultSplitView: "grid",
|
||||||
});
|
});
|
||||||
|
|
|
@ -13,6 +13,8 @@ class SplitViewsBase {
|
||||||
this.data = [];
|
this.data = [];
|
||||||
this.currentView = -1;
|
this.currentView = -1;
|
||||||
this.addEventListeners();
|
this.addEventListeners();
|
||||||
|
// Added to "navigator-toolbox" element
|
||||||
|
this.parentSplitIndicator = this.config.splitIndicator + '-view';
|
||||||
this.log('SplitViewsBase initialized');
|
this.log('SplitViewsBase initialized');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue