mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-06 11:28:28 +00:00
Compare commits
17 Commits
window-syn
...
stable
Author | SHA1 | Date | |
---|---|---|---|
![]() |
798c5f8d85 | ||
![]() |
aefe74e934 | ||
![]() |
4f27b2c167 | ||
![]() |
213151ed9d | ||
![]() |
93637f5fec | ||
![]() |
e233be5c78 | ||
![]() |
137bd469dc | ||
![]() |
62c55a9de1 | ||
![]() |
07c90bc9b8 | ||
![]() |
cc3f0de843 | ||
![]() |
e533f722ff | ||
![]() |
cdbd68254f | ||
![]() |
eb94927370 | ||
![]() |
0ba3eb8908 | ||
![]() |
fe87e22b63 | ||
![]() |
f0e360d2fd | ||
![]() |
e0a750e253 |
4
.github/workflows/build.yml
vendored
4
.github/workflows/build.yml
vendored
@@ -734,8 +734,8 @@ jobs:
|
|||||||
GIT_CURL_VERBOSE: 1
|
GIT_CURL_VERBOSE: 1
|
||||||
with:
|
with:
|
||||||
token: ${{ secrets.DEPLOY_KEY }}
|
token: ${{ secrets.DEPLOY_KEY }}
|
||||||
commit-message: 🚀 Update to version ${{ needs.build-data.outputs.version }}
|
commit-message: Update to version `${{ needs.build-data.outputs.version }}`
|
||||||
title: 🚀 Update to version ${{ needs.build-data.outputs.version }}
|
title: Update to version `${{ needs.build-data.outputs.version }}`
|
||||||
body: |
|
body: |
|
||||||
This PR updates the Zen Browser Flatpak package to version ${{ needs.build-data.outputs.version }}.
|
This PR updates the Zen Browser Flatpak package to version ${{ needs.build-data.outputs.version }}.
|
||||||
|
|
||||||
|
@@ -1 +0,0 @@
|
|||||||
https://zen-browser.app/funding.json
|
|
@@ -11,6 +11,7 @@ add-extensions:
|
|||||||
add-ld-path: .
|
add-ld-path: .
|
||||||
command: launch-script.sh
|
command: launch-script.sh
|
||||||
finish-args:
|
finish-args:
|
||||||
|
- --allow=devel
|
||||||
- --share=ipc
|
- --share=ipc
|
||||||
- --share=network
|
- --share=network
|
||||||
- --socket=pulseaudio
|
- --socket=pulseaudio
|
||||||
@@ -19,16 +20,29 @@ finish-args:
|
|||||||
- --socket=pcsc
|
- --socket=pcsc
|
||||||
- --socket=cups
|
- --socket=cups
|
||||||
- --persist=.zen
|
- --persist=.zen
|
||||||
|
- --env=DICPATH=/usr/share/hunspell
|
||||||
- --filesystem=xdg-download:rw
|
- --filesystem=xdg-download:rw
|
||||||
|
- --filesystem=/run/.heim_org.h5l.kcm-socket
|
||||||
|
- --filesystem=xdg-run/speech-dispatcher:ro
|
||||||
- --device=all
|
- --device=all
|
||||||
- --talk-name=org.freedesktop.FileManager1
|
- --talk-name=org.freedesktop.FileManager1
|
||||||
- --talk-name=org.freedesktop.ScreenSaver
|
|
||||||
- --own-name=org.mozilla.zen.*
|
|
||||||
- --own-name=org.mpris.MediaPlayer2.firefox.*
|
|
||||||
- --system-talk-name=org.freedesktop.NetworkManager
|
- --system-talk-name=org.freedesktop.NetworkManager
|
||||||
- --talk-name=org.a11y.Bus
|
- --talk-name=org.a11y.Bus
|
||||||
- --env=GTK_PATH=/app/lib/gtkmodules
|
- --talk-name=org.gtk.vfs.*
|
||||||
- --env=MESA_SHADER_CACHE_DIR=/var/cache/mesa_shader_cache_db
|
- --own-name=org.mpris.MediaPlayer2.firefox.*
|
||||||
|
- --own-name=org.mozilla.zen.*
|
||||||
|
cleanup:
|
||||||
|
- /include
|
||||||
|
- /lib/pkgconfig
|
||||||
|
- /share/pkgconfig
|
||||||
|
- /share/aclocal
|
||||||
|
- /share/gtk-doc
|
||||||
|
- /share/doc
|
||||||
|
- /share/info
|
||||||
|
- /man
|
||||||
|
- /share/man
|
||||||
|
- '*.la'
|
||||||
|
- '*.a'
|
||||||
modules:
|
modules:
|
||||||
- name: zen_browser
|
- name: zen_browser
|
||||||
buildsystem: simple
|
buildsystem: simple
|
||||||
|
@@ -15,7 +15,7 @@ zen-folders-panel-change-folder-space =
|
|||||||
zen-folders-panel-change-icon-folder =
|
zen-folders-panel-change-icon-folder =
|
||||||
.label = Alterar Ícone
|
.label = Alterar Ícone
|
||||||
zen-folders-unload-all-tooltip =
|
zen-folders-unload-all-tooltip =
|
||||||
.tooltiptext = Unload active in this folder
|
.tooltiptext = Descarregar ativos nesta pasta
|
||||||
zen-folders-unload-folder =
|
zen-folders-unload-folder =
|
||||||
.label = Unload All Tabs
|
.label = Descarregar Todos os Separadores
|
||||||
zen-folders-search-no-results = Não existem separadores que correspondam a essa pesquisa 🤔
|
zen-folders-search-no-results = Não existem separadores que correspondam a essa pesquisa 🤔
|
||||||
|
@@ -36,6 +36,6 @@
|
|||||||
value: false
|
value: false
|
||||||
|
|
||||||
# Do not edit manually
|
# Do not edit manually
|
||||||
- name: zen.view.compact.should-enable-at-startup
|
- name: zen.view.compact.enable-at-startup
|
||||||
hidden: true
|
hidden: true
|
||||||
value: false
|
value: false
|
||||||
|
@@ -4,6 +4,3 @@
|
|||||||
|
|
||||||
- name: xpinstall.signatures.required
|
- name: xpinstall.signatures.required
|
||||||
value: true
|
value: true
|
||||||
|
|
||||||
- name: extensions.pocket.enabled
|
|
||||||
value: false
|
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml
|
diff --git a/browser/base/content/browser.xhtml b/browser/base/content/browser.xhtml
|
||||||
index 665b048cf149b9a6d0ccc43f8d9199f077b8ada2..d031a99ae5c9c6e69cfd831c7d271d8a8d097dc8 100644
|
index 665b048cf149b9a6d0ccc43f8d9199f077b8ada2..fcff5cc6a4a50ff2d76930e4d2a1e1d0b2e6bc02 100644
|
||||||
--- a/browser/base/content/browser.xhtml
|
--- a/browser/base/content/browser.xhtml
|
||||||
+++ b/browser/base/content/browser.xhtml
|
+++ b/browser/base/content/browser.xhtml
|
||||||
@@ -26,6 +26,7 @@
|
@@ -26,6 +26,7 @@
|
||||||
@@ -25,7 +25,7 @@ index 665b048cf149b9a6d0ccc43f8d9199f077b8ada2..d031a99ae5c9c6e69cfd831c7d271d8a
|
|||||||
</vbox>
|
</vbox>
|
||||||
</html:template>
|
</html:template>
|
||||||
|
|
||||||
+<hbox id="zen-main-app-wrapper" flex="1" persist="zen-compact-mode" class="browser-toolbox-background">
|
+<hbox id="zen-main-app-wrapper" flex="1" class="browser-toolbox-background">
|
||||||
#include navigator-toolbox.inc.xhtml
|
#include navigator-toolbox.inc.xhtml
|
||||||
|
|
||||||
#include browser-box.inc.xhtml
|
#include browser-box.inc.xhtml
|
||||||
|
@@ -58,4 +58,3 @@
|
|||||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenDownloadAnimation.mjs"></script>
|
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenDownloadAnimation.mjs"></script>
|
||||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenEmojiPicker.mjs"></script>
|
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenEmojiPicker.mjs"></script>
|
||||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenWorkspaceCreation.mjs"></script>
|
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenWorkspaceCreation.mjs"></script>
|
||||||
<script type="text/javascript" src="chrome://browser/content/zen-components/ZenWindowSyncing.mjs"></script>
|
|
||||||
|
@@ -44,7 +44,6 @@
|
|||||||
content/browser/zen-components/ZenWorkspaceIcons.mjs (../../zen/workspaces/ZenWorkspaceIcons.mjs)
|
content/browser/zen-components/ZenWorkspaceIcons.mjs (../../zen/workspaces/ZenWorkspaceIcons.mjs)
|
||||||
content/browser/zen-components/ZenWorkspace.mjs (../../zen/workspaces/ZenWorkspace.mjs)
|
content/browser/zen-components/ZenWorkspace.mjs (../../zen/workspaces/ZenWorkspace.mjs)
|
||||||
content/browser/zen-components/ZenWorkspaces.mjs (../../zen/workspaces/ZenWorkspaces.mjs)
|
content/browser/zen-components/ZenWorkspaces.mjs (../../zen/workspaces/ZenWorkspaces.mjs)
|
||||||
content/browser/zen-components/ZenWindowSyncing.mjs (../../zen/workspaces/ZenWindowSyncing.mjs)
|
|
||||||
content/browser/zen-components/ZenWorkspaceCreation.mjs (../../zen/workspaces/ZenWorkspaceCreation.mjs)
|
content/browser/zen-components/ZenWorkspaceCreation.mjs (../../zen/workspaces/ZenWorkspaceCreation.mjs)
|
||||||
content/browser/zen-components/ZenWorkspacesStorage.mjs (../../zen/workspaces/ZenWorkspacesStorage.mjs)
|
content/browser/zen-components/ZenWorkspacesStorage.mjs (../../zen/workspaces/ZenWorkspacesStorage.mjs)
|
||||||
content/browser/zen-components/ZenWorkspacesSync.mjs (../../zen/workspaces/ZenWorkspacesSync.mjs)
|
content/browser/zen-components/ZenWorkspacesSync.mjs (../../zen/workspaces/ZenWorkspacesSync.mjs)
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea99420448 100644
|
index d80a66a01002e78a9c65545d08fe786328ddf124..346ebe814381e8aa04140f43e98c328341c6e6eb 100644
|
||||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||||
@@ -422,15 +422,64 @@
|
@@ -422,15 +422,64 @@
|
||||||
@@ -395,10 +395,10 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
+ gZenWorkspaces._initialTab._shouldRemove = true;
|
+ gZenWorkspaces._initialTab._shouldRemove = true;
|
||||||
+ }
|
+ }
|
||||||
+ }
|
+ }
|
||||||
}
|
+ }
|
||||||
+ else {
|
+ else {
|
||||||
+ gZenWorkspaces._tabToRemoveForEmpty = this.selectedTab;
|
+ gZenWorkspaces._tabToRemoveForEmpty = this.selectedTab;
|
||||||
+ }
|
}
|
||||||
+ this._hasAlreadyInitializedZenSessionStore = true;
|
+ this._hasAlreadyInitializedZenSessionStore = true;
|
||||||
|
|
||||||
if (tabs.length > 1 || !tabs[0].selected) {
|
if (tabs.length > 1 || !tabs[0].selected) {
|
||||||
@@ -522,7 +522,17 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
if (
|
if (
|
||||||
!this._beginRemoveTab(aTab, {
|
!this._beginRemoveTab(aTab, {
|
||||||
closeWindowFastpath: true,
|
closeWindowFastpath: true,
|
||||||
@@ -4905,7 +5046,7 @@
|
@@ -4771,7 +4912,9 @@
|
||||||
|
// We're not animating, so we can cancel the animation stopwatch.
|
||||||
|
Glean.browserTabclose.timeAnim.cancel(aTab._closeTimeAnimTimerId);
|
||||||
|
aTab._closeTimeAnimTimerId = null;
|
||||||
|
+ gZenVerticalTabsManager.animateTabClose(aTab, (animate && !gReduceMotion)).then(() => {
|
||||||
|
this._endRemoveTab(aTab);
|
||||||
|
+ });
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -4905,7 +5048,7 @@
|
||||||
closeWindowWithLastTab != null
|
closeWindowWithLastTab != null
|
||||||
? closeWindowWithLastTab
|
? closeWindowWithLastTab
|
||||||
: !window.toolbar.visible ||
|
: !window.toolbar.visible ||
|
||||||
@@ -531,7 +541,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
|
|
||||||
if (closeWindow) {
|
if (closeWindow) {
|
||||||
// We've already called beforeunload on all the relevant tabs if we get here,
|
// We've already called beforeunload on all the relevant tabs if we get here,
|
||||||
@@ -4929,6 +5070,7 @@
|
@@ -4929,6 +5072,7 @@
|
||||||
|
|
||||||
newTab = true;
|
newTab = true;
|
||||||
}
|
}
|
||||||
@@ -539,7 +549,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
aTab._endRemoveArgs = [closeWindow, newTab];
|
aTab._endRemoveArgs = [closeWindow, newTab];
|
||||||
|
|
||||||
// swapBrowsersAndCloseOther will take care of closing the window without animation.
|
// swapBrowsersAndCloseOther will take care of closing the window without animation.
|
||||||
@@ -4969,13 +5111,7 @@
|
@@ -4969,13 +5113,7 @@
|
||||||
aTab._mouseleave();
|
aTab._mouseleave();
|
||||||
|
|
||||||
if (newTab) {
|
if (newTab) {
|
||||||
@@ -554,7 +564,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
} else {
|
} else {
|
||||||
TabBarVisibility.update();
|
TabBarVisibility.update();
|
||||||
}
|
}
|
||||||
@@ -5108,6 +5244,7 @@
|
@@ -5108,6 +5246,7 @@
|
||||||
this.tabs[i]._tPos = i;
|
this.tabs[i]._tPos = i;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -562,7 +572,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
if (!this._windowIsClosing) {
|
if (!this._windowIsClosing) {
|
||||||
// update tab close buttons state
|
// update tab close buttons state
|
||||||
this.tabContainer._updateCloseButtons();
|
this.tabContainer._updateCloseButtons();
|
||||||
@@ -5320,6 +5457,7 @@
|
@@ -5320,6 +5459,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
let excludeTabs = new Set(aExcludeTabs);
|
let excludeTabs = new Set(aExcludeTabs);
|
||||||
@@ -570,7 +580,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
|
|
||||||
// If this tab has a successor, it should be selectable, since
|
// If this tab has a successor, it should be selectable, since
|
||||||
// hiding or closing a tab removes that tab as a successor.
|
// hiding or closing a tab removes that tab as a successor.
|
||||||
@@ -5332,13 +5470,13 @@
|
@@ -5332,13 +5472,13 @@
|
||||||
!excludeTabs.has(aTab.owner) &&
|
!excludeTabs.has(aTab.owner) &&
|
||||||
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
|
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
|
||||||
) {
|
) {
|
||||||
@@ -586,7 +596,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
);
|
);
|
||||||
|
|
||||||
let tab = this.tabContainer.findNextTab(aTab, {
|
let tab = this.tabContainer.findNextTab(aTab, {
|
||||||
@@ -5354,7 +5492,7 @@
|
@@ -5354,7 +5494,7 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
if (tab) {
|
if (tab) {
|
||||||
@@ -595,7 +605,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
}
|
}
|
||||||
|
|
||||||
// If no qualifying visible tab was found, see if there is a tab in
|
// If no qualifying visible tab was found, see if there is a tab in
|
||||||
@@ -5375,7 +5513,7 @@
|
@@ -5375,7 +5515,7 @@
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -604,7 +614,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
}
|
}
|
||||||
|
|
||||||
_blurTab(aTab) {
|
_blurTab(aTab) {
|
||||||
@@ -5777,10 +5915,10 @@
|
@@ -5777,10 +5917,10 @@
|
||||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -617,7 +627,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
aTab.selected ||
|
aTab.selected ||
|
||||||
aTab.closing ||
|
aTab.closing ||
|
||||||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
||||||
@@ -5839,6 +5977,7 @@
|
@@ -5839,6 +5979,7 @@
|
||||||
* @param {MozTabbrowserTab|MozTabbrowserTabGroup|MozTabbrowserTabGroup.labelElement} aTab
|
* @param {MozTabbrowserTab|MozTabbrowserTabGroup|MozTabbrowserTabGroup.labelElement} aTab
|
||||||
*/
|
*/
|
||||||
replaceTabWithWindow(aTab, aOptions) {
|
replaceTabWithWindow(aTab, aOptions) {
|
||||||
@@ -625,7 +635,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
if (this.tabs.length == 1) {
|
if (this.tabs.length == 1) {
|
||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
@@ -5972,7 +6111,7 @@
|
@@ -5972,7 +6113,7 @@
|
||||||
* `true` if element is a `<tab-group>`
|
* `true` if element is a `<tab-group>`
|
||||||
*/
|
*/
|
||||||
isTabGroup(element) {
|
isTabGroup(element) {
|
||||||
@@ -634,7 +644,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -6048,8 +6187,8 @@
|
@@ -6048,8 +6189,8 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
// Don't allow mixing pinned and unpinned tabs.
|
// Don't allow mixing pinned and unpinned tabs.
|
||||||
@@ -645,7 +655,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
} else {
|
} else {
|
||||||
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
|
tabIndex = Math.max(tabIndex, this.pinnedTabCount);
|
||||||
}
|
}
|
||||||
@@ -6075,10 +6214,16 @@
|
@@ -6075,10 +6216,16 @@
|
||||||
this.#handleTabMove(
|
this.#handleTabMove(
|
||||||
element,
|
element,
|
||||||
() => {
|
() => {
|
||||||
@@ -664,7 +674,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
if (neighbor && this.isTab(element) && tabIndex > element._tPos) {
|
if (neighbor && this.isTab(element) && tabIndex > element._tPos) {
|
||||||
neighbor.after(element);
|
neighbor.after(element);
|
||||||
} else {
|
} else {
|
||||||
@@ -6136,23 +6281,28 @@
|
@@ -6136,23 +6283,28 @@
|
||||||
#moveTabNextTo(element, targetElement, moveBefore = false, metricsContext) {
|
#moveTabNextTo(element, targetElement, moveBefore = false, metricsContext) {
|
||||||
if (this.isTabGroupLabel(targetElement)) {
|
if (this.isTabGroupLabel(targetElement)) {
|
||||||
targetElement = targetElement.group;
|
targetElement = targetElement.group;
|
||||||
@@ -699,7 +709,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
} else if (!element.pinned && targetElement && targetElement.pinned) {
|
} else if (!element.pinned && targetElement && targetElement.pinned) {
|
||||||
// If the caller asks to move an unpinned element next to a pinned
|
// If the caller asks to move an unpinned element next to a pinned
|
||||||
// tab, move the unpinned element to be the first unpinned element
|
// tab, move the unpinned element to be the first unpinned element
|
||||||
@@ -6165,14 +6315,34 @@
|
@@ -6165,14 +6317,34 @@
|
||||||
// move the tab group right before the first unpinned tab.
|
// move the tab group right before the first unpinned tab.
|
||||||
// 4. Moving a tab group and the first unpinned tab is grouped:
|
// 4. Moving a tab group and the first unpinned tab is grouped:
|
||||||
// move the tab group right before the first unpinned tab's tab group.
|
// move the tab group right before the first unpinned tab's tab group.
|
||||||
@@ -735,7 +745,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
element.pinned
|
element.pinned
|
||||||
? this.tabContainer.pinnedTabsContainer
|
? this.tabContainer.pinnedTabsContainer
|
||||||
: this.tabContainer;
|
: this.tabContainer;
|
||||||
@@ -6181,7 +6351,7 @@
|
@@ -6181,7 +6353,7 @@
|
||||||
element,
|
element,
|
||||||
() => {
|
() => {
|
||||||
if (moveBefore) {
|
if (moveBefore) {
|
||||||
@@ -744,7 +754,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
} else if (targetElement) {
|
} else if (targetElement) {
|
||||||
targetElement.after(element);
|
targetElement.after(element);
|
||||||
} else {
|
} else {
|
||||||
@@ -6227,10 +6397,10 @@
|
@@ -6227,10 +6399,10 @@
|
||||||
* @param {TabMetricsContext} [metricsContext]
|
* @param {TabMetricsContext} [metricsContext]
|
||||||
*/
|
*/
|
||||||
moveTabToGroup(aTab, aGroup, metricsContext) {
|
moveTabToGroup(aTab, aGroup, metricsContext) {
|
||||||
@@ -757,7 +767,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (aTab.group && aTab.group.id === aGroup.id) {
|
if (aTab.group && aTab.group.id === aGroup.id) {
|
||||||
@@ -6261,6 +6431,7 @@
|
@@ -6261,6 +6433,7 @@
|
||||||
|
|
||||||
let state = {
|
let state = {
|
||||||
tabIndex: tab._tPos,
|
tabIndex: tab._tPos,
|
||||||
@@ -765,7 +775,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
};
|
};
|
||||||
if (tab.visible) {
|
if (tab.visible) {
|
||||||
state.elementIndex = tab.elementIndex;
|
state.elementIndex = tab.elementIndex;
|
||||||
@@ -6287,7 +6458,7 @@
|
@@ -6287,7 +6460,7 @@
|
||||||
let changedTabGroup =
|
let changedTabGroup =
|
||||||
previousTabState.tabGroupId != currentTabState.tabGroupId;
|
previousTabState.tabGroupId != currentTabState.tabGroupId;
|
||||||
|
|
||||||
@@ -774,7 +784,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
tab.dispatchEvent(
|
tab.dispatchEvent(
|
||||||
new CustomEvent("TabMove", {
|
new CustomEvent("TabMove", {
|
||||||
bubbles: true,
|
bubbles: true,
|
||||||
@@ -6324,6 +6495,10 @@
|
@@ -6324,6 +6497,10 @@
|
||||||
|
|
||||||
moveActionCallback();
|
moveActionCallback();
|
||||||
|
|
||||||
@@ -785,7 +795,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
// Clear tabs cache after moving nodes because the order of tabs may have
|
// Clear tabs cache after moving nodes because the order of tabs may have
|
||||||
// changed.
|
// changed.
|
||||||
this.tabContainer._invalidateCachedTabs();
|
this.tabContainer._invalidateCachedTabs();
|
||||||
@@ -7221,7 +7396,7 @@
|
@@ -7221,7 +7398,7 @@
|
||||||
// preventDefault(). It will still raise the window if appropriate.
|
// preventDefault(). It will still raise the window if appropriate.
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
@@ -794,7 +804,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
window.focus();
|
window.focus();
|
||||||
aEvent.preventDefault();
|
aEvent.preventDefault();
|
||||||
break;
|
break;
|
||||||
@@ -8166,6 +8341,7 @@
|
@@ -8166,6 +8343,7 @@
|
||||||
aWebProgress.isTopLevel
|
aWebProgress.isTopLevel
|
||||||
) {
|
) {
|
||||||
this.mTab.setAttribute("busy", "true");
|
this.mTab.setAttribute("busy", "true");
|
||||||
@@ -802,7 +812,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
||||||
this.mTab._notselectedsinceload = !this.mTab.selected;
|
this.mTab._notselectedsinceload = !this.mTab.selected;
|
||||||
}
|
}
|
||||||
@@ -9157,7 +9333,7 @@ var TabContextMenu = {
|
@@ -9157,7 +9335,7 @@ var TabContextMenu = {
|
||||||
);
|
);
|
||||||
contextUnpinSelectedTabs.hidden =
|
contextUnpinSelectedTabs.hidden =
|
||||||
!this.contextTab.pinned || !this.multiselected;
|
!this.contextTab.pinned || !this.multiselected;
|
||||||
@@ -811,7 +821,7 @@ index d80a66a01002e78a9c65545d08fe786328ddf124..46b1e3075165e1e9e783db84861b0fea
|
|||||||
// Build Ask Chat items
|
// Build Ask Chat items
|
||||||
TabContextMenu.GenAI.buildTabMenu(
|
TabContextMenu.GenAI.buildTabMenu(
|
||||||
document.getElementById("context_askChat"),
|
document.getElementById("context_askChat"),
|
||||||
@@ -9476,6 +9652,7 @@ var TabContextMenu = {
|
@@ -9476,6 +9654,7 @@ var TabContextMenu = {
|
||||||
)
|
)
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||||
index e2b27db6c13278defea3bcc7606a8da54e7d001c..3033f5c98c94cf4b048432dfee72e20f4d8e37b6 100644
|
index e2b27db6c13278defea3bcc7606a8da54e7d001c..91e772ab0fed5be50e6dfee40eaa24888de67ccb 100644
|
||||||
--- a/browser/components/tabbrowser/content/tabs.js
|
--- a/browser/components/tabbrowser/content/tabs.js
|
||||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||||
@@ -332,7 +332,7 @@
|
@@ -332,7 +332,7 @@
|
||||||
@@ -7,7 +7,7 @@ index e2b27db6c13278defea3bcc7606a8da54e7d001c..3033f5c98c94cf4b048432dfee72e20f
|
|||||||
if (
|
if (
|
||||||
event.button != 0 ||
|
event.button != 0 ||
|
||||||
- event.target != this.arrowScrollbox ||
|
- event.target != this.arrowScrollbox ||
|
||||||
+ !event.target.classList.contains("zen-workspace-normal-tabs-section") ||
|
+ !event.target.classList.contains("zen-workspace-empty-space") ||
|
||||||
event.composedTarget.localName == "toolbarbutton"
|
event.composedTarget.localName == "toolbarbutton"
|
||||||
) {
|
) {
|
||||||
return;
|
return;
|
||||||
|
@@ -7,7 +7,7 @@ index 13b1659ed5a3b9bb0342b601998d0fd5c9760e22..4f13c401f23f51962986fe8caf197aa5
|
|||||||
#identity-box[pageproxystate="valid"]:is(.notSecureText, .chromeUI, .extensionPage) > .identity-box-button,
|
#identity-box[pageproxystate="valid"]:is(.notSecureText, .chromeUI, .extensionPage) > .identity-box-button,
|
||||||
#urlbar-label-box {
|
#urlbar-label-box {
|
||||||
- background-color: var(--urlbar-box-bgcolor);
|
- background-color: var(--urlbar-box-bgcolor);
|
||||||
+ background-color: light-dark(#cecece, rgb(66, 65, 77));
|
+ background-color: transparent;
|
||||||
color: var(--urlbar-box-text-color);
|
color: var(--urlbar-box-text-color);
|
||||||
padding-inline: 8px;
|
padding-inline: 8px;
|
||||||
border-radius: var(--urlbar-icon-border-radius);
|
border-radius: var(--urlbar-icon-border-radius);
|
||||||
|
@@ -0,0 +1,7 @@
|
|||||||
|
#filter dumbComments emptyLines substitution
|
||||||
|
# This Source Code Form is subject to the terms of the Mozilla Public
|
||||||
|
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
||||||
|
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
||||||
|
<svg width="24" height="24" viewBox="0 0 24 24" fill="none" xmlns="http://www.w3.org/2000/svg">
|
||||||
|
<path fill="context-fill" fill-opacity="context-fill-opacity" d="m9.874 9.343.056.048 4.988 4.989a.588.588 0 0 1-.145.937l-.068.03-6.106 2.25c-1.147.422-2.264-.656-1.916-1.802l.03-.086 2.25-6.105a.588.588 0 0 1 .85-.303Zm5.309 2.553c.536.028 1.27.141 1.908.525a.588.588 0 0 1-.544 1.04l-.06-.032c-.402-.24-.914-.336-1.366-.359a4 4 0 0 0-.558.002l-.186.02a.588.588 0 0 1-.165-1.165 5 5 0 0 1 .97-.031m1.192-1.638a.588.588 0 0 1 .067 1.172l-.067.003h-.417a.588.588 0 0 1-.068-1.171l.068-.004zm-1.87-.451a.59.59 0 0 1 .047.776l-.048.055-.624.624a.588.588 0 0 1-.88-.776l.049-.056.623-.623a.59.59 0 0 1 .832 0m-1.521-3.096c.263.792.122 1.658-.042 2.264a6 6 0 0 1-.406 1.095.588.588 0 0 1-1.052-.525 4.7 4.7 0 0 0 .323-.879c.133-.49.2-1.02.098-1.455l-.037-.127a.588.588 0 1 1 1.116-.373m3.183 1.434a.59.59 0 0 1 0 .831l-.415.416a.588.588 0 1 1-.832-.831l.415-.416a.59.59 0 0 1 .831 0"/>
|
||||||
|
</svg>
|
@@ -238,10 +238,6 @@
|
|||||||
list-style-image: url('privateBrowsing.svg') !important;
|
list-style-image: url('privateBrowsing.svg') !important;
|
||||||
}
|
}
|
||||||
|
|
||||||
#save-to-pocket-button {
|
|
||||||
list-style-image: url('pocket-outline.svg') !important;
|
|
||||||
}
|
|
||||||
|
|
||||||
#profiler-button-button > .toolbarbutton-icon,
|
#profiler-button-button > .toolbarbutton-icon,
|
||||||
.subviewbutton[label='Task Manager'] {
|
.subviewbutton[label='Task Manager'] {
|
||||||
list-style-image: url('tool-profiler.svg') !important;
|
list-style-image: url('tool-profiler.svg') !important;
|
||||||
|
@@ -97,7 +97,6 @@
|
|||||||
* skin/classic/browser/zen-icons/persistent-storage.svg (../shared/zen-icons/lin/persistent-storage.svg)
|
* skin/classic/browser/zen-icons/persistent-storage.svg (../shared/zen-icons/lin/persistent-storage.svg)
|
||||||
* skin/classic/browser/zen-icons/pin.svg (../shared/zen-icons/lin/pin.svg)
|
* skin/classic/browser/zen-icons/pin.svg (../shared/zen-icons/lin/pin.svg)
|
||||||
* skin/classic/browser/zen-icons/plus.svg (../shared/zen-icons/lin/plus.svg)
|
* skin/classic/browser/zen-icons/plus.svg (../shared/zen-icons/lin/plus.svg)
|
||||||
* skin/classic/browser/zen-icons/pocket-outline.svg (../shared/zen-icons/lin/pocket-outline.svg)
|
|
||||||
* skin/classic/browser/zen-icons/popup.svg (../shared/zen-icons/lin/popup.svg)
|
* skin/classic/browser/zen-icons/popup.svg (../shared/zen-icons/lin/popup.svg)
|
||||||
* skin/classic/browser/zen-icons/print.svg (../shared/zen-icons/lin/print.svg)
|
* skin/classic/browser/zen-icons/print.svg (../shared/zen-icons/lin/print.svg)
|
||||||
* skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/lin/privateBrowsing.svg)
|
* skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/lin/privateBrowsing.svg)
|
||||||
@@ -239,7 +238,6 @@
|
|||||||
* skin/classic/browser/zen-icons/persistent-storage.svg (../shared/zen-icons/lin/persistent-storage.svg)
|
* skin/classic/browser/zen-icons/persistent-storage.svg (../shared/zen-icons/lin/persistent-storage.svg)
|
||||||
* skin/classic/browser/zen-icons/pin.svg (../shared/zen-icons/lin/pin.svg)
|
* skin/classic/browser/zen-icons/pin.svg (../shared/zen-icons/lin/pin.svg)
|
||||||
* skin/classic/browser/zen-icons/plus.svg (../shared/zen-icons/lin/plus.svg)
|
* skin/classic/browser/zen-icons/plus.svg (../shared/zen-icons/lin/plus.svg)
|
||||||
* skin/classic/browser/zen-icons/pocket-outline.svg (../shared/zen-icons/lin/pocket-outline.svg)
|
|
||||||
* skin/classic/browser/zen-icons/popup.svg (../shared/zen-icons/lin/popup.svg)
|
* skin/classic/browser/zen-icons/popup.svg (../shared/zen-icons/lin/popup.svg)
|
||||||
* skin/classic/browser/zen-icons/print.svg (../shared/zen-icons/lin/print.svg)
|
* skin/classic/browser/zen-icons/print.svg (../shared/zen-icons/lin/print.svg)
|
||||||
* skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/lin/privateBrowsing.svg)
|
* skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/lin/privateBrowsing.svg)
|
||||||
@@ -381,7 +379,6 @@
|
|||||||
* skin/classic/browser/zen-icons/persistent-storage.svg (../shared/zen-icons/lin/persistent-storage.svg)
|
* skin/classic/browser/zen-icons/persistent-storage.svg (../shared/zen-icons/lin/persistent-storage.svg)
|
||||||
* skin/classic/browser/zen-icons/pin.svg (../shared/zen-icons/lin/pin.svg)
|
* skin/classic/browser/zen-icons/pin.svg (../shared/zen-icons/lin/pin.svg)
|
||||||
* skin/classic/browser/zen-icons/plus.svg (../shared/zen-icons/lin/plus.svg)
|
* skin/classic/browser/zen-icons/plus.svg (../shared/zen-icons/lin/plus.svg)
|
||||||
* skin/classic/browser/zen-icons/pocket-outline.svg (../shared/zen-icons/lin/pocket-outline.svg)
|
|
||||||
* skin/classic/browser/zen-icons/popup.svg (../shared/zen-icons/lin/popup.svg)
|
* skin/classic/browser/zen-icons/popup.svg (../shared/zen-icons/lin/popup.svg)
|
||||||
* skin/classic/browser/zen-icons/print.svg (../shared/zen-icons/lin/print.svg)
|
* skin/classic/browser/zen-icons/print.svg (../shared/zen-icons/lin/print.svg)
|
||||||
* skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/lin/privateBrowsing.svg)
|
* skin/classic/browser/zen-icons/privateBrowsing.svg (../shared/zen-icons/lin/privateBrowsing.svg)
|
||||||
@@ -472,6 +469,7 @@
|
|||||||
* skin/classic/browser/zen-icons/selectable/star-1.svg (../shared/zen-icons/common/selectable/star-1.svg)
|
* skin/classic/browser/zen-icons/selectable/star-1.svg (../shared/zen-icons/common/selectable/star-1.svg)
|
||||||
* skin/classic/browser/zen-icons/selectable/star.svg (../shared/zen-icons/common/selectable/star.svg)
|
* skin/classic/browser/zen-icons/selectable/star.svg (../shared/zen-icons/common/selectable/star.svg)
|
||||||
* skin/classic/browser/zen-icons/selectable/sun.svg (../shared/zen-icons/common/selectable/sun.svg)
|
* skin/classic/browser/zen-icons/selectable/sun.svg (../shared/zen-icons/common/selectable/sun.svg)
|
||||||
|
* skin/classic/browser/zen-icons/selectable/tada.svg (../shared/zen-icons/common/selectable/tada.svg)
|
||||||
* skin/classic/browser/zen-icons/selectable/terminal.svg (../shared/zen-icons/common/selectable/terminal.svg)
|
* skin/classic/browser/zen-icons/selectable/terminal.svg (../shared/zen-icons/common/selectable/terminal.svg)
|
||||||
* skin/classic/browser/zen-icons/selectable/triangle.svg (../shared/zen-icons/common/selectable/triangle.svg)
|
* skin/classic/browser/zen-icons/selectable/triangle.svg (../shared/zen-icons/common/selectable/triangle.svg)
|
||||||
* skin/classic/browser/zen-icons/selectable/video.svg (../shared/zen-icons/common/selectable/video.svg)
|
* skin/classic/browser/zen-icons/selectable/video.svg (../shared/zen-icons/common/selectable/video.svg)
|
||||||
|
@@ -1,7 +0,0 @@
|
|||||||
#filter dumbComments emptyLines substitution
|
|
||||||
# This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
# License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="currentColor" fill-opacity="context-fill-opacity">
|
|
||||||
<path d="M2.5 2A2.507 2.507 0 0 0 0 4.5V7c0 4.412 3.588 8 8 8s8-3.588 8-8V4.5C16 3.125 14.875 2 13.5 2h-11zm0 1h11c.834 0 1.5.666 1.5 1.5V7c0 3.872-3.128 7-7 7s-7-3.128-7-7V4.5C1 3.666 1.666 3 2.5 3zm2 3a.5.5 0 0 0-.353.146.5.5 0 0 0 0 .707l3.5 3.5a.5.5 0 0 0 .706 0l3.5-3.5a.5.5 0 0 0 0-.706.5.5 0 0 0-.706 0L8 9.293 4.854 6.147A.5.5 0 0 0 4.501 6z"/>
|
|
||||||
</svg>
|
|
@@ -1,8 +0,0 @@
|
|||||||
<!--
|
|
||||||
- This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
- License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
- file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
-->
|
|
||||||
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="currentColor" fill-opacity="context-fill-opacity">
|
|
||||||
<path d="M2.5 2A2.507 2.507 0 0 0 0 4.5V7c0 4.412 3.588 8 8 8s8-3.588 8-8V4.5C16 3.125 14.875 2 13.5 2h-11zm0 1h11c.834 0 1.5.666 1.5 1.5V7c0 3.872-3.128 7-7 7s-7-3.128-7-7V4.5C1 3.666 1.666 3 2.5 3zm2 3a.5.5 0 0 0-.353.146.5.5 0 0 0 0 .707l3.5 3.5a.5.5 0 0 0 .706 0l3.5-3.5a.5.5 0 0 0 0-.706.5.5 0 0 0-.706 0L8 9.293 4.854 6.147A.5.5 0 0 0 4.501 6z"/>
|
|
||||||
</svg>
|
|
Before Width: | Height: | Size: 702 B |
@@ -646,7 +646,7 @@ var gZenVerticalTabsManager = {
|
|||||||
marginBottom: isLastItem() ? [] : [transform, '0px'],
|
marginBottom: isLastItem() ? [] : [transform, '0px'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
duration: 0.12,
|
duration: 0.11,
|
||||||
easing: 'ease-out',
|
easing: 'ease-out',
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -668,7 +668,7 @@ var gZenVerticalTabsManager = {
|
|||||||
filter: ['blur(1px)', 'blur(0px)'],
|
filter: ['blur(1px)', 'blur(0px)'],
|
||||||
},
|
},
|
||||||
{
|
{
|
||||||
duration: 0.12,
|
duration: 0.11,
|
||||||
easing: 'ease-out',
|
easing: 'ease-out',
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
@@ -684,6 +684,27 @@ var gZenVerticalTabsManager = {
|
|||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
|
||||||
|
animateTabClose(aTab, animate) {
|
||||||
|
if (!animate) {
|
||||||
|
return new Promise((resolve) => {
|
||||||
|
resolve();
|
||||||
|
});
|
||||||
|
}
|
||||||
|
const height = aTab.getBoundingClientRect().height;
|
||||||
|
return gZenUIManager.motion.animate(
|
||||||
|
aTab,
|
||||||
|
{
|
||||||
|
opacity: [1, 0],
|
||||||
|
transform: ['scale(1)', 'scale(0.95)'],
|
||||||
|
marginBottom: [`0px`, `-${height}px`],
|
||||||
|
},
|
||||||
|
{
|
||||||
|
duration: 0.075,
|
||||||
|
easing: 'ease-out',
|
||||||
|
}
|
||||||
|
);
|
||||||
|
},
|
||||||
|
|
||||||
get actualWindowButtons() {
|
get actualWindowButtons() {
|
||||||
// we have multiple ".titlebar-buttonbox-container" in the DOM, because of the titlebar
|
// we have multiple ".titlebar-buttonbox-container" in the DOM, because of the titlebar
|
||||||
if (!this.__actualWindowButtons) {
|
if (!this.__actualWindowButtons) {
|
||||||
|
@@ -12,7 +12,8 @@
|
|||||||
"layers.svg", "lightning.svg", "mail.svg", "map.svg", "moon.svg", "music.svg",
|
"layers.svg", "lightning.svg", "mail.svg", "map.svg", "moon.svg", "music.svg",
|
||||||
"page.svg", "palette.svg", "paw.svg", "people.svg", "pizza.svg", "planet.svg",
|
"page.svg", "palette.svg", "paw.svg", "people.svg", "pizza.svg", "planet.svg",
|
||||||
"present.svg", "shapes.svg", "skull.svg", "square.svg", "squares.svg", "star.svg",
|
"present.svg", "shapes.svg", "skull.svg", "square.svg", "squares.svg", "star.svg",
|
||||||
"star-1.svg", "sun.svg", "terminal.svg", "triangle.svg", "video.svg", "weight.svg",
|
"star-1.svg", "sun.svg", "tada.svg", "terminal.svg", "triangle.svg", "video.svg",
|
||||||
|
"weight.svg",
|
||||||
];
|
];
|
||||||
|
|
||||||
class nsZenEmojiPicker extends nsZenDOMOperatedFeature {
|
class nsZenEmojiPicker extends nsZenDOMOperatedFeature {
|
||||||
|
@@ -374,7 +374,7 @@ menuseparator {
|
|||||||
color-mix(in srgb, var(--zen-primary-color) 85%, #0f0f0f 15%)
|
color-mix(in srgb, var(--zen-primary-color) 85%, #0f0f0f 15%)
|
||||||
);
|
);
|
||||||
box-shadow: 0 0 14px 3px rgba(0, 0, 0, 0.05);
|
box-shadow: 0 0 14px 3px rgba(0, 0, 0, 0.05);
|
||||||
border: 1px solid light-dark(rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.2));
|
border: 1px solid rgba(0, 0, 0, 0.2);
|
||||||
display: flex;
|
display: flex;
|
||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
|
@@ -235,6 +235,10 @@ body > #confetti {
|
|||||||
mask-composite: exclude;
|
mask-composite: exclude;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#TabsToolbar {
|
||||||
|
-moz-window-dragging: unset;
|
||||||
|
}
|
||||||
|
|
||||||
/* Status panel */
|
/* Status panel */
|
||||||
|
|
||||||
@media (-moz-pref('zen.theme.styled-status-panel')) {
|
@media (-moz-pref('zen.theme.styled-status-panel')) {
|
||||||
|
@@ -25,27 +25,46 @@
|
|||||||
--zen-branding-bg-reverse: light-dark(var(--zen-branding-dark), var(--zen-branding-paper));
|
--zen-branding-bg-reverse: light-dark(var(--zen-branding-dark), var(--zen-branding-paper));
|
||||||
|
|
||||||
/** Zen colors are generated automatically from the primary color */
|
/** Zen colors are generated automatically from the primary color */
|
||||||
--zen-colors-primary: color-mix(in srgb, var(--zen-primary-color) 50%, black 50%);
|
--zen-colors-primary: light-dark(
|
||||||
--zen-colors-secondary: color-mix(in srgb, var(--zen-colors-primary) 20%, white 80%);
|
color-mix(in srgb, var(--zen-primary-color) 50%, black 50%),
|
||||||
--zen-colors-tertiary: color-mix(in srgb, var(--zen-primary-color) 2%, white 98%);
|
color-mix(in srgb, var(--zen-primary-color) 20%, var(--zen-branding-bg) 80%)
|
||||||
|
);
|
||||||
--zen-colors-hover-bg: color-mix(in srgb, var(--zen-primary-color) 90%, white 10%);
|
--zen-colors-secondary: light-dark(
|
||||||
--zen-colors-primary-foreground: var(--zen-branding-bg-reverse);
|
color-mix(in srgb, var(--zen-colors-primary) 20%, white 80%),
|
||||||
--zen-colors-border: color-mix(in srgb, var(--zen-colors-secondary) 97%, black 3%);
|
color-mix(in srgb, var(--zen-primary-color) 30%, var(--zen-branding-bg) 70%)
|
||||||
--zen-colors-border-contrast: color-mix(
|
);
|
||||||
in srgb,
|
--zen-colors-tertiary: light-dark(
|
||||||
var(--zen-colors-secondary) 10%,
|
color-mix(in srgb, var(--zen-primary-color) 2%, white 98%),
|
||||||
rgba(181, 181, 181, 0.11) 90%
|
color-mix(in srgb, var(--zen-primary-color) 1%, var(--zen-branding-bg) 99%)
|
||||||
);
|
);
|
||||||
|
|
||||||
--zen-colors-input-bg: color-mix(
|
--zen-colors-hover-bg: light-dark(
|
||||||
in srgb,
|
color-mix(in srgb, var(--zen-primary-color) 90%, white 10%),
|
||||||
var(--zen-primary-color) 1%,
|
color-mix(in srgb, var(--zen-primary-color) 90%, var(--zen-branding-bg) 10%)
|
||||||
var(--zen-colors-tertiary) 99%
|
);
|
||||||
|
--zen-colors-primary-foreground: light-dark(
|
||||||
|
var(--zen-branding-bg-reverse),
|
||||||
|
color-mix(in srgb, var(--zen-primary-color) 80%, white 20%)
|
||||||
|
);
|
||||||
|
--zen-colors-border: light-dark(
|
||||||
|
color-mix(in srgb, var(--zen-colors-secondary) 97%, black 3%),
|
||||||
|
color-mix(in srgb, var(--zen-colors-secondary) 20%, rgb(79, 79, 79) 80%)
|
||||||
|
);
|
||||||
|
--zen-colors-border-contrast: light-dark(
|
||||||
|
color-mix(in srgb, var(--zen-colors-secondary) 10%, rgba(181, 181, 181, 0.11) 90%),
|
||||||
|
color-mix(in srgb, var(--zen-colors-secondary) 10%, rgba(255, 255, 255, 0.11) 90%)
|
||||||
|
);
|
||||||
|
|
||||||
|
--zen-colors-input-bg: light-dark(
|
||||||
|
color-mix(in srgb, var(--zen-primary-color) 1%, var(--zen-colors-tertiary) 99%),
|
||||||
|
color-mix(in srgb, var(--zen-primary-color) 1%, var(--zen-branding-bg) 99%)
|
||||||
);
|
);
|
||||||
|
|
||||||
--zen-dialog-background: light-dark(rgb(244, 244, 244), rgb(31, 31, 31));
|
--zen-dialog-background: light-dark(rgb(244, 244, 244), rgb(31, 31, 31));
|
||||||
--zen-urlbar-background: color-mix(in srgb, var(--zen-primary-color) 3%, #f4f4f4 97%);
|
--zen-urlbar-background: light-dark(
|
||||||
|
color-mix(in srgb, var(--zen-primary-color) 3%, #f4f4f4 97%),
|
||||||
|
color-mix(in srgb, var(--zen-primary-color) 4%, rgb(24, 24, 24) 96%)
|
||||||
|
);
|
||||||
|
|
||||||
--zen-secondary-btn-color: var(--zen-colors-primary-foreground);
|
--zen-secondary-btn-color: var(--zen-colors-primary-foreground);
|
||||||
|
|
||||||
@@ -111,7 +130,10 @@
|
|||||||
) !important;
|
) !important;
|
||||||
|
|
||||||
--in-content-page-background: var(--zen-colors-tertiary) !important;
|
--in-content-page-background: var(--zen-colors-tertiary) !important;
|
||||||
--zen-in-content-dialog-background: var(--zen-colors-tertiary);
|
--zen-in-content-dialog-background: light-dark(
|
||||||
|
var(--zen-colors-tertiary),
|
||||||
|
var(--zen-branding-bg)
|
||||||
|
);
|
||||||
|
|
||||||
--zen-button-border-radius: 5px;
|
--zen-button-border-radius: 5px;
|
||||||
--zen-button-padding: 0.6rem 1.2rem;
|
--zen-button-padding: 0.6rem 1.2rem;
|
||||||
@@ -138,6 +160,13 @@
|
|||||||
|
|
||||||
--toolbarbutton-hover-background: var(--zen-toolbar-element-bg-hover) !important;
|
--toolbarbutton-hover-background: var(--zen-toolbar-element-bg-hover) !important;
|
||||||
|
|
||||||
|
/* Using a semitransparent background preserves the tinting from the backdrop.
|
||||||
|
* Note that the toolbar text color from browser-colors.css should be ok,
|
||||||
|
* as the backdrop matches our color scheme. The .6 matches what we do for
|
||||||
|
* acrylic, and the .15 matches the 85% we do for the default toolbar
|
||||||
|
* background on the native theme. */
|
||||||
|
--toolbar-bgcolor: light-dark(rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.15));
|
||||||
|
|
||||||
--toolbarbutton-active-background: color-mix(
|
--toolbarbutton-active-background: color-mix(
|
||||||
in srgb,
|
in srgb,
|
||||||
var(--zen-branding-bg-reverse) 7%,
|
var(--zen-branding-bg-reverse) 7%,
|
||||||
@@ -149,10 +178,13 @@
|
|||||||
|
|
||||||
/* Other colors */
|
/* Other colors */
|
||||||
--urlbar-box-active-bgcolor: var(--toolbarbutton-hover-background) !important;
|
--urlbar-box-active-bgcolor: var(--toolbarbutton-hover-background) !important;
|
||||||
--toolbar-field-focus-background-color: var(--urlbar-box-bgcolor) !important;
|
|
||||||
--zen-input-border-color: light-dark(rgb(204, 204, 204), rgb(66, 65, 77));
|
--zen-input-border-color: light-dark(rgb(204, 204, 204), rgb(66, 65, 77));
|
||||||
--urlbar-box-hover-bgcolor: var(--toolbarbutton-hover-background) !important;
|
--urlbar-box-hover-bgcolor: var(--toolbarbutton-hover-background) !important;
|
||||||
--input-bgcolor: light-dark(rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.2)) !important;
|
--input-bgcolor: light-dark(rgba(255, 255, 255, 0.2), rgba(0, 0, 0, 0.2)) !important;
|
||||||
|
--toolbar-field-focus-background-color: light-dark(
|
||||||
|
rgba(255, 255, 255, 0.25),
|
||||||
|
rgba(0, 0, 0, 0.3)
|
||||||
|
) !important;
|
||||||
|
|
||||||
/* Transitions */
|
/* Transitions */
|
||||||
--zen-tabbox-element-indent-transition: margin-inline-start 0.1s ease-in-out;
|
--zen-tabbox-element-indent-transition: margin-inline-start 0.1s ease-in-out;
|
||||||
@@ -284,52 +316,3 @@
|
|||||||
--toolbar-color-scheme: light;
|
--toolbar-color-scheme: light;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@media (prefers-color-scheme: dark) {
|
|
||||||
:host(:is(.anonymous-content-host, notification-message)),
|
|
||||||
:root {
|
|
||||||
--zen-in-content-dialog-background: var(--zen-branding-bg);
|
|
||||||
--zen-colors-primary: color-mix(
|
|
||||||
in srgb,
|
|
||||||
var(--zen-primary-color) 20%,
|
|
||||||
var(--zen-branding-bg) 80%
|
|
||||||
);
|
|
||||||
--zen-colors-secondary: color-mix(
|
|
||||||
in srgb,
|
|
||||||
var(--zen-primary-color) 30%,
|
|
||||||
var(--zen-branding-bg) 70%
|
|
||||||
);
|
|
||||||
--zen-colors-tertiary: color-mix(
|
|
||||||
in srgb,
|
|
||||||
var(--zen-primary-color) 1%,
|
|
||||||
var(--zen-branding-bg) 99%
|
|
||||||
);
|
|
||||||
|
|
||||||
--zen-colors-hover-bg: color-mix(
|
|
||||||
in srgb,
|
|
||||||
var(--zen-primary-color) 90%,
|
|
||||||
var(--zen-branding-bg) 10%
|
|
||||||
);
|
|
||||||
--zen-colors-primary-foreground: color-mix(in srgb, var(--zen-primary-color) 80%, white 20%);
|
|
||||||
|
|
||||||
--zen-colors-input-bg: color-mix(
|
|
||||||
in srgb,
|
|
||||||
var(--zen-primary-color) 1%,
|
|
||||||
var(--zen-branding-bg) 99%
|
|
||||||
);
|
|
||||||
--zen-colors-border: color-mix(in srgb, var(--zen-colors-secondary) 20%, rgb(79, 79, 79) 80%);
|
|
||||||
--zen-colors-border-contrast: color-mix(
|
|
||||||
in srgb,
|
|
||||||
var(--zen-colors-secondary) 10%,
|
|
||||||
rgba(255, 255, 255, 0.11) 90%
|
|
||||||
);
|
|
||||||
|
|
||||||
--zen-urlbar-background: color-mix(in srgb, var(--zen-primary-color) 4%, rgb(24, 24, 24) 96%);
|
|
||||||
|
|
||||||
--zen-browser-gradient-base: color-mix(
|
|
||||||
in srgb,
|
|
||||||
var(--zen-primary-color) 30%,
|
|
||||||
var(--zen-branding-bg) 70%
|
|
||||||
);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
@@ -201,7 +201,7 @@
|
|||||||
display: none;
|
display: none;
|
||||||
}
|
}
|
||||||
|
|
||||||
#identity-box:not([pageproxystate='invalid']) #identity-icon-box:not([open]) {
|
#identity-box:not([pageproxystate='invalid']):not(.notSecure) #identity-icon-box:not([open]) {
|
||||||
margin-inline-start: calc(-8px - 2 * var(--urlbar-icon-padding));
|
margin-inline-start: calc(-8px - 2 * var(--urlbar-icon-padding));
|
||||||
transform: translateX(100%);
|
transform: translateX(100%);
|
||||||
opacity: 0;
|
opacity: 0;
|
||||||
@@ -376,7 +376,7 @@ button.popup-notification-dropmarker {
|
|||||||
#identity-box:is(:not(.chromeUI), [pageproxystate='invalid'])
|
#identity-box:is(:not(.chromeUI), [pageproxystate='invalid'])
|
||||||
#identity-icon-box {
|
#identity-icon-box {
|
||||||
border-radius: var(--urlbar-icon-border-radius) !important;
|
border-radius: var(--urlbar-icon-border-radius) !important;
|
||||||
min-width: 30px;
|
min-width: 28px;
|
||||||
}
|
}
|
||||||
|
|
||||||
/* Notification Stack */
|
/* Notification Stack */
|
||||||
|
@@ -37,21 +37,10 @@ var gZenCompactModeManager = {
|
|||||||
HOVER_HACK_DELAY: Services.prefs.getIntPref('zen.view.compact.hover-hack-delay', 0),
|
HOVER_HACK_DELAY: Services.prefs.getIntPref('zen.view.compact.hover-hack-delay', 0),
|
||||||
|
|
||||||
preInit() {
|
preInit() {
|
||||||
// Remove it before initializing so we can properly calculate the width
|
this._wasInCompactMode = Services.prefs.getBoolPref(
|
||||||
// of the sidebar at startup and avoid overflowing items not being hidden
|
'zen.view.compact.enable-at-startup',
|
||||||
let xulStoreValue = Services.xulStore.getValue(
|
false
|
||||||
AppConstants.BROWSER_CHROME_URL,
|
|
||||||
'zen-main-app-wrapper',
|
|
||||||
'zen-compact-mode'
|
|
||||||
);
|
);
|
||||||
if (xulStoreValue === '-moz-missing\n' || !xulStoreValue) {
|
|
||||||
xulStoreValue = false;
|
|
||||||
}
|
|
||||||
this._wasInCompactMode =
|
|
||||||
xulStoreValue ||
|
|
||||||
Services.prefs.getBoolPref('zen.view.compact.should-enable-at-startup', false);
|
|
||||||
lazyCompactMode.mainAppWrapper.removeAttribute('zen-compact-mode');
|
|
||||||
|
|
||||||
this._canDebugLog = Services.prefs.getBoolPref('zen.view.compact.debug', false);
|
this._canDebugLog = Services.prefs.getBoolPref('zen.view.compact.debug', false);
|
||||||
|
|
||||||
this.addContextMenu();
|
this.addContextMenu();
|
||||||
@@ -134,9 +123,8 @@ var gZenCompactModeManager = {
|
|||||||
// main-window can't store attributes other than window sizes, so we use this instead
|
// main-window can't store attributes other than window sizes, so we use this instead
|
||||||
lazyCompactMode.mainAppWrapper.setAttribute('zen-compact-mode', value);
|
lazyCompactMode.mainAppWrapper.setAttribute('zen-compact-mode', value);
|
||||||
document.documentElement.setAttribute('zen-compact-mode', value);
|
document.documentElement.setAttribute('zen-compact-mode', value);
|
||||||
Services.xulStore.persist(lazyCompactMode.mainAppWrapper, 'zen-compact-mode');
|
|
||||||
if (typeof this._wasInCompactMode === 'undefined') {
|
if (typeof this._wasInCompactMode === 'undefined') {
|
||||||
Services.prefs.setBoolPref('zen.view.compact.should-enable-at-startup', value);
|
Services.prefs.setBoolPref('zen.view.compact.enable-at-startup', value);
|
||||||
}
|
}
|
||||||
this._updateEvent();
|
this._updateEvent();
|
||||||
},
|
},
|
||||||
|
@@ -148,7 +148,7 @@
|
|||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background: var(--zen-dialog-background);
|
background: var(--zen-dialog-background);
|
||||||
outline: 1px solid var(--zen-colors-border);
|
outline: 1px solid rgba(255,255,255,.15);
|
||||||
outline-offset: -1px;
|
outline-offset: -1px;
|
||||||
box-shadow: var(--zen-big-shadow);
|
box-shadow: var(--zen-big-shadow);
|
||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
@@ -873,9 +873,13 @@
|
|||||||
// note: We set if the folder is collapsed some time after creation.
|
// note: We set if the folder is collapsed some time after creation.
|
||||||
// we do this to ensure marginBottom is set correctly in the case
|
// we do this to ensure marginBottom is set correctly in the case
|
||||||
// that we want it to initially be collapsed.
|
// that we want it to initially be collapsed.
|
||||||
requestAnimationFrame(() => {
|
setTimeout(
|
||||||
folder.collapsed = !!options.collapsed;
|
(folder) => {
|
||||||
});
|
folder.collapsed = !!options.collapsed;
|
||||||
|
},
|
||||||
|
0,
|
||||||
|
folder
|
||||||
|
);
|
||||||
return folder;
|
return folder;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -902,6 +906,7 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
handleTabUnpin(tab) {
|
handleTabUnpin(tab) {
|
||||||
|
tab.style.removeProperty('--zen-folder-indent');
|
||||||
const group = tab.group;
|
const group = tab.group;
|
||||||
if (!group) {
|
if (!group) {
|
||||||
return false;
|
return false;
|
||||||
|
@@ -41,7 +41,7 @@ tab-group[split-view-group] {
|
|||||||
outline-offset: var(--tab-outline-offset);
|
outline-offset: var(--tab-outline-offset);
|
||||||
outline-color: var(--tab-selected-outline-color);
|
outline-color: var(--tab-selected-outline-color);
|
||||||
transition: scale 0.1s ease;
|
transition: scale 0.1s ease;
|
||||||
margin-inline-start: 0 !important;
|
margin-inline: 2px !important;
|
||||||
|
|
||||||
:root:not([zen-sidebar-expanded='true']) & {
|
:root:not([zen-sidebar-expanded='true']) & {
|
||||||
padding: 0;
|
padding: 0;
|
||||||
@@ -269,7 +269,7 @@ zen-folder {
|
|||||||
pointer-events: none;
|
pointer-events: none;
|
||||||
|
|
||||||
:root[zen-sidebar-expanded] & {
|
:root[zen-sidebar-expanded] & {
|
||||||
left: 2px;
|
left: 4px;
|
||||||
}
|
}
|
||||||
|
|
||||||
& svg {
|
& svg {
|
||||||
|
@@ -92,7 +92,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
onTabIconChanged(tab, url = null) {
|
onTabIconChanged(tab, url = null) {
|
||||||
tab.dispatchEvent(new CustomEvent('ZenTabIconChanged', { bubbles: true, detail: { tab } }));
|
|
||||||
const iconUrl = url ?? tab.iconImage.src;
|
const iconUrl = url ?? tab.iconImage.src;
|
||||||
if (!iconUrl && tab.hasAttribute('zen-pin-id')) {
|
if (!iconUrl && tab.hasAttribute('zen-pin-id')) {
|
||||||
try {
|
try {
|
||||||
@@ -1467,7 +1466,6 @@
|
|||||||
}
|
}
|
||||||
|
|
||||||
async onTabLabelChanged(tab) {
|
async onTabLabelChanged(tab) {
|
||||||
tab.dispatchEvent(new CustomEvent('ZenTabLabelChanged', { detail: { tab } }));
|
|
||||||
if (!this._pinsCache) {
|
if (!this._pinsCache) {
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@@ -156,25 +156,25 @@
|
|||||||
Pinned Tabs Separator
|
Pinned Tabs Separator
|
||||||
========================================================================== */
|
========================================================================== */
|
||||||
.pinned-tabs-container-separator {
|
.pinned-tabs-container-separator {
|
||||||
background: light-dark(rgba(1, 1, 1, 0.075), rgba(255, 255, 255, 0.1));
|
background: light-dark(rgba(0, 0, 0, 0.1), rgba(255, 255, 255, 0.1));
|
||||||
margin: 8px auto;
|
margin: 8px auto;
|
||||||
border: none;
|
border: none;
|
||||||
height: 1px;
|
height: 1px;
|
||||||
max-height: 1px;
|
max-height: 1px;
|
||||||
width: 98%; /* Slightly less than full width */
|
width: 98%; /* Slightly less than full width */
|
||||||
transition:
|
transition:
|
||||||
margin 0.2s ease-in-out,
|
margin 0.1s ease-in-out,
|
||||||
background 0.2s ease-in-out,
|
background 0.1s ease-in-out,
|
||||||
max-height 0.2s ease-in-out;
|
max-height 0.1s ease-in-out;
|
||||||
overflow: hidden;
|
overflow: hidden;
|
||||||
position: relative;
|
position: relative;
|
||||||
opacity: 1;
|
opacity: 1;
|
||||||
|
|
||||||
#tabbrowser-tabs[movingtab] & {
|
#tabbrowser-tabs[movingtab] & {
|
||||||
transition:
|
transition:
|
||||||
margin 0.2s ease-in-out,
|
margin 0.1s ease-in-out,
|
||||||
background 0.2s ease-in-out,
|
background 0.1s ease-in-out,
|
||||||
max-height 0.2s ease-in-out,
|
max-height 0.1s ease-in-out,
|
||||||
transform 0.1s ease-in-out;
|
transform 0.1s ease-in-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -1,257 +0,0 @@
|
|||||||
// This Source Code Form is subject to the terms of the Mozilla Public
|
|
||||||
// License, v. 2.0. If a copy of the MPL was not distributed with this
|
|
||||||
// file, You can obtain one at http://mozilla.org/MPL/2.0/.
|
|
||||||
{
|
|
||||||
class nsZenWorkspaceWindowSync extends nsZenMultiWindowFeature {
|
|
||||||
#ignoreNextEvents = false;
|
|
||||||
#waitForPromise = null;
|
|
||||||
|
|
||||||
constructor() {
|
|
||||||
super();
|
|
||||||
if (!window.closed) {
|
|
||||||
this.init();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async init() {
|
|
||||||
await gZenWorkspaces.promiseInitialized;
|
|
||||||
this.#makeSureAllTabsHaveIds();
|
|
||||||
this.#setUpEventListeners();
|
|
||||||
}
|
|
||||||
|
|
||||||
#makeSureAllTabsHaveIds() {
|
|
||||||
const allTabs = gZenWorkspaces.allStoredTabs;
|
|
||||||
for (const tab of allTabs) {
|
|
||||||
if (!tab.hasAttribute('zen-sync-id')) {
|
|
||||||
const tabId = gZenUIManager.generateUuidv4();
|
|
||||||
tab.setAttribute('zen-sync-id', tabId);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#setUpEventListeners() {
|
|
||||||
const kEvents = [
|
|
||||||
'TabClose',
|
|
||||||
'TabOpen',
|
|
||||||
'TabPinned',
|
|
||||||
'TabUnpinned',
|
|
||||||
'TabAddedToEssentials',
|
|
||||||
'TabRemovedFromEssentials',
|
|
||||||
'TabHide',
|
|
||||||
'TabShow',
|
|
||||||
'TabMove',
|
|
||||||
'ZenTabIconChanged',
|
|
||||||
'ZenTabLabelChanged',
|
|
||||||
];
|
|
||||||
const eventListener = this.#handleEvent.bind(this);
|
|
||||||
for (const event of kEvents) {
|
|
||||||
window.addEventListener(event, eventListener);
|
|
||||||
}
|
|
||||||
|
|
||||||
window.addEventListener('unload', () => {
|
|
||||||
for (const event of kEvents) {
|
|
||||||
window.removeEventListener(event, eventListener);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
#handleEvent(event) {
|
|
||||||
this.#propagateToOtherWindows(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
async #propagateToOtherWindows(event) {
|
|
||||||
if (this.#ignoreNextEvents) {
|
|
||||||
return;
|
|
||||||
}
|
|
||||||
if (this.#waitForPromise) {
|
|
||||||
await this.#waitForPromise;
|
|
||||||
}
|
|
||||||
this.#waitForPromise = new Promise((resolve) => {
|
|
||||||
this.foreachWindowAsActive(async (browser) => {
|
|
||||||
if (browser.gZenWorkspaceWindowSync && !this.windowIsActive(browser)) {
|
|
||||||
await browser.gZenWorkspaceWindowSync.onExternalTabEvent(event);
|
|
||||||
}
|
|
||||||
}).then(() => {
|
|
||||||
resolve();
|
|
||||||
});
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
async onExternalTabEvent(event) {
|
|
||||||
this.#ignoreNextEvents = true;
|
|
||||||
switch (event.type) {
|
|
||||||
case 'TabClose':
|
|
||||||
this.#onTabClose(event);
|
|
||||||
break;
|
|
||||||
case 'TabOpen':
|
|
||||||
await this.#onTabOpen(event);
|
|
||||||
break;
|
|
||||||
case 'TabPinned':
|
|
||||||
this.#onTabPinned(event);
|
|
||||||
break;
|
|
||||||
case 'TabUnpinned':
|
|
||||||
this.#onTabUnpinned(event);
|
|
||||||
break;
|
|
||||||
case 'TabAddedToEssentials':
|
|
||||||
this.#onTabAddedToEssentials(event);
|
|
||||||
break;
|
|
||||||
case 'TabRemovedFromEssentials':
|
|
||||||
this.#onTabRemovedFromEssentials(event);
|
|
||||||
break;
|
|
||||||
case 'TabHide':
|
|
||||||
this.#onTabHide(event);
|
|
||||||
break;
|
|
||||||
case 'TabShow':
|
|
||||||
this.#onTabShow(event);
|
|
||||||
break;
|
|
||||||
case 'TabMove':
|
|
||||||
this.#onTabMove(event);
|
|
||||||
break;
|
|
||||||
case 'ZenTabIconChanged':
|
|
||||||
this.#onTabIconChanged(event);
|
|
||||||
break;
|
|
||||||
case 'ZenTabLabelChanged':
|
|
||||||
this.#onTabLabelChanged(event);
|
|
||||||
break;
|
|
||||||
default:
|
|
||||||
console.warn(`Unhandled event type: ${event.type}`);
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
this.#ignoreNextEvents = false;
|
|
||||||
}
|
|
||||||
|
|
||||||
#getTabId(tab) {
|
|
||||||
return tab.getAttribute('zen-sync-id');
|
|
||||||
}
|
|
||||||
|
|
||||||
#getTabWithId(tabId) {
|
|
||||||
for (const tab of gZenWorkspaces.allStoredTabs) {
|
|
||||||
if (this.#getTabId(tab) === tabId) {
|
|
||||||
return tab;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return null;
|
|
||||||
}
|
|
||||||
|
|
||||||
#onTabClose(event) {
|
|
||||||
const targetTab = event.target;
|
|
||||||
const tabId = this.#getTabId(targetTab);
|
|
||||||
const tabToClose = this.#getTabWithId(tabId);
|
|
||||||
if (tabToClose) {
|
|
||||||
gBrowser.removeTab(tabToClose);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#onTabPinned(event) {
|
|
||||||
const targetTab = event.target;
|
|
||||||
if (targetTab.hasAttribute('zen-essential')) {
|
|
||||||
return this.#onTabAddedToEssentials(event);
|
|
||||||
}
|
|
||||||
const tabId = this.#getTabId(targetTab);
|
|
||||||
const elementIndex = targetTab.elementIndex;
|
|
||||||
const tabToPin = this.#getTabWithId(tabId);
|
|
||||||
if (tabToPin) {
|
|
||||||
gBrowser.pinTab(tabToPin);
|
|
||||||
gBrowser.moveTabTo(tabToPin, { elementIndex, forceUngrouped: !!targetTab.group });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#onTabUnpinned(event) {
|
|
||||||
const targetTab = event.target;
|
|
||||||
const tabId = this.#getTabId(targetTab);
|
|
||||||
const tabToUnpin = this.#getTabWithId(tabId);
|
|
||||||
if (tabToUnpin) {
|
|
||||||
gBrowser.unpinTab(tabToUnpin);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#onTabIconChanged(event) {
|
|
||||||
this.#updateTabIconAndLabel(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
#onTabLabelChanged(event) {
|
|
||||||
this.#updateTabIconAndLabel(event);
|
|
||||||
}
|
|
||||||
|
|
||||||
#updateTabIconAndLabel(event) {
|
|
||||||
const targetTab = event.target;
|
|
||||||
const tabId = this.#getTabId(targetTab);
|
|
||||||
const tabToChange = this.#getTabWithId(tabId);
|
|
||||||
if (tabToChange && tabToChange.hasAttribute('pending')) {
|
|
||||||
gBrowser.setIcon(tabToChange, gBrowser.getIcon(targetTab));
|
|
||||||
gBrowser._setTabLabel(tabToChange, targetTab.label);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#onTabAddedToEssentials(event) {
|
|
||||||
const targetTab = event.target;
|
|
||||||
const tabId = this.#getTabId(targetTab);
|
|
||||||
const tabToAdd = this.#getTabWithId(tabId);
|
|
||||||
if (tabToAdd) {
|
|
||||||
gZenPinnedTabManager.addToEssentials(tabToAdd);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#onTabRemovedFromEssentials(event) {
|
|
||||||
const targetTab = event.target;
|
|
||||||
const tabId = this.#getTabId(targetTab);
|
|
||||||
const tabToRemove = this.#getTabWithId(tabId);
|
|
||||||
if (tabToRemove) {
|
|
||||||
gZenPinnedTabManager.removeFromEssentials(tabToRemove);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#onTabHide(event) {
|
|
||||||
const targetTab = event.target;
|
|
||||||
const tabId = this.#getTabId(targetTab);
|
|
||||||
const tabToHide = this.#getTabWithId(tabId);
|
|
||||||
if (tabToHide) {
|
|
||||||
gBrowser.hideTab(tabToHide);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#onTabShow(event) {
|
|
||||||
const targetTab = event.target;
|
|
||||||
const tabId = this.#getTabId(targetTab);
|
|
||||||
const tabToShow = this.#getTabWithId(tabId);
|
|
||||||
if (tabToShow) {
|
|
||||||
gBrowser.showTab(tabToShow);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
#onTabMove(event) {
|
|
||||||
const targetTab = event.target;
|
|
||||||
const tabId = this.#getTabId(targetTab);
|
|
||||||
const tabIndex = targetTab._pPos;
|
|
||||||
const tabToMove = this.#getTabWithId(tabId);
|
|
||||||
if (tabToMove) {
|
|
||||||
gBrowser.moveTabTo(tabToMove, { tabIndex, forceUngrouped: !!targetTab.group });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
async #onTabOpen(event) {
|
|
||||||
const targetTab = event.target;
|
|
||||||
const isPinned = targetTab.pinned;
|
|
||||||
const isEssential = isPinned && targetTab.hasAttribute('zen-essential');
|
|
||||||
const elementIndex = targetTab.elementIndex;
|
|
||||||
|
|
||||||
const duplicatedTab = gBrowser.addTrustedTab(targetTab.linkedBrowser.currentURI.spec, {
|
|
||||||
createLazyBrowser: true,
|
|
||||||
});
|
|
||||||
|
|
||||||
duplicatedTab.setAttribute('zen-pin-id', targetTab.getAttribute('zen-pin-id'));
|
|
||||||
duplicatedTab.setAttribute('zen-tab-id', targetTab.getAttribute('zen-tab-id'));
|
|
||||||
duplicatedTab.setAttribute('zen-workspace-id', targetTab.getAttribute('zen-workspace-id'));
|
|
||||||
|
|
||||||
if (isEssential) {
|
|
||||||
gZenPinnedTabManager.addToEssentials(duplicatedTab);
|
|
||||||
} else if (isPinned) {
|
|
||||||
gBrowser.pinTab(duplicatedTab);
|
|
||||||
}
|
|
||||||
|
|
||||||
gBrowser.moveTabTo(duplicatedTab, { elementIndex, forceUngrouped: !!targetTab.group });
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
window.gZenWorkspaceWindowSync = new nsZenWorkspaceWindowSync();
|
|
||||||
}
|
|
@@ -27,6 +27,7 @@
|
|||||||
</hbox>
|
</hbox>
|
||||||
</vbox>
|
</vbox>
|
||||||
</arrowscrollbox>
|
</arrowscrollbox>
|
||||||
|
<vbox class="zen-workspace-empty-space" flex="1" />
|
||||||
`;
|
`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@@ -926,6 +926,7 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
|||||||
await this.initializeTabsStripSections();
|
await this.initializeTabsStripSections();
|
||||||
this._initializeEmptyTab();
|
this._initializeEmptyTab();
|
||||||
await gZenPinnedTabManager.refreshPinnedTabs({ init: true });
|
await gZenPinnedTabManager.refreshPinnedTabs({ init: true });
|
||||||
|
this._invalidateBookmarkContainers();
|
||||||
await this.changeWorkspace(activeWorkspace, { onInit: true });
|
await this.changeWorkspace(activeWorkspace, { onInit: true });
|
||||||
this.#fixTabPositions();
|
this.#fixTabPositions();
|
||||||
this.onWindowResize();
|
this.onWindowResize();
|
||||||
@@ -1492,8 +1493,8 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
|||||||
if (container) {
|
if (container) {
|
||||||
if (tab.group?.hasAttribute('split-view-group')) {
|
if (tab.group?.hasAttribute('split-view-group')) {
|
||||||
gBrowser.zenHandleTabMove(tab.group, () => {
|
gBrowser.zenHandleTabMove(tab.group, () => {
|
||||||
for (const tab of tab.group.tabs) {
|
for (const subTab of tab.group.tabs) {
|
||||||
tab.setAttribute('zen-workspace-id', workspaceID);
|
subTab.setAttribute('zen-workspace-id', workspaceID);
|
||||||
}
|
}
|
||||||
container.insertBefore(tab.group, container.lastChild);
|
container.insertBefore(tab.group, container.lastChild);
|
||||||
});
|
});
|
||||||
|
@@ -317,15 +317,14 @@ zen-workspace {
|
|||||||
opacity: 1;
|
opacity: 1;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
&,
|
&[active] .zen-workspace-empty-space {
|
||||||
& .zen-workspace-normal-tabs-section {
|
-moz-window-dragging: drag;
|
||||||
height: 100%;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/** Customiable UI, this is an auto generated ID */
|
/** Customizable UI, this is an auto generated ID */
|
||||||
#wrapper-zen-workspaces-button {
|
#wrapper-zen-workspaces-button {
|
||||||
width: 100%;
|
width: 100%;
|
||||||
}
|
}
|
||||||
|
@@ -19,7 +19,7 @@
|
|||||||
"brandShortName": "Zen",
|
"brandShortName": "Zen",
|
||||||
"brandFullName": "Zen Browser",
|
"brandFullName": "Zen Browser",
|
||||||
"release": {
|
"release": {
|
||||||
"displayVersion": "1.15.3b",
|
"displayVersion": "1.15.5b",
|
||||||
"github": {
|
"github": {
|
||||||
"repo": "zen-browser/desktop"
|
"repo": "zen-browser/desktop"
|
||||||
},
|
},
|
||||||
@@ -39,7 +39,7 @@
|
|||||||
"brandShortName": "Twilight",
|
"brandShortName": "Twilight",
|
||||||
"brandFullName": "Zen Twilight",
|
"brandFullName": "Zen Twilight",
|
||||||
"release": {
|
"release": {
|
||||||
"displayVersion": "1.15t",
|
"displayVersion": "1.16t",
|
||||||
"github": {
|
"github": {
|
||||||
"repo": "zen-browser/desktop"
|
"repo": "zen-browser/desktop"
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user