mirror of
https://github.com/zen-browser/desktop.git
synced 2026-08-26 16:31:30 +00:00
feat: Stop using pinned manager and use zen session sidebar, b=no-bug, c=common, folders, tabs, workspaces
This commit is contained in:
@@ -48,7 +48,6 @@
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenFolders.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenMods.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenCompactMode.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenPinnedTabsStorage.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenWorkspacesStorage.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenPinnedTabManager.mjs"></script>
|
||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenGradientGenerator.mjs"></script>
|
||||
|
||||
@@ -51,7 +51,6 @@
|
||||
|
||||
content/browser/zen-components/ZenKeyboardShortcuts.mjs (../../zen/kbs/ZenKeyboardShortcuts.mjs)
|
||||
|
||||
content/browser/zen-components/ZenPinnedTabsStorage.mjs (../../zen/tabs/ZenPinnedTabsStorage.mjs)
|
||||
content/browser/zen-components/ZenPinnedTabManager.mjs (../../zen/tabs/ZenPinnedTabManager.mjs)
|
||||
* content/browser/zen-styles/zen-tabs.css (../../zen/tabs/zen-tabs.css)
|
||||
content/browser/zen-styles/zen-tabs/vertical-tabs.css (../../zen/tabs/zen-tabs/vertical-tabs.css)
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
index eb62ff3e733e43fdaa299babddea3ba0125abb06..09567fe1be2af56429b60cbcbb36aa477fa68794 100644
|
||||
index eb62ff3e733e43fdaa299babddea3ba0125abb06..1ca2e7327e72824805a93c18cb7e3dfd499c66d7 100644
|
||||
--- a/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
@@ -126,6 +126,8 @@ const TAB_EVENTS = [
|
||||
@@ -33,7 +33,7 @@ index eb62ff3e733e43fdaa299babddea3ba0125abb06..09567fe1be2af56429b60cbcbb36aa47
|
||||
let isRegularWindow =
|
||||
!isPrivateWindow && !isTaskbarTab && aWindow.toolbar.visible;
|
||||
+ if (!aInitialState && isRegularWindow) {
|
||||
+ aInitialState = ZenSessionStore.getNewWindowData(this._windows);
|
||||
+ aInitialState = lazy.ZenSessionStore.getNewWindowData(this._windows);
|
||||
+ this.restoreWindows(aWindow, aInitialState, {});
|
||||
+ }
|
||||
|
||||
@@ -171,8 +171,8 @@ index eb62ff3e733e43fdaa299babddea3ba0125abb06..09567fe1be2af56429b60cbcbb36aa47
|
||||
+ if (tabData.zenHasStaticLabel) {
|
||||
+ tab.setAttribute("zen-has-static-label", "true");
|
||||
+ }
|
||||
+ if (tabData.zenPinnedId) {
|
||||
+ tab.setAttribute("zen-pin-id", tabData.zenPinnedId);
|
||||
+ if (tabData.zenSyncId) {
|
||||
+ tab.setAttribute("zen-sync-id", tabData.zenSyncId);
|
||||
+ }
|
||||
+ if (tabData.zenDefaultUserContextId) {
|
||||
+ tab.setAttribute("zenDefaultUserContextId", true);
|
||||
|
||||
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/sessionstore/TabState.sys.mjs b/browser/components/sessionstore/TabState.sys.mjs
|
||||
index 82721356d191055bec0d4b0ca49e481221988801..1ea5c394c704da295149443d7794961a12f2060b 100644
|
||||
index 82721356d191055bec0d4b0ca49e481221988801..d1323fe17c995611ebdfe2869b0ccd2d45bcfa11 100644
|
||||
--- a/browser/components/sessionstore/TabState.sys.mjs
|
||||
+++ b/browser/components/sessionstore/TabState.sys.mjs
|
||||
@@ -85,7 +85,22 @@ class _TabState {
|
||||
@@ -7,7 +7,7 @@ index 82721356d191055bec0d4b0ca49e481221988801..1ea5c394c704da295149443d7794961a
|
||||
}
|
||||
|
||||
+ tabData.zenWorkspace = tab.getAttribute("zen-workspace-id");
|
||||
+ tabData.zenPinnedId = tab.getAttribute("zen-pin-id");
|
||||
+ tabData.zenSyncId = tab.getAttribute("zen-sync-id");
|
||||
+ tabData.zenEssential = tab.getAttribute("zen-essential");
|
||||
+ tabData.pinned = tabData.pinned || tabData.zenEssential;
|
||||
+ tabData.zenDefaultUserContextId = tab.getAttribute("zenDefaultUserContextId");
|
||||
|
||||
@@ -121,14 +121,6 @@ index 425aaf8c8e4adf1507eb0d8ded671f8295544b04..12988986c4cf00990c1d1b2e4be362ef
|
||||
on_click(event) {
|
||||
if (event.button != 0) {
|
||||
return;
|
||||
@@ -570,6 +592,7 @@
|
||||
)
|
||||
);
|
||||
} else {
|
||||
+ gZenPinnedTabManager._removePinnedAttributes(this, true);
|
||||
gBrowser.removeTab(this, {
|
||||
animate: true,
|
||||
triggeringEvent: event,
|
||||
@@ -582,6 +605,14 @@
|
||||
// (see tabbrowser-tabs 'click' handler).
|
||||
gBrowser.tabContainer._blockDblClick = true;
|
||||
|
||||
@@ -477,16 +477,6 @@ index c099e8646b9341a3ff55bf394037c8fc2769969b..0d524a0519bbbdf304a594d1fb56c394
|
||||
|
||||
TabBarVisibility.update();
|
||||
}
|
||||
@@ -4553,6 +4680,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
+ for (let tab of selectedTabs) {
|
||||
+ gZenPinnedTabManager._removePinnedAttributes(tab, true);
|
||||
+ }
|
||||
this.removeTabs(selectedTabs, { isUserTriggered, telemetrySource });
|
||||
}
|
||||
|
||||
@@ -4814,6 +4944,7 @@
|
||||
telemetrySource,
|
||||
} = {}
|
||||
@@ -838,11 +828,3 @@ index c099e8646b9341a3ff55bf394037c8fc2769969b..0d524a0519bbbdf304a594d1fb56c394
|
||||
// Build Ask Chat items
|
||||
TabContextMenu.GenAI.buildTabMenu(
|
||||
document.getElementById("context_askChat"),
|
||||
@@ -9763,6 +9944,7 @@ var TabContextMenu = {
|
||||
)
|
||||
);
|
||||
} else {
|
||||
+ gZenPinnedTabManager._removePinnedAttributes(this.contextTab, true);
|
||||
gBrowser.removeTab(this.contextTab, {
|
||||
animate: true,
|
||||
...gBrowser.TabMetrics.userTriggeredContext(
|
||||
|
||||
Reference in New Issue
Block a user