mirror of
https://github.com/zadam/trilium.git
synced 2025-11-13 08:45:50 +01:00
removed hideTabRowForOneTab option
This commit is contained in:
@@ -40,7 +40,6 @@ class TabRow {
|
||||
this.eventListeners = {};
|
||||
|
||||
this.el = el;
|
||||
this.hideTabRowForOneTab = false;
|
||||
|
||||
this.setupStyleEl();
|
||||
this.setupEvents();
|
||||
@@ -62,12 +61,6 @@ class TabRow {
|
||||
}
|
||||
}
|
||||
|
||||
setHideTabRowForOneTab(hideTabRowForOneTab) {
|
||||
this.hideTabRowForOneTab = hideTabRowForOneTab;
|
||||
|
||||
this.setVisibility();
|
||||
}
|
||||
|
||||
setupStyleEl() {
|
||||
this.styleEl = document.createElement('style');
|
||||
this.el.appendChild(this.styleEl);
|
||||
@@ -92,7 +85,7 @@ class TabRow {
|
||||
}
|
||||
|
||||
setVisibility() {
|
||||
this.el.style.display = (this.tabEls.length > 1 || !this.hideTabRowForOneTab) ? "block" : "none";
|
||||
this.el.style.display = "block";
|
||||
}
|
||||
|
||||
get tabEls() {
|
||||
@@ -429,6 +422,4 @@ class TabRow {
|
||||
const noteTabRowEl = document.querySelector('.note-tab-row');
|
||||
const tabRow = new TabRow(noteTabRowEl);
|
||||
|
||||
optionsService.addLoadListener(options => tabRow.setHideTabRowForOneTab(options.is('hideTabRowForOneTab')));
|
||||
|
||||
export default tabRow;
|
||||
Reference in New Issue
Block a user