1
0
Fork 1
mirror of https://github.com/zen-browser/desktop.git synced 2025-07-08 23:25:30 +02:00

Added tab unloader to the settings page (WIP)

This commit is contained in:
mauro-balades 2024-09-28 08:30:03 +02:00
parent a222e866fb
commit ffcf2a040c
7 changed files with 41 additions and 14 deletions

2
l10n

@ -1 +1 @@
Subproject commit d2850eaf59b97f806b124b723863b4e74e8dc0d9
Subproject commit b379e854c7811c918f88b63bb401d22782851122

View file

@ -631,7 +631,7 @@
align-items: center;
#nav-bar:has(&) & {
padding-inline-start: calc(var(--zen-toolbox-padding) + var(--toolbarbutton-outer-padding));
padding-inline-start: var(--toolbarbutton-outer-padding);
}
#browser:has(#navigator-toolbox[zen-right-side='true']) & {

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/preferences/preferences.js b/browser/components/preferences/preferences.js
index 7e21bab426b6eb52fe84876d817fddbdb1a35ffc..56b42e2d025e4a47ea0983cf33ae69ffafa0d576 100644
index 7e21bab426b6eb52fe84876d817fddbdb1a35ffc..39637cc8aea988c77e5a6c66a85ec66acd4ca4bc 100644
--- a/browser/components/preferences/preferences.js
+++ b/browser/components/preferences/preferences.js
@@ -196,6 +196,10 @@ function init_all() {
@ -7,7 +7,7 @@ index 7e21bab426b6eb52fe84876d817fddbdb1a35ffc..56b42e2d025e4a47ea0983cf33ae69ff
Preferences.queueUpdateOfAllElements();
Services.telemetry.setEventRecordingEnabled("aboutpreferences", true);
+ register_module("paneZenLooks", gZenLooksAndFeel);
+ register_module("paneZenWorkspaces", gZenWorkspacesSettings);
+ register_module("paneZenTabManagement", gZenWorkspacesSettings);
+ register_module("paneZenCKS", gZenCKSSettings);
+ register_module("paneZenMarketplace", gZenMarketplaceManager);

View file

@ -1,5 +1,5 @@
diff --git a/browser/components/preferences/preferences.xhtml b/browser/components/preferences/preferences.xhtml
index 3affb19d1a243da4a5782c9a4a5588d165b4119f..837f078ff1f3a65a40877c1380c6d050a8415bab 100644
index 53bdc9c912a6cd0c787dbcf41f2a82b7169d5aa7..e47c4b36b6e469b0cc8b95bde0508dc6cb0b49ae 100644
--- a/browser/components/preferences/preferences.xhtml
+++ b/browser/components/preferences/preferences.xhtml
@@ -43,6 +43,8 @@
@ -39,15 +39,15 @@ index 3affb19d1a243da4a5782c9a4a5588d165b4119f..837f078ff1f3a65a40877c1380c6d050
+ <label class="category-name" flex="1" data-l10n-id="pane-zen-looks-title"></label>
+ </richlistitem>
+
+ <richlistitem id="category-zen-workspaces"
+ <richlistitem id="category-zen-tabs-management"
+ class="category"
+ value="paneZenWorkspaces"
+ value="paneZenTabManagement"
+ helpTopic="prefs-main"
+ data-l10n-id="category-zen-workspaces"
+ data-l10n-attrs="tooltiptext"
+ align="center">
+ <image class="category-icon"/>
+ <label class="category-name" flex="1" data-l10n-id="pane-zen-workspaces-title"></label>
+ <label class="category-name" flex="1" data-l10n-id="pane-zen-tabs-title"></label>
+ </richlistitem>
+
+ <richlistitem id="category-zen-CKS"
@ -95,7 +95,7 @@ index 3affb19d1a243da4a5782c9a4a5588d165b4119f..837f078ff1f3a65a40877c1380c6d050
#include moreFromMozilla.inc.xhtml
+#include zenLooksAndFeel.inc.xhtml
+#include zenKeyboardShortcuts.inc.xhtml
+#include zenWorkspaces.inc.xhtml
+#include zenTabsManagement.inc.xhtml
+#include zenMarketplace.inc.xhtml
</vbox>
</vbox>

View file

@ -940,4 +940,9 @@ Preferences.addAll([
type: 'bool',
default: true,
},
{
id: 'zen.tab-unloader.enabled',
type: 'bool',
default: true,
},
]);

View file

@ -1,19 +1,19 @@
<html:template id="template-paneZenWorkspaces">
<html:template id="template-paneZenTabManagement">
<hbox id="ZenWorkspacesCategory"
class="subcategory"
hidden="true"
data-category="paneZenWorkspaces">
data-category="paneZenTabManagement">
<html:h1 data-l10n-id="pane-workspaces-title"/>
</hbox>
<hbox id="zenSidePanelsCategory"
class="subcategory"
hidden="true"
data-category="paneZenWorkspaces">
data-category="paneZenTabManagement">
<html:h1 data-l10n-id="pane-settings-workspaces-title"/>
</hbox>
<groupbox id="zenSidePanelsGroup" data-category="paneZenWorkspaces" hidden="true" class="highlighting-group">
<groupbox id="zenWorkspacesGroup" data-category="paneZenTabManagement" hidden="true" class="highlighting-group">
<label><html:h2 data-l10n-id="zen-settings-workspaces-header"/></label>
<description class="description-deemphasized" data-l10n-id="zen-settings-workspaces-description" />
@ -33,4 +33,26 @@
</vbox>
</groupbox>
<hbox id="zenTabsUnloadCategory"
class="subcategory"
hidden="true"
data-category="paneZenTabManagement">
<html:h1 data-l10n-id="pane-zen-tabs-unloader-title"/>
</hbox>
<groupbox id="zenTabsUnloadGroup" data-category="paneZenTabManagement" hidden="true" class="highlighting-group">
<label><html:h2 data-l10n-id="zen-tabs-unloader-header"/></label>
<description class="description-deemphasized" data-l10n-id="zen-tabs-unloader-description" />
<checkbox id="zenTabsUnloadActivate"
data-l10n-id="zen-tabs-unloader-enabled"
preference="zen.tab-unloader.enabled"/>
<label><html:h2 data-l10n-id="zen-tabs-unloader-unload-delay"/></label>
<description class="description-deemphasized" data-l10n-id="zen-tabs-unloader-unload-delay-description" />
<!-- TODO: Input type should be number -->
</groupbox>
</html:template>

View file

@ -305,7 +305,7 @@ groupbox h2 {
/* Workspace */
#category-zen-workspaces > .category-icon {
#category-zen-tabs-management > .category-icon {
list-style-image: url('chrome://browser/skin/window.svg');
}