diff --git a/main.js b/main.js index 0143334a..c643493b 100644 --- a/main.js +++ b/main.js @@ -8337,7 +8337,20 @@ function openSettingsTab(section) { } createTab(null, { settings: true, settingsSection: slug }); } -ipcMain.handle("open-settings", (_e, section) => openSettingsTab(section)); +// The toolbar's Theseus logo toggles the Settings tab: if Settings is already +// the active tab, clicking the logo closes it (switching to the previously +// active tab, or the first remaining one). Called without a section, so a +// deep-link call like openSettingsTab("ai-engines") always opens rather than +// toggling — the toggle is intent-of-the-logo-click, not of a nav route. +function toggleSettingsTab() { + const ex = tabs.find((t) => t.settings); + if (ex && isActiveId(ex.id)) { closeTab(ex.id); return; } + openSettingsTab(); +} +ipcMain.handle("open-settings", (_e, section) => { + if (section) openSettingsTab(section); + else toggleSettingsTab(); +}); // Settings › Performance drives Shield and Cookie Pop-ups through their // add-ons' own message handlers; only the Settings tab may call this. const isSettingsSender = (e) => tabs.some((t) => t.settings && t.view?.webContents === e.sender); diff --git a/settings.html b/settings.html index 922b87fd..2ab46683 100644 --- a/settings.html +++ b/settings.html @@ -320,7 +320,6 @@ Performance Privacy System - Ariadne's Thread Aegis Extensions Sidebar @@ -632,11 +631,11 @@ - +