mirror of
https://github.com/zen-browser/desktop.git
synced 2025-07-10 00:55:30 +02:00
feat(zen-pinned-tab-manager): Add pinned tab management functionality
This commit introduces a new feature: pinned tab management. It allows users to pin tabs and define whether to reset pinned tabs on close. - Adds a new `ZenPinnedTabManager` component to manage pinned tabs. - Updates `zen-assets.inc.xhtml` and `zen-assets.jar.inc.mn` to include the new component. - Modifies the `ZenStartup.mjs` file to initialize the new manager. - Introduces a new preference `zen.pinned-tab-manager.reset-pinned-tab-on-close-shortcut` to control the behavior of pinned tabs on close. - Updates the settings UI to reflect the new pinned tab management functionality. - Refactors related preferences from `zen.tab-unloader.*` to `zen.pinned-tab-manager.*`. This feature enhances Zen's tab management capabilities by providing users with more control over their pinned tabs.
This commit is contained in:
parent
43834e57f0
commit
6dcff571d2
6 changed files with 22 additions and 5 deletions
|
@ -111,7 +111,8 @@ pref('zen.themes.updated-value-observer', false);
|
|||
pref('zen.tab-unloader.enabled', true);
|
||||
pref('zen.tab-unloader.timeout-minutes', 20);
|
||||
pref('zen.tab-unloader.excluded-urls', "example.com,example.org");
|
||||
pref('zen.tab-unloader.reset-pinned-tab-on-close-shortcut', true);
|
||||
|
||||
pref('zen.pinned-tab-manager.reset-pinned-tab-on-close-shortcut', true);
|
||||
|
||||
// Pref to enable the new profiles (TODO: Check this out!)
|
||||
//pref("browser.profiles.enabled", true);
|
||||
|
|
|
@ -39,6 +39,7 @@
|
|||
gZenUIManager.init();
|
||||
gZenVerticalTabsManager.init();
|
||||
gZenCompactModeManager.init();
|
||||
gZenPinnedTabManager.init();
|
||||
|
||||
function throttle(f, delay) {
|
||||
let timer = 0;
|
||||
|
|
|
@ -31,6 +31,7 @@
|
|||
<script src="chrome://browser/content/ZenUIManager.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenSidebarManager.mjs"/>
|
||||
<script src="chrome://browser/content/zen-components/ZenTabUnloader.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenPinnedTabManager.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenWorkspaces.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs" />
|
||||
<script src="chrome://browser/content/zen-components/ZenWorkspacesSync.mjs" />
|
||||
|
|
|
@ -16,6 +16,7 @@
|
|||
content/browser/zen-components/ZenThemeBuilder.mjs (content/zen-components/src/ZenThemeBuilder.mjs)
|
||||
content/browser/zen-components/ZenThemesImporter.mjs (content/zen-components/src/ZenThemesImporter.mjs)
|
||||
content/browser/zen-components/ZenTabUnloader.mjs (content/zen-components/src/ZenTabUnloader.mjs)
|
||||
content/browser/zen-components/ZenPinnedTabManager.mjs (content/zen-components/src/ZenPinnedTabManager.mjs)
|
||||
content/browser/zen-components/ZenCommonUtils.mjs (content/zen-components/src/ZenCommonUtils.mjs)
|
||||
content/browser/zen-components/ZenGradientGenerator.mjs (content/zen-components/src/ZenGradientGenerator.mjs)
|
||||
|
||||
|
|
|
@ -1021,7 +1021,7 @@ Preferences.addAll([
|
|||
default: false,
|
||||
},
|
||||
{
|
||||
id: 'zen.tab-unloader.reset-pinned-tab-on-close-shortcut',
|
||||
id: 'zen.pinned-tab-manager.reset-pinned-tab-on-close-shortcut',
|
||||
type: 'bool',
|
||||
default: true,
|
||||
},
|
||||
|
|
|
@ -48,9 +48,6 @@
|
|||
data-l10n-id="zen-tabs-unloader-enabled"
|
||||
preference="zen.tab-unloader.enabled"/>
|
||||
|
||||
<checkbox id="zenPinnedTabResetOnCloseShortcutEnable"
|
||||
data-l10n-id="zen-tabs-pinned-reset-close-shortcut-enabled"
|
||||
preference="zen.tab-unloader.reset-pinned-tab-on-close-shortcut"/>
|
||||
|
||||
<label><html:h2 data-l10n-id="zen-tabs-unloader-unload-delay"/></label>
|
||||
<hbox id="zenTabsUnloadDelayContainer">
|
||||
|
@ -63,6 +60,22 @@
|
|||
</hbox>
|
||||
</groupbox>
|
||||
|
||||
<hbox id="zenPinnedTabsManagerCategory"
|
||||
class="subcategory"
|
||||
hidden="true"
|
||||
data-category="paneZenTabManagement">
|
||||
<html:h1 data-l10n-id="pane-zen-pinned-tab-manager-title"/>
|
||||
</hbox>
|
||||
|
||||
<groupbox id="zenPinnedTabsManagerGroup" data-category="paneZenTabManagement" hidden="true" class="highlighting-group">
|
||||
<label><html:h2 data-l10n-id="zen-pinned-tab-manager-header"/></label>
|
||||
<description class="description-deemphasized" data-l10n-id="zen-pinned-tab-manager-description" />
|
||||
|
||||
<checkbox id="zenPinnedTabResetOnCloseShortcutEnable"
|
||||
data-l10n-id="zen-pinned-tab-manager-reset-close-shortcut-enabled"
|
||||
preference="zen.pinned-tab-manager.reset-pinned-tab-on-close-shortcut"/>
|
||||
</groupbox>
|
||||
|
||||
</html:template>
|
||||
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue