mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-06 01:46:35 +00:00
Allow pinned tabs to be for each individual workspace
This commit is contained in:
2
l10n
2
l10n
Submodule l10n updated: a60e9734a5...c3bb1570dc
@@ -109,6 +109,7 @@ pref('zen.splitView.working', false);
|
||||
// Zen Workspaces
|
||||
pref('zen.workspaces.enabled', true);
|
||||
pref('zen.workspaces.hide-default-container-indicator', true);
|
||||
pref('zen.workspaces.individual-pinned-tabs', true);
|
||||
pref('zen.workspaces.icons', '["🌐", "📁", "📎", "📝", "📅", "📊"]');
|
||||
|
||||
// Zen Watermark
|
||||
|
Submodule src/browser/base/content/zen-components updated: 4cedd84ac8...5a9fb8d7be
@@ -73,7 +73,7 @@
|
||||
content: '';
|
||||
display: block;
|
||||
height: 1px;
|
||||
background: color-mix(in srgb, var(--zen-colors-border) 50%, transparent 50%);
|
||||
background: color-mix(in srgb, var(--zen-colors-border) 70%, transparent 30%);
|
||||
margin: 0 auto;
|
||||
margin-block-end: 4px;
|
||||
width: 80%;
|
||||
@@ -200,7 +200,8 @@
|
||||
display: none;
|
||||
}
|
||||
|
||||
& .tab-icon-image {
|
||||
& .tab-icon-image,
|
||||
& .tab-icon-pending {
|
||||
margin-inline-end: 0 !important;
|
||||
}
|
||||
}
|
||||
|
@@ -6,6 +6,7 @@
|
||||
align-items: center;
|
||||
display: flex;
|
||||
box-shadow: rgba(0, 0, 0, 0.05) 0px 1px 2px 0px;
|
||||
-moz-window-dragging: no-drag;
|
||||
}
|
||||
|
||||
#zen-workspaces-button .zen-workspace-sidebar-name {
|
||||
|
@@ -609,4 +609,9 @@ Preferences.addAll([
|
||||
type: 'bool',
|
||||
default: true,
|
||||
},
|
||||
{
|
||||
id: 'zen.workspaces.individual-pinned-tabs',
|
||||
type: 'bool',
|
||||
default: true,
|
||||
}
|
||||
]);
|
||||
|
@@ -20,11 +20,14 @@
|
||||
<checkbox id="zenWorkspacesActivate"
|
||||
data-l10n-id="zen-settings-workspaces-enabled"
|
||||
preference="zen.workspaces.enabled"/>
|
||||
<box class="indent">
|
||||
<vbox class="indent">
|
||||
<checkbox id="zenWorkspacesHideDefaultContainer"
|
||||
data-l10n-id="zen-settings-workspaces-hide-default-container-indicator"
|
||||
preference="zen.workspaces.hide-default-container-indicator"/>
|
||||
</box>
|
||||
<checkbox id="zenWorkspacesAllowPinnedTabsForDifferentWorkspaces"
|
||||
data-l10n-id="zen-settings-workspaces-allow-pinned-tabs-for-different-workspaces"
|
||||
preference="zen.workspaces.individual-pinned-tabs"/>
|
||||
</vbox>
|
||||
</groupbox>
|
||||
|
||||
</html:template>
|
||||
|
@@ -1,8 +1,24 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..a9e4da68d8de456a757158a311296792a7781e8f 100644
|
||||
index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..7774dbf9f963529570b08465d107df236fcefae7 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -2704,6 +2704,11 @@
|
||||
@@ -453,10 +453,13 @@
|
||||
},
|
||||
|
||||
get _numPinnedTabs() {
|
||||
- for (var i = 0; i < this.tabs.length; i++) {
|
||||
- if (!this.tabs[i].pinned) {
|
||||
+ let i = 0;
|
||||
+ for (let tab of this.tabs) {
|
||||
+ if (!tab.pinned) {
|
||||
break;
|
||||
}
|
||||
+ if (tab.hidden) continue;
|
||||
+ i++;
|
||||
}
|
||||
return i;
|
||||
},
|
||||
@@ -2704,6 +2707,11 @@
|
||||
);
|
||||
}
|
||||
|
||||
@@ -14,7 +30,7 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..a9e4da68d8de456a757158a311296792
|
||||
if (!UserInteraction.running("browser.tabs.opening", window)) {
|
||||
UserInteraction.start("browser.tabs.opening", "initting", window);
|
||||
}
|
||||
@@ -2771,6 +2776,9 @@
|
||||
@@ -2771,6 +2779,9 @@
|
||||
noInitialLabel,
|
||||
skipBackgroundNotify,
|
||||
});
|
||||
@@ -24,7 +40,7 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..a9e4da68d8de456a757158a311296792
|
||||
if (insertTab) {
|
||||
// insert the tab into the tab container in the correct position
|
||||
this._insertTabAtIndex(t, {
|
||||
@@ -3248,6 +3256,14 @@
|
||||
@@ -3248,6 +3259,14 @@
|
||||
) {
|
||||
tabWasReused = true;
|
||||
tab = this.selectedTab;
|
||||
@@ -39,7 +55,7 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..a9e4da68d8de456a757158a311296792
|
||||
if (!tabData.pinned) {
|
||||
this.unpinTab(tab);
|
||||
} else {
|
||||
@@ -3297,6 +3313,13 @@
|
||||
@@ -3297,6 +3316,13 @@
|
||||
preferredRemoteType,
|
||||
});
|
||||
|
||||
@@ -53,7 +69,7 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..a9e4da68d8de456a757158a311296792
|
||||
if (select) {
|
||||
tabToSelect = tab;
|
||||
}
|
||||
@@ -4184,6 +4207,7 @@
|
||||
@@ -4184,6 +4210,7 @@
|
||||
isLastTab ||
|
||||
aTab.pinned ||
|
||||
aTab.hidden ||
|
||||
@@ -61,3 +77,16 @@ index ef857bd81f2cd7c163ecc74ac1cf81a0b63ce838..a9e4da68d8de456a757158a311296792
|
||||
this._removingTabs.size >
|
||||
3 /* don't want lots of concurrent animations */ ||
|
||||
!aTab.hasAttribute(
|
||||
@@ -5117,10 +5144,10 @@
|
||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||
},
|
||||
|
||||
- hideTab(aTab, aSource) {
|
||||
+ hideTab(aTab, aSource, forZenWorkspaces = false) {
|
||||
if (
|
||||
aTab.hidden ||
|
||||
- aTab.pinned ||
|
||||
+ (aTab.pinned && !forZenWorkspaces) ||
|
||||
aTab.selected ||
|
||||
aTab.closing ||
|
||||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
||||
|
Reference in New Issue
Block a user