mirror of
https://github.com/zadam/trilium.git
synced 2025-11-08 06:15:48 +01:00
tab bar is automatically hidden for only one tab
This commit is contained in:
@@ -69,6 +69,7 @@
|
||||
this.setupEvents()
|
||||
this.layoutTabs()
|
||||
this.setupDraggabilly()
|
||||
this.setVisibility()
|
||||
}
|
||||
|
||||
emit(eventName, data) {
|
||||
@@ -93,6 +94,10 @@
|
||||
this.tabEls.forEach((tabEl) => this.setTabCloseEventListener(tabEl))
|
||||
}
|
||||
|
||||
setVisibility() {
|
||||
this.el.style.display = this.tabEls.length > 1 ? "block" : "none";
|
||||
}
|
||||
|
||||
get tabEls() {
|
||||
return Array.prototype.slice.call(this.el.querySelectorAll('.chrome-tab'))
|
||||
}
|
||||
@@ -191,6 +196,7 @@
|
||||
|
||||
tabProperties = Object.assign({}, defaultTapProperties, tabProperties)
|
||||
this.tabContentEl.appendChild(tabEl)
|
||||
this.setVisibility()
|
||||
this.setTabCloseEventListener(tabEl)
|
||||
this.updateTab(tabEl, tabProperties)
|
||||
this.emit('tabAdd', { tabEl })
|
||||
@@ -275,6 +281,7 @@
|
||||
this.cleanUpPreviouslyDraggedTabs()
|
||||
this.layoutTabs()
|
||||
this.setupDraggabilly()
|
||||
this.setVisibility()
|
||||
}
|
||||
|
||||
removeAllTabsExceptForThis(remainingTabEl) {
|
||||
|
||||
Reference in New Issue
Block a user