Build your personal knowledge base with Trilium Notes
TypeScript electronelectron-appknowledge-baseknowledge-graphknowledge-managementknowledge-management-graphlocal-firstnote-managmentnote-takernote-takingnotebooknotesnotes-apppersonal-knowledge-basepersonal-wikiscriptableself-hostedself-hostingwiki
removed hideTabRowForOneTab option
zadam6986c201dd2c
diff --git a/src/public/javascripts/dialogs/options/appearance.js b/src/public/javascripts/dialogs/options/appearance.jsindex 0708877bc7..e7504c8c26 100644--- a/src/public/javascripts/dialogs/options/appearance.js+++ b/src/public/javascripts/dialogs/options/appearance.js@@ -9,24 +9,16 @@ const TPL = `<form><div class="form-group row">- <div class="col-4">+ <div class="col-6"><label for="theme-select">Theme</label><select class="form-control" id="theme-select"></select></div>- <div class="col-4">+ <div class="col-6"><label for="zoom-factor-select">Zoom factor (desktop build only)</label><input type="number" class="form-control" id="zoom-factor-select" min="0.3" max="2.0" step="0.1"/></div>-- <div class="col-4">- <label for="one-tab-display-select">If there's only one tab, then...</label>- <select class="form-control" id="one-tab-display-select">- <option value="show">show the tab bar</option>- <option value="hide">hide the tab bar</option>- </select>- </div></div><p>Zooming can be controlled with CTRL-+ and CTRL-= shortcuts as well.</p>@@ -108,7 +100,6 @@ export default class ApperanceOptions {this.$themeSelect = $("#theme-select");this.$zoomFactorSelect = $("#zoom-factor-select");- this.$oneTabDisplaySelect = $("#one-tab-display-select");this.$leftPaneMinWidth = $("#left-pane-min-width");this.$leftPaneWidthPercent = $("#left-pane-width-percent");this.$mainFontSize = $("#main-font-size");@@ -141,13 +132,6 @@ export default class ApperanceOptions {this.$zoomFactorSelect.on('change', () => { zoomService.setZoomFactorAndSave(this.$zoomFactorSelect.val()); });- this.$oneTabDisplaySelect.on('change', () => {- const hideTabRowForOneTab = this.$oneTabDisplaySelect.val() === 'hide' ? 'true' : 'false';-- server.put('options/hideTabRowForOneTab/' + hideTabRowForOneTab)- .then(optionsService.reloadOptions);- });-this.$leftPaneMinWidth.on('change', async () => {await server.put('options/leftPaneMinWidth/' + this.$leftPaneMinWidth.val());@@ -204,8 +188,6 @@ export default class ApperanceOptions {this.$zoomFactorSelect.prop('disabled', true);}- this.$oneTabDisplaySelect.val(options.hideTabRowForOneTab === 'true' ? 'hide' : 'show');-this.$leftPaneMinWidth.val(options.leftPaneMinWidth);this.$leftPaneWidthPercent.val(options.leftPaneWidthPercent);diff --git a/src/public/javascripts/services/tab_row.js b/src/public/javascripts/services/tab_row.jsindex 41029e2db7..dde1d73066 100644--- a/src/public/javascripts/services/tab_row.js+++ b/src/public/javascripts/services/tab_row.js@@ -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;\ No newline at end of filediff --git a/src/routes/api/options.js b/src/routes/api/options.jsindex 384b5f3760..06e4b1a067 100644--- a/src/routes/api/options.js+++ b/src/routes/api/options.js@@ -23,7 +23,6 @@ const ALLOWED_OPTIONS = new Set(['treeFontSize','detailFontSize','openTabs',- 'hideTabRowForOneTab','noteInfoWidget','attributesWidget','linkMapWidget',diff --git a/src/services/options_init.js b/src/services/options_init.jsindex d4a5057e4f..1afc7659ba 100644--- a/src/services/options_init.js+++ b/src/services/options_init.js@@ -79,7 +79,6 @@ const defaultOptions = [{ name: 'similarNotesWidget', value: '{"enabled":true,"expanded":true,"position":600}', isSynced: false },{ name: 'spellCheckEnabled', value: 'true', isSynced: false },{ name: 'spellCheckLanguageCode', value: 'en-US', isSynced: false },- { name: 'hideTabRowForOneTab', value: 'false', isSynced: false },{ name: 'imageMaxWidthHeight', value: '1200', isSynced: true },{ name: 'imageJpegQuality', value: '75', isSynced: true },{ name: 'autoFixConsistencyIssues', value: 'true', isSynced: false },