mirror of
https://github.com/zadam/trilium.git
synced 2025-11-09 06:45:49 +01:00
split window WIP
This commit is contained in:
@@ -427,12 +427,16 @@ export default class TabRowWidget extends BasicWidget {
|
||||
}
|
||||
|
||||
activeTabChangedEvent() {
|
||||
const activeTabContext = appContext.tabManager.getActiveTabContext();
|
||||
let activeTabContext = appContext.tabManager.getActiveTabContext();
|
||||
|
||||
if (!activeTabContext) {
|
||||
return;
|
||||
}
|
||||
|
||||
if (activeTabContext.parentTabId) {
|
||||
activeTabContext = appContext.tabManager.getTabContextById(activeTabContext.parentTabId);
|
||||
}
|
||||
|
||||
const tabEl = this.getTabById(activeTabContext.tabId)[0];
|
||||
const activeTabEl = this.activeTabEl;
|
||||
if (activeTabEl === tabEl) return;
|
||||
@@ -441,7 +445,9 @@ export default class TabRowWidget extends BasicWidget {
|
||||
}
|
||||
|
||||
newTabOpenedEvent({tabContext}) {
|
||||
this.addTab(tabContext.tabId);
|
||||
if (!tabContext.parentId) {
|
||||
this.addTab(tabContext.tabId);
|
||||
}
|
||||
}
|
||||
|
||||
removeTab(tabId) {
|
||||
@@ -606,11 +612,11 @@ export default class TabRowWidget extends BasicWidget {
|
||||
tabNoteSwitchedAndActivatedEvent({tabContext}) {
|
||||
this.activeTabChangedEvent();
|
||||
|
||||
this.updateTabById(tabContext.tabId);
|
||||
this.updateTabById(tabContext.parentTabId || tabContext.tabId);
|
||||
}
|
||||
|
||||
tabNoteSwitchedEvent({tabContext}) {
|
||||
this.updateTabById(tabContext.tabId);
|
||||
this.updateTabById(tabContext.parentTabId || tabContext.tabId);
|
||||
}
|
||||
|
||||
updateTabById(tabId) {
|
||||
|
||||
Reference in New Issue
Block a user