mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-17 15:21:53 +00:00
Compare commits
91 Commits
zen-settin
...
1.10.3b
Author | SHA1 | Date | |
---|---|---|---|
![]() |
1c1d4697e5 | ||
![]() |
d011bb9497 | ||
![]() |
a4e703f2fd | ||
![]() |
360079d15e | ||
![]() |
1473675094 | ||
![]() |
a6e03680eb | ||
![]() |
c99d3d37db | ||
![]() |
b2fa05fa22 | ||
![]() |
77070be769 | ||
![]() |
3467e5070f | ||
![]() |
5fb8fe86de | ||
![]() |
afea93d327 | ||
![]() |
53ec2f15b6 | ||
![]() |
342186584e | ||
![]() |
bd5d3c00f1 | ||
![]() |
53eeb4e921 | ||
![]() |
f2909fb3bd | ||
![]() |
1039f1db38 | ||
![]() |
741ae9eb1e | ||
![]() |
76ff984b9c | ||
![]() |
f89478bf67 | ||
![]() |
f530c389a4 | ||
![]() |
a1ab0512b7 | ||
![]() |
3dad9896eb | ||
![]() |
ff9b0c79c0 | ||
![]() |
19ed3fb303 | ||
![]() |
09dd3c94c1 | ||
![]() |
e79afc87ca | ||
![]() |
f3ff74b0df | ||
![]() |
569ee488f5 | ||
![]() |
68ebe2d503 | ||
![]() |
8939e889f0 | ||
![]() |
796a52625e | ||
![]() |
0fbc5178f6 | ||
![]() |
d1505287b2 | ||
![]() |
8959adf9e0 | ||
![]() |
5961462cd7 | ||
![]() |
af0eeb710e | ||
![]() |
75a75d78ec | ||
![]() |
ddd8eb6da4 | ||
![]() |
d9d8437b6d | ||
![]() |
c2f2a589ed | ||
![]() |
c3d09c486c | ||
![]() |
897e817f3c | ||
![]() |
491234b310 | ||
![]() |
408206ace3 | ||
![]() |
4ec493950c | ||
![]() |
4f140893c9 | ||
![]() |
9c7c44cb49 | ||
![]() |
ba89f392d6 | ||
![]() |
04308fbaea | ||
![]() |
5d1021350d | ||
![]() |
800dae11e8 | ||
![]() |
ba5f816772 | ||
![]() |
1651956cbd | ||
![]() |
4a9967b8d0 | ||
![]() |
109eb96c08 | ||
![]() |
5d0807de4c | ||
![]() |
2d7832b132 | ||
![]() |
a7e2a05d80 | ||
![]() |
d36ce36235 | ||
![]() |
34c78dff52 | ||
![]() |
bd8a2fb287 | ||
![]() |
38770d9393 | ||
![]() |
c65e747dd2 | ||
![]() |
53f2baf52b | ||
![]() |
5b9be518b8 | ||
![]() |
e0de3b410b | ||
![]() |
2b1f2fe019 | ||
![]() |
37b5ab916c | ||
![]() |
af261e126a | ||
![]() |
2cbec90c96 | ||
![]() |
01c5bd61ef | ||
![]() |
e01291afd6 | ||
![]() |
a53b3130c8 | ||
![]() |
dea4818128 | ||
![]() |
2609248564 | ||
![]() |
5749879c1c | ||
![]() |
1f3b3f15ab | ||
![]() |
09c0f5143d | ||
![]() |
025f994c62 | ||
![]() |
ad04961d19 | ||
![]() |
b5c5bd5980 | ||
![]() |
bfe83dd653 | ||
![]() |
d808e72d2a | ||
![]() |
02a860ba19 | ||
![]() |
8902f3202e | ||
![]() |
c17779b6d4 | ||
![]() |
7f6c5f7211 | ||
![]() |
45f49738f3 | ||
![]() |
cf0662d0a4 |
3
.github/workflows/build.yml
vendored
3
.github/workflows/build.yml
vendored
@@ -51,7 +51,6 @@ jobs:
|
||||
echo "update_branch: ${{ inputs.update_branch }}"
|
||||
echo "GITHUB_REPOSITORY: ${{ github.repository }}"
|
||||
echo "GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}"
|
||||
echo "GITHUB_REPOSITORY_OWNER: ${{ github.repository_owner }}"
|
||||
echo "GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}"
|
||||
|
||||
buildid:
|
||||
@@ -517,6 +516,8 @@ jobs:
|
||||
repository: ./updates-server
|
||||
|
||||
- name: Generate Release Notes
|
||||
env:
|
||||
RELEASE_BRANCH: ${{ inputs.update_branch }}
|
||||
run: bash .github/workflows/src/generate_release_notes.sh
|
||||
|
||||
# If we are on Twilight, we want to just update the Twilight tag's release
|
||||
|
@@ -6,7 +6,7 @@
|
||||
[](https://crowdin.com/project/zen-browser)
|
||||
[](https://github.com/zen-browser/desktop/actions/workflows/build.yml)
|
||||
|
||||
✨ Experience tranquillity while browsing the web without people tracking you! Zen is a privacy-focused browser that blocks trackers, ads, and other unwanted content while offering the best browsing experience!
|
||||
✨ Experience tranquillity while browsing the internet with Zen! Our mission is to give you a balance between speed, privacy and productivity!
|
||||
|
||||
<div flex="true">
|
||||
<a href="https://zen-browser.app/download">
|
||||
@@ -28,7 +28,7 @@
|
||||
|
||||
## 🖥️ Compatibility
|
||||
|
||||
Zen is currently built using Firefox version `136.0.1`! 🚀
|
||||
Zen is currently built using Firefox version `136.0.2`! 🚀
|
||||
|
||||
- [`Zen Twilight`](https://zen-browser.app/download?twilight) - Is currently built using Firefox version `RC 136.0`!
|
||||
- Check out the latest [release notes](https://zen-browser.app/release-notes)!
|
||||
|
@@ -1 +1 @@
|
||||
6ad0ab3c43a6208d8bcd997b40e802fccd48ba0a
|
||||
e234130176d2813fec2397bbf3a313909565006e
|
@@ -28,7 +28,7 @@ finish-args:
|
||||
- --system-talk-name=org.freedesktop.NetworkManager
|
||||
- --talk-name=org.a11y.Bus
|
||||
- --env=GTK_PATH=/app/lib/gtkmodules
|
||||
- --env=MESA_SHADER_CACHE_DIR=$XDG_RUNTIME_DIR/app/$FLATPAK_ID/cache/mesa_shader_cache_db
|
||||
- --env=MESA_SHADER_CACHE_DIR=/var/cache/mesa_shader_cache_db
|
||||
modules:
|
||||
- name: zen_browser
|
||||
buildsystem: simple
|
||||
|
2
l10n
2
l10n
Submodule l10n updated: c5a36ae64f...778cb128c6
@@ -64,6 +64,12 @@ def update_l10n_last_commit_hash():
|
||||
if not os.path.exists("firefox-cache"):
|
||||
os.mkdir("firefox-cache")
|
||||
os.system("cat l10n-temp/.git/refs/heads/main > firefox-cache/l10n-last-commit-hash")
|
||||
# Remove new line character
|
||||
data = ""
|
||||
with open("firefox-cache/l10n-last-commit-hash", "r") as f:
|
||||
data = f.read()
|
||||
with open("firefox-cache/l10n-last-commit-hash", "w") as f:
|
||||
f.write(data.strip())
|
||||
except KeyboardInterrupt:
|
||||
print("Exiting...")
|
||||
shutil.rmtree("l10n-temp")
|
||||
|
@@ -2,10 +2,11 @@ import os
|
||||
import subprocess
|
||||
import logging
|
||||
|
||||
# Set up logging
|
||||
logging.basicConfig(level=logging.INFO)
|
||||
logging.basicConfig(
|
||||
level=logging.INFO,
|
||||
format='%(asctime)s - %(levelname)s - %(message)s'
|
||||
)
|
||||
|
||||
# Constants for paths
|
||||
NEW_TAB_DIR = "./engine/browser/components/newtab"
|
||||
ENGINE_DIR = "./engine"
|
||||
NPM_INSTALL_COMMANDS = ["npm install", "npm install meow@9.0.0"]
|
||||
@@ -13,27 +14,62 @@ BUNDLE_COMMAND = "npm run bundle --prefix=browser/components/newtab"
|
||||
|
||||
|
||||
def install_dependencies():
|
||||
"""Install necessary npm packages for the newtab component."""
|
||||
if not os.path.isdir(NEW_TAB_DIR):
|
||||
logging.error(f"Directory not found: {NEW_TAB_DIR}")
|
||||
raise FileNotFoundError(f"New tab directory {NEW_TAB_DIR} does not exist")
|
||||
|
||||
for command in NPM_INSTALL_COMMANDS:
|
||||
logging.info(f"Running command: {command} in {NEW_TAB_DIR}")
|
||||
subprocess.run(command.split(), cwd=NEW_TAB_DIR, check=True)
|
||||
try:
|
||||
logging.info(f"Running command: {command} in {NEW_TAB_DIR}")
|
||||
subprocess.run(
|
||||
command.split(),
|
||||
cwd=NEW_TAB_DIR,
|
||||
check=True,
|
||||
capture_output=True,
|
||||
text=True
|
||||
)
|
||||
logging.info(f"Successfully executed: {command}")
|
||||
except subprocess.CalledProcessError as e:
|
||||
logging.error(f"Command failed: {command} - {e.stderr}")
|
||||
raise
|
||||
|
||||
|
||||
def bundle_newtab_components():
|
||||
"""Bundle the newtab components."""
|
||||
logging.info(f"Bundling newtab components in {ENGINE_DIR}")
|
||||
subprocess.run(BUNDLE_COMMAND.split(), cwd=ENGINE_DIR, check=True)
|
||||
if not os.path.isdir(ENGINE_DIR):
|
||||
logging.error(f"Directory not found: {ENGINE_DIR}")
|
||||
raise FileNotFoundError(f"Engine directory {ENGINE_DIR} does not exist")
|
||||
|
||||
try:
|
||||
logging.info(f"Bundling newtab components in {ENGINE_DIR}")
|
||||
result = subprocess.run(
|
||||
BUNDLE_COMMAND.split(),
|
||||
cwd=ENGINE_DIR,
|
||||
check=True,
|
||||
capture_output=True,
|
||||
text=True
|
||||
)
|
||||
logging.info(f"Bundle completed successfully: {result.stdout}")
|
||||
except subprocess.CalledProcessError as e:
|
||||
logging.error(f"Bundle failed: {e.stderr}")
|
||||
raise
|
||||
|
||||
|
||||
def update_newtab(init: bool = True):
|
||||
"""Update the newtab components, optionally initializing dependencies."""
|
||||
try:
|
||||
if init:
|
||||
logging.info("Starting dependency installation")
|
||||
install_dependencies()
|
||||
logging.info("Dependencies installed successfully")
|
||||
|
||||
logging.info("Starting bundle process")
|
||||
bundle_newtab_components()
|
||||
except subprocess.CalledProcessError as e:
|
||||
logging.error(f"An error occurred: {e}")
|
||||
logging.info("Newtab update completed successfully")
|
||||
|
||||
except (subprocess.CalledProcessError, FileNotFoundError) as e:
|
||||
logging.error(f"Update process failed: {str(e)}")
|
||||
raise
|
||||
except Exception as e:
|
||||
logging.error(f"Unexpected error: {str(e)}")
|
||||
raise
|
||||
|
||||
|
||||
|
@@ -90,6 +90,8 @@ pref('zen.tabs.show-newtab-vertical', true);
|
||||
pref('zen.view.show-newtab-button-border-top', false);
|
||||
pref('zen.view.show-newtab-button-top', true);
|
||||
|
||||
pref('zen.mediacontrols.enabled', true);
|
||||
|
||||
#ifdef MOZILLA_OFFICIAL
|
||||
pref('zen.rice.api.url', 'https://share.zen-browser.app', locked);
|
||||
pref('zen.injections.match-urls', 'https://zen-browser.app/*,https://share.zen-browser.app/*', locked);
|
||||
@@ -199,7 +201,6 @@ pref('zen.startup.smooth-scroll-in-tabs', true);
|
||||
|
||||
// Zen Workspaces
|
||||
pref('zen.workspaces.disabled_for_testing', false);
|
||||
pref('zen.workspaces.hide-deactivated-workspaces', false);
|
||||
pref('zen.workspaces.hide-default-container-indicator', true);
|
||||
pref('zen.workspaces.force-container-workspace', false);
|
||||
pref('zen.workspaces.open-new-tab-if-last-unpinned-tab-is-closed', false);
|
||||
@@ -255,7 +256,7 @@ pref('browser.migrate.opera.enabled', true);
|
||||
// pref('network.trr.mode', 5);
|
||||
|
||||
// security: They must enable this themselves, to avoid people downloading malware
|
||||
pref('xpinstall.signatures.required', false);
|
||||
pref('xpinstall.signatures.required', true);
|
||||
|
||||
// Experimental Zen Features
|
||||
// Strategy to use for bytecode cache (Thanks https://github.com/gunir)
|
||||
|
@@ -250,7 +250,7 @@ var gZenUIManager = {
|
||||
const toast = this._createToastElement(messageId, options);
|
||||
this._toastContainer.removeAttribute('hidden');
|
||||
this._toastContainer.appendChild(toast);
|
||||
await this.motion.animate(toast, { opacity: [0, 1], scale: [0.8, 1] }, { type: 'spring', bounce: 0.5, duration: 0.5 });
|
||||
await this.motion.animate(toast, { opacity: [0, 1], scale: [0.8, 1] }, { type: 'spring', bounce: 0.5, duration: 0.7 });
|
||||
await new Promise((resolve) => setTimeout(resolve, 3000));
|
||||
await this.motion.animate(toast, { opacity: [1, 0], scale: [1, 0.9] }, { duration: 0.2, bounce: 0 });
|
||||
const toastHeight = toast.getBoundingClientRect().height;
|
||||
@@ -265,14 +265,6 @@ var gZenUIManager = {
|
||||
get panelUIPosition() {
|
||||
return gZenVerticalTabsManager._hasSetSingleToolbar ? 'bottomleft topleft' : 'bottomright topright';
|
||||
},
|
||||
|
||||
openSettingsWindow() {
|
||||
window.openDialog(
|
||||
'chrome://browser/content/zen-components/windows/zen-settings.xhtml',
|
||||
'_blank',
|
||||
'centerscreen,chrome,dialog=no,resizable=no,titlebar'
|
||||
);
|
||||
},
|
||||
};
|
||||
|
||||
var gZenVerticalTabsManager = {
|
||||
|
@@ -52,8 +52,6 @@
|
||||
content/browser/zen-styles/zen-welcome.css (content/zen-styles/zen-welcome.css)
|
||||
content/browser/zen-styles/zen-media-controls.css (content/zen-styles/zen-media-controls.css)
|
||||
|
||||
content/browser/zen-styles/windows/zen-settings.css (content/zen-styles/windows/zen-settings.css)
|
||||
|
||||
content/browser/zen-styles/zen-panels/bookmarks.css (content/zen-styles/zen-panels/bookmarks.css)
|
||||
content/browser/zen-styles/zen-panels/extensions.css (content/zen-styles/zen-panels/extensions.css)
|
||||
content/browser/zen-styles/zen-panels/print.css (content/zen-styles/zen-panels/print.css)
|
||||
@@ -83,6 +81,3 @@
|
||||
# JS Vendor
|
||||
content/browser/zen-vendor/tsparticles.confetti.bundle.min.js (content/zen-vendor/tsparticles.confetti.bundle.min.js)
|
||||
content/browser/zen-vendor/motion.min.mjs (content/zen-vendor/motion.min.mjs)
|
||||
|
||||
# Windows
|
||||
content/browser/zen-components/windows/zen-settings.xhtml (zen-components/windows/zen-settings.xhtml)
|
||||
|
@@ -1,49 +0,0 @@
|
||||
@namespace html 'http://www.w3.org/1999/xhtml';
|
||||
@namespace xul 'http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul';
|
||||
|
||||
* {
|
||||
margin: 0;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
:root {
|
||||
font: message-box;
|
||||
}
|
||||
|
||||
body {
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
#main-content {
|
||||
background: var(--zen-themed-toolbar-bg-transparent);
|
||||
@supports (-moz-osx-font-smoothing: auto) {
|
||||
appearance: -moz-window-titlebar;
|
||||
}
|
||||
|
||||
user-select: none;
|
||||
touch-action: none;
|
||||
pointer-events: auto;
|
||||
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
|
||||
overflow-x: hidden;
|
||||
overflow-y: auto;
|
||||
|
||||
gap: 2rem;
|
||||
padding: 1rem;
|
||||
}
|
||||
|
||||
.section {
|
||||
width: 100%;
|
||||
position: relative;
|
||||
gap: 0.6rem;
|
||||
|
||||
.section-content {
|
||||
width: 100%;
|
||||
background: var(--zen-toolbar-element-bg);
|
||||
border-radius: 6px;
|
||||
padding: 1em;
|
||||
font-size: 1.1em;
|
||||
}
|
||||
}
|
@@ -109,7 +109,7 @@
|
||||
}
|
||||
|
||||
#zen-main-app-wrapper {
|
||||
background: transparent;
|
||||
background: var(--zen-themed-toolbar-bg-transparent);
|
||||
overflow: hidden;
|
||||
|
||||
& > * {
|
||||
|
@@ -58,6 +58,11 @@ tab-group[split-view-group] {
|
||||
right: 50%;
|
||||
transform: translateX(50%);
|
||||
}
|
||||
|
||||
& .tab-content {
|
||||
min-width: 0;
|
||||
justify-content: unset !important;
|
||||
}
|
||||
}
|
||||
|
||||
&:has(> tab:is([visuallyselected], [multiselected])) {
|
||||
|
@@ -5,7 +5,7 @@
|
||||
*/
|
||||
|
||||
#PanelUI-zen-gradient-generator {
|
||||
--panel-width: 300px;
|
||||
--panel-width: 320px;
|
||||
--panel-padding: 10px;
|
||||
min-width: var(--panel-width);
|
||||
}
|
||||
|
@@ -141,7 +141,6 @@
|
||||
background-color: var(--zen-media-control-bg);
|
||||
backdrop-filter: saturate(3) contrast(2) blur(10px);
|
||||
width: 100%;
|
||||
will-change: transform;
|
||||
}
|
||||
|
||||
.show-on-hover {
|
||||
@@ -163,6 +162,7 @@
|
||||
font-size: x-small;
|
||||
opacity: 0.7;
|
||||
font-weight: 500;
|
||||
font-variant-numeric: tabular-nums;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -351,18 +351,30 @@ menuitem {
|
||||
#zen-toast-container {
|
||||
position: fixed;
|
||||
top: calc(var(--zen-element-separation) * 2);
|
||||
right: calc(var(--zen-element-separation) * 2);
|
||||
z-index: 1000;
|
||||
gap: 1rem;
|
||||
display: flex;
|
||||
align-items: end;
|
||||
|
||||
:root:not([zen-right-side='true']) & {
|
||||
right: calc(var(--zen-element-separation) * 2);
|
||||
}
|
||||
|
||||
:root[zen-right-side='true'] & {
|
||||
left: calc(var(--zen-element-separation) * 2);
|
||||
}
|
||||
|
||||
& .zen-toast {
|
||||
padding: 0.9rem 0.8rem;
|
||||
padding: 0.5rem 0.6rem;
|
||||
border-radius: 12px;
|
||||
background: linear-gradient(170deg, light-dark(rgb(187, 187, 187), rgb(240, 240, 240)) -40%, var(--zen-primary-color) 140%);
|
||||
background: linear-gradient(
|
||||
170deg,
|
||||
var(--zen-primary-color) -40%,
|
||||
color-mix(in srgb, var(--zen-primary-color) 85%, #0f0f0f 15%)
|
||||
);
|
||||
color: var(--button-primary-color);
|
||||
box-shadow: 0 0 16px 3px rgba(0, 0, 0, 0.1);
|
||||
box-shadow: 0 0 14px 3px rgba(0, 0, 0, 0.05);
|
||||
border: 1px solid rgba(0, 0, 0, 0.1);
|
||||
display: flex;
|
||||
font-weight: 500;
|
||||
gap: 5px;
|
||||
|
@@ -111,7 +111,7 @@
|
||||
background: transparent;
|
||||
border: none;
|
||||
cursor: ew-resize;
|
||||
z-index: 2;
|
||||
z-index: 3;
|
||||
|
||||
&:is(.zen-split-view-splitter[orient='vertical']) {
|
||||
/* Bit of a hacky solution, but it works */
|
||||
|
@@ -269,7 +269,7 @@
|
||||
}
|
||||
|
||||
#tabbrowser-tabs:not([movingtab]) & .tab-content > image:active {
|
||||
scale: var(--zen-active-tab-scale);
|
||||
scale: 0.92;
|
||||
}
|
||||
|
||||
& .tab-icon-image {
|
||||
@@ -474,9 +474,6 @@
|
||||
}
|
||||
|
||||
& #zen-workspaces-button {
|
||||
margin-left: 2px;
|
||||
margin-right: 2px;
|
||||
|
||||
& .zen-workspace-sidebar-icon[no-icon='true'] {
|
||||
display: none;
|
||||
}
|
||||
@@ -1050,14 +1047,14 @@
|
||||
#zen-essentials-container {
|
||||
padding-bottom: var(--zen-toolbox-padding);
|
||||
overflow: hidden;
|
||||
gap: 3px;
|
||||
gap: calc(var(--zen-toolbox-padding) - 2px);
|
||||
}
|
||||
|
||||
#zen-essentials-container {
|
||||
overflow: hidden;
|
||||
transition: max-height 0.3s ease-out;
|
||||
opacity: 1;
|
||||
grid-template-columns: repeat(auto-fit, minmax(48px, auto));
|
||||
grid-template-columns: repeat(auto-fit, minmax(49px, auto));
|
||||
overflow: hidden;
|
||||
scrollbar-width: thin;
|
||||
display: grid;
|
||||
@@ -1109,7 +1106,7 @@
|
||||
&::after {
|
||||
content: "";
|
||||
inset: -50%;
|
||||
filter: blur(15px) brightness(1.2);
|
||||
filter: blur(20px);
|
||||
position: absolute;
|
||||
background-size: 100% 100%;
|
||||
background-clip: padding-box;
|
||||
|
@@ -158,13 +158,13 @@
|
||||
--zen-themed-toolbar-bg: light-dark(rgb(240, 240, 244), #171717);
|
||||
--zen-themed-toolbar-bg-transparent: light-dark(var(--zen-branding-bg), #171717);
|
||||
|
||||
--zen-workspace-indicator-height: 45px;
|
||||
--zen-workspace-indicator-height: 48px;
|
||||
|
||||
@media (-moz-windows-mica) or (-moz-platform: macos) {
|
||||
background: transparent;
|
||||
--zen-themed-toolbar-bg-transparent: transparent;
|
||||
@media (-moz-bool-pref: 'zen.widget.windows.acrylic') {
|
||||
--zen-themed-toolbar-bg-transparent: color-mix(in srgb, var(--zen-themed-toolbar-bg) 75%, transparent 25%);
|
||||
--zen-themed-toolbar-bg-transparent: color-mix(in srgb, var(--zen-themed-toolbar-bg) 35%, transparent 65%);
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -20,13 +20,15 @@
|
||||
--toolbarbutton-hover-background: transparent !important;
|
||||
border-radius: var(--zen-button-border-radius) !important;
|
||||
background: transparent;
|
||||
padding: 2px;
|
||||
appearance: unset !important;
|
||||
height: fit-content;
|
||||
gap: 3px;
|
||||
|
||||
container-type: inline-size;
|
||||
width: 100%;
|
||||
|
||||
& toolbarbutton {
|
||||
margin: auto;
|
||||
margin: 0;
|
||||
width: 25px;
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
@@ -34,8 +36,43 @@
|
||||
align-items: center;
|
||||
position: relative;
|
||||
|
||||
@media (-moz-bool-pref: 'zen.workspaces.hide-deactivated-workspaces') {
|
||||
&:not([active='true']):not(:hover) {
|
||||
& .zen-workspace-icon[no-icon='true'] {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background: light-dark(rgba(0, 0, 0, 0.4), rgba(255, 255, 255, 0.4));
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
filter: grayscale(1);
|
||||
opacity: 0.5;
|
||||
transition:
|
||||
filter 0.2s,
|
||||
opacity 0.2s,
|
||||
width 0.1s;
|
||||
|
||||
&[active='true'],
|
||||
&:hover {
|
||||
filter: grayscale(0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--zen-toolbar-element-bg);
|
||||
}
|
||||
}
|
||||
|
||||
&[overflow] {
|
||||
gap: 0 !important;
|
||||
|
||||
& toolbarbutton {
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
& toolbarbutton:not([active='true']),
|
||||
&:has(toolbarbutton:hover) toolbarbutton[active='true'] {
|
||||
&:not(:hover) {
|
||||
width: min(var(--zen-overflowed-workspace-button-width), 25px);
|
||||
|
||||
&::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
@@ -58,33 +95,6 @@
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
& .zen-workspace-icon[no-icon='true'] {
|
||||
width: 6px;
|
||||
height: 6px;
|
||||
background: light-dark(rgba(0, 0, 0, 0.4), rgba(255, 255, 255, 0.4));
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
@media not (-moz-bool-pref: 'zen.workspaces.hide-deactivated-workspaces') {
|
||||
& {
|
||||
filter: grayscale(1);
|
||||
opacity: 0.5;
|
||||
transition:
|
||||
filter 0.2s,
|
||||
opacity 0.2s;
|
||||
}
|
||||
|
||||
&[active='true'],
|
||||
&:hover {
|
||||
filter: grayscale(0);
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: var(--zen-toolbar-element-bg);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -118,10 +128,11 @@
|
||||
|
||||
& #zen-workspaces-button {
|
||||
overflow: hidden;
|
||||
white-space: nowrap;
|
||||
text-overflow: ellipsis;
|
||||
display: flex;
|
||||
gap: 0.5ch;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
scroll-behavior: smooth;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -425,7 +436,7 @@
|
||||
}
|
||||
|
||||
.zen-current-workspace-indicator {
|
||||
padding: 15px calc(4px + var(--tab-inline-padding));
|
||||
padding: calc(15px + var(--zen-toolbox-padding)) calc(4px + var(--tab-inline-padding));
|
||||
font-weight: 600;
|
||||
position: absolute;
|
||||
max-height: var(--zen-workspace-indicator-height);
|
||||
@@ -443,11 +454,10 @@
|
||||
pointer-events: none;
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 4px;
|
||||
left: 2px;
|
||||
z-index: -1;
|
||||
width: calc(100% - 4px);
|
||||
height: calc(100% - 10px);
|
||||
top: var(--zen-toolbox-padding);
|
||||
left: calc(var(--zen-toolbox-padding) / 2);
|
||||
width: calc(100% - var(--zen-toolbox-padding));
|
||||
height: calc(100% - var(--zen-toolbox-padding) * 2);
|
||||
}
|
||||
|
||||
&:hover,
|
||||
|
@@ -394,9 +394,10 @@ var gZenCompactModeManager = {
|
||||
|
||||
// When moving the cursor between the url bar and bookmarks, or in-between bookmarks in the bookmark bar, the
|
||||
// mouseLeave event is triggered without a relatedTarget.
|
||||
if (event.relatedTarget == null) {
|
||||
return;
|
||||
}
|
||||
// TODO: Experiment with this for some time, see if people still have issues with the hover state
|
||||
//if (event.relatedTarget == null) {
|
||||
// return;
|
||||
//}
|
||||
|
||||
// If it's a child element but not the target, ignore the event
|
||||
if (target.contains(event.explicitOriginalTarget) && event.explicitOriginalTarget !== target) {
|
||||
|
@@ -500,9 +500,8 @@
|
||||
const centerPosition = { x: rect.width / 2, y: rect.height / 2 };
|
||||
|
||||
const harmonyAngles = getColorHarmonyType(dots.length + (action === 'add' ? 1 : action === 'remove' ? -1 : 0), this.dots);
|
||||
if (!harmonyAngles || harmonyAngles.angles.length === 0) return dots;
|
||||
|
||||
this.useAlgo = harmonyAngles.type;
|
||||
if (!harmonyAngles || harmonyAngles.angles.length === 0) return dots;
|
||||
|
||||
let primaryDot = dots.find((dot) => dot.ID === 0);
|
||||
if (!primaryDot) return [];
|
||||
@@ -638,7 +637,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
let colorPositions = this.calculateCompliments(this.dots, 'remove', this.useAlgo);
|
||||
let colorPositions = this.calculateCompliments(this.dots, 'remove');
|
||||
this.handleColorPositions(colorPositions);
|
||||
this.updateCurrentWorkspace();
|
||||
return;
|
||||
@@ -780,7 +779,7 @@
|
||||
}
|
||||
});
|
||||
|
||||
let colorPositions = this.calculateCompliments(this.dots, 'remove', this.useAlgo);
|
||||
let colorPositions = this.calculateCompliments(this.dots, 'remove');
|
||||
this.handleColorPositions(colorPositions);
|
||||
|
||||
this.updateCurrentWorkspace();
|
||||
@@ -870,8 +869,11 @@
|
||||
if (color.isCustom) {
|
||||
return color.c;
|
||||
}
|
||||
const toolbarBg = forToolbar ? this.getToolbarModifiedBase() : 'var(--zen-themed-toolbar-bg-transparent)';
|
||||
return `color-mix(in srgb, rgb(${color.c[0]}, ${color.c[1]}, ${color.c[2]}) ${this.currentOpacity * 100}%, ${toolbarBg} ${(1 - this.currentOpacity) * 100}%)`;
|
||||
if (forToolbar) {
|
||||
const toolbarBg = this.getToolbarModifiedBase();
|
||||
return `color-mix(in srgb, rgb(${color.c[0]}, ${color.c[1]}, ${color.c[2]}) ${this.currentOpacity * 100}%, ${toolbarBg} ${(1 - this.currentOpacity) * 100}%)`;
|
||||
}
|
||||
return `rgba(${color.c[0]}, ${color.c[1]}, ${color.c[2]}, ${this.currentOpacity})`;
|
||||
}
|
||||
|
||||
getGradient(colors, forToolbar = false) {
|
||||
|
@@ -21,6 +21,8 @@ class ZenMediaController {
|
||||
_controllerSwitchTimeout = null;
|
||||
|
||||
init() {
|
||||
if (!Services.prefs.getBoolPref('zen.mediacontrols.enabled', true)) return;
|
||||
|
||||
this.mediaTitle = document.querySelector('#zen-media-title');
|
||||
this.mediaArtist = document.querySelector('#zen-media-artist');
|
||||
this.mediaControlBar = document.querySelector('#zen-media-controls-toolbar');
|
||||
@@ -58,16 +60,8 @@ class ZenMediaController {
|
||||
}
|
||||
});
|
||||
|
||||
window.addEventListener('TabClose', (event) => {
|
||||
const linkedBrowser = event.target.linkedBrowser;
|
||||
if (!linkedBrowser?.browsingContext?.mediaController) return;
|
||||
this.deinitMediaController(
|
||||
linkedBrowser.browsingContext.mediaController,
|
||||
true,
|
||||
linkedBrowser.browserId === this._currentBrowser?.browserId,
|
||||
true
|
||||
);
|
||||
});
|
||||
const onTabDiscardedOrClosed = this.onTabDiscardedOrClosed.bind(this);
|
||||
window.addEventListener('TabClose', onTabDiscardedOrClosed);
|
||||
|
||||
window.addEventListener('DOMAudioPlaybackStarted', (event) => {
|
||||
setTimeout(() => {
|
||||
@@ -89,6 +83,17 @@ class ZenMediaController {
|
||||
window.addEventListener('DOMAudioPlaybackStopped', () => this.updateMuteState());
|
||||
}
|
||||
|
||||
onTabDiscardedOrClosed(event) {
|
||||
const linkedBrowser = event.target.linkedBrowser;
|
||||
if (!linkedBrowser?.browsingContext?.mediaController) return;
|
||||
this.deinitMediaController(
|
||||
linkedBrowser.browsingContext.mediaController,
|
||||
true,
|
||||
linkedBrowser.browserId === this._currentBrowser?.browserId,
|
||||
true
|
||||
);
|
||||
}
|
||||
|
||||
async deinitMediaController(mediaController, shouldForget = true, shouldOverride = true, shouldHide = true) {
|
||||
if (!mediaController) return;
|
||||
|
||||
@@ -138,6 +143,7 @@ class ZenMediaController {
|
||||
.then(() => {
|
||||
this.mediaControlBar.setAttribute('hidden', 'true');
|
||||
gZenUIManager.updateTabsToolbar();
|
||||
gZenUIManager.restoreScrollbarState();
|
||||
});
|
||||
}
|
||||
|
||||
@@ -157,6 +163,7 @@ class ZenMediaController {
|
||||
this.mediaControlBar.querySelector('toolbaritem').getBoundingClientRect().height + 'px';
|
||||
this.mediaControlBar.style.opacity = 0;
|
||||
gZenUIManager.updateTabsToolbar();
|
||||
gZenUIManager.restoreScrollbarState();
|
||||
gZenUIManager.motion.animate(
|
||||
this.mediaControlBar,
|
||||
{
|
||||
@@ -185,15 +192,6 @@ class ZenMediaController {
|
||||
this._currentBrowser = browser;
|
||||
|
||||
this.updatePipButton();
|
||||
|
||||
const positionState = mediaController.getPositionState();
|
||||
this.mediaControllersMap.set(mediaController.id, {
|
||||
controller: mediaController,
|
||||
browser,
|
||||
position: positionState.position,
|
||||
duration: positionState.duration,
|
||||
lastUpdated: Date.now(),
|
||||
});
|
||||
}
|
||||
|
||||
setupMediaControlUI(metadata, positionState) {
|
||||
@@ -210,9 +208,12 @@ class ZenMediaController {
|
||||
this.mediaArtist.textContent = metadata.artist || '';
|
||||
|
||||
gZenUIManager.updateTabsToolbar();
|
||||
gZenUIManager.restoreScrollbarState();
|
||||
|
||||
this._currentPosition = positionState.position;
|
||||
this._currentDuration = positionState.duration;
|
||||
this._currentPlaybackRate = positionState.playbackRate;
|
||||
|
||||
this.updateMediaPosition();
|
||||
|
||||
for (const key of this.supportedKeys) {
|
||||
@@ -234,6 +235,7 @@ class ZenMediaController {
|
||||
browser,
|
||||
position: positionState.position,
|
||||
duration: positionState.duration,
|
||||
playbackRate: positionState.playbackRate,
|
||||
lastUpdated: Date.now(),
|
||||
});
|
||||
|
||||
@@ -277,18 +279,21 @@ class ZenMediaController {
|
||||
}
|
||||
|
||||
_onPositionstateChange(event) {
|
||||
if (event.target.id !== this._currentMediaController?.id) {
|
||||
const mediaController = this.mediaControllersMap.get(event.target.id);
|
||||
this.mediaControllersMap.set(event.target.id, {
|
||||
...mediaController,
|
||||
position: event.position,
|
||||
duration: event.duration,
|
||||
lastUpdated: Date.now(),
|
||||
});
|
||||
}
|
||||
const mediaController = this.mediaControllersMap.get(event.target.id);
|
||||
this.mediaControllersMap.set(event.target.id, {
|
||||
...mediaController,
|
||||
position: event.position,
|
||||
duration: event.duration,
|
||||
playbackRate: event.playbackRate,
|
||||
lastUpdated: Date.now(),
|
||||
});
|
||||
|
||||
if (event.target.id !== this._currentMediaController?.id) return;
|
||||
|
||||
this._currentPosition = event.position;
|
||||
this._currentDuration = event.duration;
|
||||
this._currentPlaybackRate = event.playbackRate;
|
||||
|
||||
this.updateMediaPosition();
|
||||
}
|
||||
|
||||
@@ -321,6 +326,7 @@ class ZenMediaController {
|
||||
this.setupMediaControlUI(nextController.controller.getMetadata(), {
|
||||
position: nextController.position + (nextController.controller.isPlaying ? elapsedTime : 0),
|
||||
duration: nextController.duration,
|
||||
playbackRate: nextController.playbackRate,
|
||||
});
|
||||
|
||||
this.showMediaControls();
|
||||
@@ -349,7 +355,7 @@ class ZenMediaController {
|
||||
|
||||
this._mediaUpdateInterval = setInterval(() => {
|
||||
if (this._currentMediaController?.isPlaying) {
|
||||
this._currentPosition += 1;
|
||||
this._currentPosition += 1 * this._currentPlaybackRate;
|
||||
if (this._currentPosition > this._currentDuration) {
|
||||
this._currentPosition = this._currentDuration;
|
||||
}
|
||||
@@ -384,6 +390,13 @@ class ZenMediaController {
|
||||
const metadata = event.target.getMetadata();
|
||||
this.mediaTitle.textContent = metadata.title || '';
|
||||
this.mediaArtist.textContent = metadata.artist || '';
|
||||
|
||||
const mediaInfoElements = [this.mediaTitle, this.mediaArtist];
|
||||
for (const element of mediaInfoElements) {
|
||||
element.removeAttribute('overflow');
|
||||
}
|
||||
|
||||
this.addLabelOverflows(mediaInfoElements);
|
||||
}
|
||||
|
||||
_onPictureInPictureModeChange(event) {
|
||||
@@ -428,7 +441,10 @@ class ZenMediaController {
|
||||
}
|
||||
|
||||
onMediaFocus() {
|
||||
this._currentMediaController?.focus();
|
||||
if (!this._currentBrowser) return;
|
||||
const sidebarId = this._currentBrowser.getAttribute('zen-sidebar-id');
|
||||
if (sidebarId) gZenBrowserManagerSidebar.open(sidebarId);
|
||||
else this._currentMediaController?.focus();
|
||||
}
|
||||
|
||||
onMediaMute() {
|
||||
|
@@ -510,6 +510,10 @@
|
||||
case 'unload-switch':
|
||||
case 'reset-switch':
|
||||
case 'switch':
|
||||
let { permitUnload } = selectedTab.linkedBrowser?.permitUnload();
|
||||
if (!permitUnload) {
|
||||
return;
|
||||
}
|
||||
this._handleTabSwitch(selectedTab);
|
||||
if (behavior.includes('reset')) {
|
||||
this._resetTabToStoredState(selectedTab);
|
||||
@@ -520,8 +524,7 @@
|
||||
}
|
||||
// Do not unload about:* pages
|
||||
if (!selectedTab.linkedBrowser?.currentURI.spec.startsWith('about:')) {
|
||||
gBrowser.explicitUnloadTabs([selectedTab]);
|
||||
selectedTab.removeAttribute('linkedpanel');
|
||||
gZenTabUnloader.explicitUnloadTabs([selectedTab], { permitUnload });
|
||||
}
|
||||
}
|
||||
break;
|
||||
@@ -831,7 +834,7 @@
|
||||
removeTabContainersDragoverClass() {
|
||||
this.dragIndicator.remove();
|
||||
this._dragIndicator = null;
|
||||
ZenWorkspaces.activeWorkspaceIndicator.removeAttribute('open');
|
||||
ZenWorkspaces.activeWorkspaceIndicator?.removeAttribute('open');
|
||||
}
|
||||
|
||||
get dragIndicator() {
|
||||
@@ -891,9 +894,9 @@
|
||||
targetTab = targetTab?.group || targetTab;
|
||||
if (event.target.closest('.zen-current-workspace-indicator')) {
|
||||
this.removeTabContainersDragoverClass();
|
||||
ZenWorkspaces.activeWorkspaceIndicator.setAttribute('open', true);
|
||||
ZenWorkspaces.activeWorkspaceIndicator?.setAttribute('open', true);
|
||||
} else {
|
||||
ZenWorkspaces.activeWorkspaceIndicator.removeAttribute('open');
|
||||
ZenWorkspaces.activeWorkspaceIndicator?.removeAttribute('open');
|
||||
}
|
||||
|
||||
// If there's no valid target tab, nothing to do
|
||||
|
@@ -280,8 +280,10 @@ class ZenBrowserManagerSidebar extends ZenDOMOperatedFeature {
|
||||
this.close();
|
||||
}
|
||||
|
||||
open() {
|
||||
open(id = null) {
|
||||
let sidebar = document.getElementById('zen-sidebar-web-panel');
|
||||
if (id) this._currentPanel = id;
|
||||
|
||||
sidebar.removeAttribute('hidden');
|
||||
this.update();
|
||||
}
|
||||
|
@@ -22,8 +22,6 @@
|
||||
'TabAttrModified',
|
||||
'TabPinned',
|
||||
'TabUnpinned',
|
||||
'TabBrowserInserted',
|
||||
'TabBrowserDiscarded',
|
||||
'TabShow',
|
||||
'TabHide',
|
||||
'TabOpen',
|
||||
@@ -150,8 +148,6 @@
|
||||
switch (action) {
|
||||
case 'TabPinned':
|
||||
case 'TabUnpinned':
|
||||
case 'TabBrowserInserted':
|
||||
case 'TabBrowserDiscarded':
|
||||
case 'TabShow':
|
||||
case 'TabHide':
|
||||
break;
|
||||
@@ -235,9 +231,9 @@
|
||||
this.explicitUnloadTabs(tabs);
|
||||
}
|
||||
|
||||
explicitUnloadTabs(tabs) {
|
||||
explicitUnloadTabs(tabs, extraArgs = {}) {
|
||||
for (let i = 0; i < tabs.length; i++) {
|
||||
if (this.canUnloadTab(tabs[i], Date.now(), this.intervalUnloader.excludedUrls, true)) {
|
||||
if (this.canUnloadTab(tabs[i], Date.now(), this.intervalUnloader.excludedUrls, true, extraArgs)) {
|
||||
this.unload(tabs[i]);
|
||||
}
|
||||
}
|
||||
@@ -259,15 +255,15 @@
|
||||
}
|
||||
}
|
||||
|
||||
canUnloadTab(tab, currentTimestamp, excludedUrls, ignoreTimestamp = false) {
|
||||
canUnloadTab(tab, currentTimestamp, excludedUrls, ignoreTimestamp = false, extraArgs = {}) {
|
||||
if (
|
||||
(tab.pinned && !ignoreTimestamp) ||
|
||||
tab.selected ||
|
||||
(tab.multiselected && !ignoreTimestamp) ||
|
||||
(tab.hasAttribute('busy') && !ignoreTimestamp) ||
|
||||
tab.hasAttribute('pending') ||
|
||||
!tab.linkedPanel ||
|
||||
tab.splitView ||
|
||||
tab.group?.hasAttribute('split-view-group') ||
|
||||
tab.attention ||
|
||||
tab.hasAttribute('glance-id') ||
|
||||
tab.linkedBrowser?.zenModeActive ||
|
||||
@@ -280,7 +276,7 @@
|
||||
return false;
|
||||
}
|
||||
if (ignoreTimestamp) {
|
||||
return true;
|
||||
return this._tabPermitsUnload(tab, extraArgs);
|
||||
}
|
||||
const lastActivity = tab.lastActivity;
|
||||
if (!lastActivity) {
|
||||
@@ -288,7 +284,13 @@
|
||||
}
|
||||
const diff = currentTimestamp - lastActivity;
|
||||
// Check if the tab has been inactive for more than the timeout
|
||||
return diff > lazy.zenTabUnloaderTimeout * 60 * 1000;
|
||||
return diff > lazy.zenTabUnloaderTimeout * 60 * 1000 && this._tabPermitsUnload(tab, extraArgs);
|
||||
}
|
||||
|
||||
_tabPermitsUnload(tab, extraArgs) {
|
||||
return typeof extraArgs.permitUnload === 'undefined'
|
||||
? tab.linkedBrowser?.permitUnload()?.permitUnload
|
||||
: extraArgs.permitUnload;
|
||||
}
|
||||
}
|
||||
|
||||
|
@@ -230,7 +230,6 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
const halfWidth = panelsWidth / 2;
|
||||
const side = event.clientX > halfWidth ? 'right' : 'left';
|
||||
this.fakeBrowser = document.createXULElement('vbox');
|
||||
this.fakeBrowser.addEventListener('dragleave', this.onBrowserDragEndToSplit);
|
||||
window.addEventListener('dragend', this.onBrowserDragEndToSplit, { once: true });
|
||||
const padding = Services.prefs.getIntPref('zen.theme.content-element-separation', 0);
|
||||
this.fakeBrowser.setAttribute('flex', '1');
|
||||
@@ -277,6 +276,7 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
]);
|
||||
if (this._finishAllAnimatingPromise) {
|
||||
this._finishAllAnimatingPromise.then(() => {
|
||||
this.fakeBrowser.addEventListener('dragleave', this.onBrowserDragEndToSplit);
|
||||
this._canDrop = true;
|
||||
draggedTab._visuallySelected = true;
|
||||
});
|
||||
@@ -981,7 +981,9 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
layoutTree: this.calculateLayoutTree(tabs, gridType),
|
||||
};
|
||||
this._data.push(splitData);
|
||||
window.gBrowser.selectedTab = tabs[0];
|
||||
if (!this._sessionRestoring) {
|
||||
window.gBrowser.selectedTab = tabs[0];
|
||||
}
|
||||
|
||||
// Add tabs to the split view group
|
||||
let splitGroup = this._getSplitViewGroup(tabs);
|
||||
@@ -1722,6 +1724,43 @@ class ZenViewSplitter extends ZenDOMOperatedFeature {
|
||||
|
||||
return null;
|
||||
}
|
||||
|
||||
storeDataForSessionStore() {
|
||||
// We cant store any tab or browser elements in the session store
|
||||
// so we need to store the tab indexes and group indexes
|
||||
const data = this._data.map((group) => {
|
||||
return {
|
||||
groupId: group.tabs[0].group?.id,
|
||||
gridType: group.gridType,
|
||||
};
|
||||
});
|
||||
return data;
|
||||
}
|
||||
|
||||
restoreDataFromSessionStore(data) {
|
||||
if (!data) {
|
||||
return;
|
||||
}
|
||||
this._sessionRestoring = true;
|
||||
// We can just get the tab group with document.getElementById(group.groupId)
|
||||
// and add the tabs to it
|
||||
for (const group of data) {
|
||||
const groupElement = document.getElementById(group.groupId);
|
||||
if (groupElement) {
|
||||
const tabs = groupElement.querySelectorAll('tab');
|
||||
this.splitTabs([...tabs], group.gridType);
|
||||
}
|
||||
}
|
||||
delete this._sessionRestoring;
|
||||
}
|
||||
|
||||
onAfterWorkspaceSessionRestore() {
|
||||
if (this.currentView >= 0) {
|
||||
// Activate all browsers in the split view
|
||||
this.currentView = -1;
|
||||
this.onLocationChange(gBrowser.selectedTab.linkedBrowser);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
window.gZenViewSplitter = new ZenViewSplitter();
|
||||
|
@@ -52,13 +52,6 @@
|
||||
}
|
||||
}
|
||||
|
||||
function openWelcomeTab() {
|
||||
const tab = window.gBrowser.addTrustedTab('https://zen-browser.app/welcome', {
|
||||
inBackground: true,
|
||||
});
|
||||
gBrowser.selectedTab = tab;
|
||||
}
|
||||
|
||||
class ZenWelcomePages {
|
||||
constructor(pages) {
|
||||
this._currentPage = -1;
|
||||
@@ -410,7 +403,6 @@
|
||||
_tabsToPinEssentials.push(createdTab);
|
||||
}
|
||||
openInitialPinTab();
|
||||
openWelcomeTab();
|
||||
},
|
||||
},
|
||||
{
|
||||
|
@@ -77,6 +77,8 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
);
|
||||
ChromeUtils.defineLazyGetter(this, 'tabContainer', () => document.getElementById('tabbrowser-tabs'));
|
||||
this._activeWorkspace = Services.prefs.getStringPref('zen.workspaces.active', '');
|
||||
|
||||
window.addEventListener('resize', this.onWindowResize.bind(this));
|
||||
}
|
||||
|
||||
async afterLoadInit() {
|
||||
@@ -261,12 +263,13 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
_organizeTabsToWorkspaceSections(workspace, section, pinnedSection, tabs) {
|
||||
const workspaceTabs = Array.from(tabs).filter((tab) => tab.getAttribute('zen-workspace-id') === workspace.uuid);
|
||||
let firstNormalTab = null;
|
||||
for (const tab of workspaceTabs) {
|
||||
for (let tab of workspaceTabs) {
|
||||
if (tab.hasAttribute('zen-essential')) {
|
||||
continue; // Ignore essentials as they need to be in their own section
|
||||
}
|
||||
// remove tab from list
|
||||
tabs.splice(tabs.indexOf(tab), 1);
|
||||
tab = tab.group ?? tab;
|
||||
if (tab.pinned) {
|
||||
pinnedSection.insertBefore(tab, pinnedSection.nextSibling);
|
||||
} else {
|
||||
@@ -402,6 +405,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
|
||||
_handleSwipeMayStart(event) {
|
||||
if (!this.workspaceEnabled) return;
|
||||
if (event.target.closest('#zen-sidebar-bottom-buttons')) return;
|
||||
|
||||
// Only handle horizontal swipes
|
||||
if (event.direction === event.DIRECTION_LEFT || event.direction === event.DIRECTION_RIGHT) {
|
||||
@@ -599,6 +603,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
} catch (e) {
|
||||
console.error('ZenWorkspaces: Error initializing theme picker', e);
|
||||
}
|
||||
this.onWindowResize();
|
||||
await this._selectStartPage();
|
||||
this._fixTabPositions();
|
||||
this._resolveInitialized();
|
||||
@@ -644,6 +649,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
if (gZenVerticalTabsManager._canReplaceNewTab && showed) {
|
||||
BrowserCommands.openTab();
|
||||
}
|
||||
gZenViewSplitter.onAfterWorkspaceSessionRestore();
|
||||
}
|
||||
|
||||
handleInitialTab(tab, isEmpty) {
|
||||
@@ -870,6 +876,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
await ZenWorkspacesStorage.removeWorkspace(windowID);
|
||||
await this._propagateWorkspaceData();
|
||||
await this._updateWorkspacesChangeContextMenu();
|
||||
this.onWindowResize();
|
||||
}
|
||||
|
||||
isWorkspaceActive(workspace) {
|
||||
@@ -1928,6 +1935,7 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
}
|
||||
await this.changeWorkspace(workspaceData);
|
||||
}
|
||||
this.onWindowResize();
|
||||
return workspaceData;
|
||||
}
|
||||
|
||||
@@ -2286,7 +2294,11 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
if (!this._hasInitializedTabsStrip) {
|
||||
const children = this.tabboxChildren;
|
||||
children.pop(); // Remove the last child which is the new tab button
|
||||
return children;
|
||||
return [
|
||||
...document.querySelectorAll('#zen-essentials-container tab'),
|
||||
...document.querySelectorAll('#vertical-pinned-tabs-container tab'),
|
||||
...children,
|
||||
];
|
||||
}
|
||||
|
||||
if (this._allStoredTabs) {
|
||||
@@ -2318,6 +2330,23 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
return this._allStoredTabs;
|
||||
}
|
||||
|
||||
get allTabGroups() {
|
||||
if (!this._hasInitializedTabsStrip) {
|
||||
let children = this.tabboxChildren;
|
||||
return children.filter((node) => node.tagName == 'tab-group');
|
||||
}
|
||||
const pinnedContainers = document.querySelectorAll('#vertical-pinned-tabs-container .zen-workspace-tabs-section');
|
||||
const normalContainers = document.querySelectorAll('#tabbrowser-arrowscrollbox .zen-workspace-tabs-section');
|
||||
const containers = [...pinnedContainers, ...normalContainers];
|
||||
const tabGroups = [];
|
||||
for (const container of containers) {
|
||||
for (const tabGroup of container.querySelectorAll('tab-group')) {
|
||||
tabGroups.push(tabGroup);
|
||||
}
|
||||
}
|
||||
return tabGroups;
|
||||
}
|
||||
|
||||
get allUsedBrowsers() {
|
||||
if (!this._hasInitializedTabsStrip) {
|
||||
return gBrowser.browsers;
|
||||
@@ -2368,4 +2397,37 @@ var ZenWorkspaces = new (class extends ZenMultiWindowFeature {
|
||||
const workspace = workspaces.workspaces.find((workspace) => workspace.uuid === activeWorkspace);
|
||||
return workspace.containerTabId;
|
||||
}
|
||||
|
||||
onWindowResize(event = undefined) {
|
||||
if (!(!event || event.target === window)) return;
|
||||
// Check if workspace icons overflow the parent container
|
||||
const parent = document.getElementById('zen-workspaces-button');
|
||||
if (!parent || this._processingResize) {
|
||||
return;
|
||||
}
|
||||
this._processingResize = true;
|
||||
// Once we are overflowing, we align the buttons to always stay inside the container,
|
||||
// meaning we need to remove the overflow attribute to reset the width
|
||||
parent.removeAttribute('overflow');
|
||||
requestAnimationFrame(() => {
|
||||
const overflow = parent.scrollWidth > parent.clientWidth;
|
||||
parent.toggleAttribute('overflow', overflow);
|
||||
// The maximum width a button has when it overflows based on the number of buttons
|
||||
const numButtons = parent.children.length + 1; // +1 to exclude the active button
|
||||
const maxWidth = 100 / numButtons;
|
||||
parent.style.setProperty('--zen-overflowed-workspace-button-width', `${maxWidth}%`);
|
||||
this._processingResize = false;
|
||||
|
||||
// Scroll to the active workspace button if it's not visible
|
||||
const activeButton = parent.querySelector('.zen-workspace-button.active');
|
||||
if (!activeButton) {
|
||||
return;
|
||||
}
|
||||
const parentRect = parent.getBoundingClientRect();
|
||||
const activeRect = activeButton.getBoundingClientRect();
|
||||
if (activeRect.left < parentRect.left || activeRect.right > parentRect.right) {
|
||||
parent.scrollLeft = activeButton.offsetLeft;
|
||||
}
|
||||
});
|
||||
}
|
||||
})();
|
||||
|
@@ -50,7 +50,7 @@ export class ZenThemeMarketplaceChild extends JSWindowActorChild {
|
||||
|
||||
initiateThemeMarketplace() {
|
||||
this.contentWindow.setTimeout(() => {
|
||||
this.addIntallButtons();
|
||||
this.addInstallButtons();
|
||||
this.injectMarkplaceAPI();
|
||||
}, 0);
|
||||
}
|
||||
@@ -111,7 +111,7 @@ export class ZenThemeMarketplaceChild extends JSWindowActorChild {
|
||||
});
|
||||
}
|
||||
|
||||
async addIntallButtons() {
|
||||
async addInstallButtons() {
|
||||
const actionButton = this.actionButton;
|
||||
const actionButtonUnnstall = this.actionButtonUninstall;
|
||||
const errorMessage = this.contentWindow.document.getElementById('install-theme-error');
|
||||
|
@@ -1,45 +0,0 @@
|
||||
<?xml version="1.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/. -->
|
||||
|
||||
<html xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"
|
||||
xmlns:html="http://www.w3.org/1999/xhtml"
|
||||
id="zenSettingsWindow"
|
||||
style="min-width: 35em; max-width: 35em; min-height: 40em;">
|
||||
<head>
|
||||
<linkset>
|
||||
<html:link
|
||||
rel="stylesheet"
|
||||
href="chrome://browser/content/zen-styles/zen-theme.css"
|
||||
/>
|
||||
<html:link
|
||||
rel="stylesheet"
|
||||
href="chrome://browser/content/zen-styles/windows/zen-settings.css"
|
||||
/>
|
||||
|
||||
<html:link rel="localization" href="browser/preferences/preferences.ftl" />
|
||||
<html:link rel="localization" href="browser/preferences/zen-preferences.ftl" />
|
||||
</linkset>
|
||||
|
||||
<script src="chrome://browser/content/zenThemeModifier.js"></script>
|
||||
</head>
|
||||
|
||||
<html:body xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul">
|
||||
<vbox id="main-content">
|
||||
<vbox class="section">
|
||||
<html:h2 data-l10n-id="pane-general-title"/>
|
||||
<div class="section-content">
|
||||
test
|
||||
</div>
|
||||
</vbox>
|
||||
<vbox class="section">
|
||||
<html:h2 data-l10n-id="pane-general-title"/>
|
||||
<div class="section-content">
|
||||
test
|
||||
</div>
|
||||
</vbox>
|
||||
</vbox>
|
||||
</html:body>
|
||||
</html>
|
@@ -959,11 +959,6 @@ Preferences.addAll([
|
||||
type: 'int',
|
||||
default: 10,
|
||||
},
|
||||
{
|
||||
id: 'zen.workspaces.hide-deactivated-workspaces',
|
||||
type: 'bool',
|
||||
default: true,
|
||||
},
|
||||
{
|
||||
id: 'zen.pinned-tab-manager.restore-pinned-tabs-to-pinned-url',
|
||||
type: 'bool',
|
||||
|
@@ -23,9 +23,6 @@
|
||||
<checkbox id="zenWorkspacesForceContainerTabsToWorkspace"
|
||||
data-l10n-id="zen-settings-workspaces-force-container-tabs-to-workspace"
|
||||
preference="zen.workspaces.force-container-workspace"/>
|
||||
<checkbox id="zenWorkspaceHideDeactivatedWorkspaces"
|
||||
data-l10n-id="zen-settings-workspaces-hide-deactivated-workspaces"
|
||||
preference="zen.workspaces.hide-deactivated-workspaces"/>
|
||||
</groupbox>
|
||||
|
||||
<hbox id="zenTabsUnloadCategory"
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/sessionstore/SessionStore.sys.mjs b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
index f814772114948f87cbb3c3a7231c95ea1f68d776..ae35daa518ca25f4fc95ef983519c390bf088a68 100644
|
||||
index f814772114948f87cbb3c3a7231c95ea1f68d776..38913eb9dee97b42697440560f7a1bab1ffe9f15 100644
|
||||
--- a/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
+++ b/browser/components/sessionstore/SessionStore.sys.mjs
|
||||
@@ -3171,7 +3171,7 @@ var SessionStoreInternal = {
|
||||
@@ -19,7 +19,7 @@ index f814772114948f87cbb3c3a7231c95ea1f68d776..ae35daa518ca25f4fc95ef983519c390
|
||||
|
||||
if (inBackground === false) {
|
||||
aWindow.gBrowser.selectedTab = newTab;
|
||||
@@ -5355,14 +5356,14 @@ var SessionStoreInternal = {
|
||||
@@ -5355,14 +5356,15 @@ var SessionStoreInternal = {
|
||||
}
|
||||
|
||||
let tabbrowser = aWindow.gBrowser;
|
||||
@@ -29,6 +29,7 @@ index f814772114948f87cbb3c3a7231c95ea1f68d776..ae35daa518ca25f4fc95ef983519c390
|
||||
let winData = this._windows[aWindow.__SSi];
|
||||
let tabsData = (winData.tabs = []);
|
||||
|
||||
+ winData.splitViewData = aWindow.gZenViewSplitter?.storeDataForSessionStore();
|
||||
// update the internal state data for this window
|
||||
for (let tab of tabs) {
|
||||
- if (tab == aWindow.FirefoxViewHandler.tab) {
|
||||
@@ -36,7 +37,7 @@ index f814772114948f87cbb3c3a7231c95ea1f68d776..ae35daa518ca25f4fc95ef983519c390
|
||||
continue;
|
||||
}
|
||||
let tabData = lazy.TabState.collect(tab, TAB_CUSTOM_VALUES.get(tab));
|
||||
@@ -5381,7 +5382,7 @@ var SessionStoreInternal = {
|
||||
@@ -5381,7 +5383,7 @@ var SessionStoreInternal = {
|
||||
// We don't store the Firefox View tab in Session Store, so if it was the last selected "tab" when
|
||||
// a window is closed, point to the first item in the tab strip instead (it will never be the Firefox View tab,
|
||||
// since it's only inserted into the tab strip after it's selected).
|
||||
@@ -45,7 +46,15 @@ index f814772114948f87cbb3c3a7231c95ea1f68d776..ae35daa518ca25f4fc95ef983519c390
|
||||
selectedIndex = 1;
|
||||
winData.title = tabbrowser.tabs[0].label;
|
||||
}
|
||||
@@ -6086,8 +6087,23 @@ var SessionStoreInternal = {
|
||||
@@ -5538,6 +5540,7 @@ var SessionStoreInternal = {
|
||||
winData.tabs,
|
||||
winData.groups ?? []
|
||||
);
|
||||
+ aWindow.gZenViewSplitter?.restoreDataFromSessionStore(winData.splitViewData);
|
||||
this._log.debug(
|
||||
`restoreWindow, createTabsForSessionRestore returned ${tabs.length} tabs`
|
||||
);
|
||||
@@ -6086,8 +6089,23 @@ var SessionStoreInternal = {
|
||||
|
||||
// Most of tabData has been restored, now continue with restoring
|
||||
// attributes that may trigger external events.
|
||||
|
@@ -0,0 +1,14 @@
|
||||
diff --git a/browser/components/sessionstore/TabGroupState.sys.mjs b/browser/components/sessionstore/TabGroupState.sys.mjs
|
||||
index 2406837c67d8ff590aa0db6c75ede81e53097506..b69fb7862cd76c891ef61e29aca8c10bab2f5d7e 100644
|
||||
--- a/browser/components/sessionstore/TabGroupState.sys.mjs
|
||||
+++ b/browser/components/sessionstore/TabGroupState.sys.mjs
|
||||
@@ -66,6 +66,9 @@ class _TabGroupState {
|
||||
name: tabGroup.label,
|
||||
color: tabGroup.color,
|
||||
collapsed: tabGroup.collapsed,
|
||||
+ pinned: tabGroup.pinned,
|
||||
+ essential: tabGroup.essential,
|
||||
+ splitView: tabGroup.hasAttribute("split-view-group"),
|
||||
};
|
||||
}
|
||||
|
@@ -1,13 +1,8 @@
|
||||
diff --git a/browser/components/sessionstore/TabState.sys.mjs b/browser/components/sessionstore/TabState.sys.mjs
|
||||
index 8f7ed557e6aa61e7e16ed4a8d785ad5fe651b3d8..aff63696d198055886960072a6130318e099ae42 100644
|
||||
index 8f7ed557e6aa61e7e16ed4a8d785ad5fe651b3d8..254849e13f7566029dc780c45e376e0f0d427cb5 100644
|
||||
--- a/browser/components/sessionstore/TabState.sys.mjs
|
||||
+++ b/browser/components/sessionstore/TabState.sys.mjs
|
||||
@@ -80,10 +80,20 @@ class _TabState {
|
||||
tabData.muteReason = tab.muteReason;
|
||||
}
|
||||
|
||||
- if (tab.group) {
|
||||
+ if (tab.group && !tab.group.hasAttribute("split-view-group")) {
|
||||
@@ -84,6 +84,16 @@ class _TabState {
|
||||
tabData.groupId = tab.group.id;
|
||||
}
|
||||
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabbrowser.js b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63af1fa8a3 100644
|
||||
index 628aa6596627c85efe361fc1ece8fd58f7ee653e..2a9ac30c7e270586ff4502046e5b1ae7409d0582 100644
|
||||
--- a/browser/components/tabbrowser/content/tabbrowser.js
|
||||
+++ b/browser/components/tabbrowser/content/tabbrowser.js
|
||||
@@ -412,11 +412,50 @@
|
||||
@@ -246,7 +246,24 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
// Additionally send pinned tab events
|
||||
if (pinned) {
|
||||
this._notifyPinnedStatus(t);
|
||||
@@ -2904,6 +2977,7 @@
|
||||
@@ -2865,12 +2938,15 @@
|
||||
* @param {string} [label=]
|
||||
* @returns {MozTabbrowserTabGroup}
|
||||
*/
|
||||
- _createTabGroup(id, color, collapsed, label = "") {
|
||||
+ _createTabGroup(id, color, collapsed, label = "", pinned = false, essential = false, splitViewGroup = false) {
|
||||
let group = document.createXULElement("tab-group", { is: "tab-group" });
|
||||
group.id = id;
|
||||
group.collapsed = collapsed;
|
||||
group.color = color;
|
||||
group.label = label;
|
||||
+ group.pinned = pinned;
|
||||
+ group.essential = essential;
|
||||
+ if (splitViewGroup) group.setAttribute('split-view-group', true);
|
||||
return group;
|
||||
}
|
||||
|
||||
@@ -2904,6 +2980,7 @@
|
||||
label = "",
|
||||
insertBefore = null,
|
||||
showCreateUI = false,
|
||||
@@ -254,7 +271,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
} = {}
|
||||
) {
|
||||
if (!tabs?.length) {
|
||||
@@ -2918,7 +2992,12 @@
|
||||
@@ -2918,7 +2995,12 @@
|
||||
id = `${Date.now()}-${Math.round(Math.random() * 100)}`;
|
||||
}
|
||||
let group = this._createTabGroup(id, color, false, label);
|
||||
@@ -264,11 +281,11 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
+ }
|
||||
+ group.essential = tabs.some(tab => tab.hasAttribute("essential"));
|
||||
+ group.pinned = group.essential || tabs.some(tab => tab.pinned);
|
||||
+ (group.essential ? document.getElementById("zen-essentials-container") : (group.pinned ? this.verticalPinnedTabsContainer : this.tabContainer)).insertBefore(
|
||||
+ ((insertBefore?.group ?? insertBefore).parentNode).insertBefore(
|
||||
group,
|
||||
insertBefore?.group ?? insertBefore
|
||||
);
|
||||
@@ -3126,6 +3205,7 @@
|
||||
@@ -3126,6 +3208,7 @@
|
||||
initialBrowsingContextGroupId,
|
||||
openWindowInfo,
|
||||
skipLoad,
|
||||
@@ -276,7 +293,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
}
|
||||
) {
|
||||
// If we don't have a preferred remote type, and we have a remote
|
||||
@@ -3189,6 +3269,7 @@
|
||||
@@ -3189,6 +3272,7 @@
|
||||
openWindowInfo,
|
||||
name,
|
||||
skipLoad,
|
||||
@@ -284,7 +301,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
});
|
||||
}
|
||||
|
||||
@@ -3367,6 +3448,27 @@
|
||||
@@ -3367,6 +3451,27 @@
|
||||
) {
|
||||
tabWasReused = true;
|
||||
tab = this.selectedTab;
|
||||
@@ -312,7 +329,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
if (!tabData.pinned) {
|
||||
this.unpinTab(tab);
|
||||
} else {
|
||||
@@ -3380,6 +3482,7 @@
|
||||
@@ -3380,6 +3485,7 @@
|
||||
restoreTabsLazily && !select && !tabData.pinned;
|
||||
|
||||
let url = "about:blank";
|
||||
@@ -320,7 +337,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
if (tabData.entries?.length) {
|
||||
let activeIndex = (tabData.index || tabData.entries.length) - 1;
|
||||
// Ensure the index is in bounds.
|
||||
@@ -3415,7 +3518,27 @@
|
||||
@@ -3415,7 +3521,27 @@
|
||||
skipLoad: true,
|
||||
preferredRemoteType,
|
||||
});
|
||||
@@ -349,7 +366,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
if (select) {
|
||||
tabToSelect = tab;
|
||||
}
|
||||
@@ -3428,8 +3551,8 @@
|
||||
@@ -3428,8 +3554,8 @@
|
||||
// inserted in the DOM. If the tab is not yet in the DOM,
|
||||
// just insert it in the right place from the start.
|
||||
if (!tab.parentNode) {
|
||||
@@ -360,7 +377,29 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
tab.toggleAttribute("pinned", true);
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
// Then ensure all the tab open/pinning information is sent.
|
||||
@@ -3504,6 +3627,9 @@
|
||||
@@ -3439,7 +3565,8 @@
|
||||
// needs calling:
|
||||
shouldUpdateForPinnedTabs = true;
|
||||
}
|
||||
- } else if (tabData.groupId) {
|
||||
+ }
|
||||
+ if (tabData.groupId) {
|
||||
let { groupId } = tabData;
|
||||
const tabGroup = tabGroupWorkingData.get(groupId);
|
||||
// if a tab refers to a tab group we don't know, skip any group
|
||||
@@ -3453,7 +3580,10 @@
|
||||
tabGroup.stateData.id,
|
||||
tabGroup.stateData.color,
|
||||
tabGroup.stateData.collapsed,
|
||||
- tabGroup.stateData.name
|
||||
+ tabGroup.stateData.name,
|
||||
+ tabGroup.stateData.pinned,
|
||||
+ tabGroup.stateData.essential,
|
||||
+ tabGroup.stateData.splitView,
|
||||
);
|
||||
tabsFragment.appendChild(tabGroup.node);
|
||||
}
|
||||
@@ -3504,6 +3634,9 @@
|
||||
this.selectedTab = tabToSelect;
|
||||
this.removeTab(leftoverTab);
|
||||
}
|
||||
@@ -370,7 +409,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
|
||||
if (tabs.length > 1 || !tabs[0].selected) {
|
||||
this._updateTabsAfterInsert();
|
||||
@@ -3693,7 +3819,7 @@
|
||||
@@ -3693,7 +3826,7 @@
|
||||
// Ensure we have an index if one was not provided.
|
||||
if (typeof index != "number") {
|
||||
// Move the new tab after another tab if needed, to the end otherwise.
|
||||
@@ -379,7 +418,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
if (
|
||||
!bulkOrderedOpen &&
|
||||
((openerTab &&
|
||||
@@ -3736,18 +3862,18 @@
|
||||
@@ -3736,18 +3869,18 @@
|
||||
|
||||
// Ensure index is within bounds.
|
||||
if (tab.pinned) {
|
||||
@@ -402,7 +441,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
if (tabAfter && tabAfter.group == tabGroup) {
|
||||
// Place at the front of, or between tabs in, the same tab group
|
||||
this.tabContainer.insertBefore(tab, tabAfter);
|
||||
@@ -4059,6 +4185,9 @@
|
||||
@@ -4059,6 +4192,9 @@
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -412,7 +451,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
this.removeTabs(selectedTabs);
|
||||
}
|
||||
|
||||
@@ -4391,6 +4520,7 @@
|
||||
@@ -4391,6 +4527,7 @@
|
||||
skipSessionStore,
|
||||
} = {}
|
||||
) {
|
||||
@@ -420,7 +459,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
if (UserInteraction.running("browser.tabs.opening", window)) {
|
||||
UserInteraction.finish("browser.tabs.opening", window);
|
||||
}
|
||||
@@ -4407,6 +4537,12 @@
|
||||
@@ -4407,6 +4544,12 @@
|
||||
TelemetryStopwatch.start("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab);
|
||||
}
|
||||
|
||||
@@ -433,7 +472,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
// Handle requests for synchronously removing an already
|
||||
// asynchronously closing tab.
|
||||
if (!animate && aTab.closing) {
|
||||
@@ -4421,7 +4557,9 @@
|
||||
@@ -4421,7 +4564,9 @@
|
||||
// frame created for it (for example, by updating the visually selected
|
||||
// state).
|
||||
let tabWidth = window.windowUtils.getBoundsWithoutFlushing(aTab).width;
|
||||
@@ -444,7 +483,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
if (
|
||||
!this._beginRemoveTab(aTab, {
|
||||
closeWindowFastpath: true,
|
||||
@@ -4435,7 +4573,6 @@
|
||||
@@ -4435,7 +4580,6 @@
|
||||
TelemetryStopwatch.cancel("FX_TAB_CLOSE_TIME_NO_ANIM_MS", aTab);
|
||||
return;
|
||||
}
|
||||
@@ -452,7 +491,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
let lockTabSizing =
|
||||
!this.tabContainer.verticalMode &&
|
||||
!aTab.pinned &&
|
||||
@@ -4574,14 +4711,14 @@
|
||||
@@ -4574,14 +4718,14 @@
|
||||
!!this.tabsInCollapsedTabGroups.length;
|
||||
if (
|
||||
aTab.visible &&
|
||||
@@ -469,7 +508,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
|
||||
if (closeWindow) {
|
||||
// We've already called beforeunload on all the relevant tabs if we get here,
|
||||
@@ -4605,6 +4742,7 @@
|
||||
@@ -4605,6 +4749,7 @@
|
||||
|
||||
newTab = true;
|
||||
}
|
||||
@@ -477,7 +516,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
aTab._endRemoveArgs = [closeWindow, newTab];
|
||||
|
||||
// swapBrowsersAndCloseOther will take care of closing the window without animation.
|
||||
@@ -4645,9 +4783,7 @@
|
||||
@@ -4645,9 +4790,7 @@
|
||||
aTab._mouseleave();
|
||||
|
||||
if (newTab) {
|
||||
@@ -488,7 +527,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
} else {
|
||||
TabBarVisibility.update();
|
||||
}
|
||||
@@ -4776,6 +4912,8 @@
|
||||
@@ -4776,6 +4919,8 @@
|
||||
this.tabs[i]._tPos = i;
|
||||
}
|
||||
|
||||
@@ -497,7 +536,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
if (!this._windowIsClosing) {
|
||||
if (wasPinned) {
|
||||
this.tabContainer._positionPinnedTabs();
|
||||
@@ -4994,7 +5132,7 @@
|
||||
@@ -4994,7 +5139,7 @@
|
||||
!excludeTabs.has(aTab.owner) &&
|
||||
Services.prefs.getBoolPref("browser.tabs.selectOwnerOnClose")
|
||||
) {
|
||||
@@ -506,7 +545,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
}
|
||||
|
||||
// Try to find a remaining tab that comes after the given tab
|
||||
@@ -5016,7 +5154,7 @@
|
||||
@@ -5016,7 +5161,7 @@
|
||||
}
|
||||
|
||||
if (tab) {
|
||||
@@ -515,7 +554,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
}
|
||||
|
||||
// If no qualifying visible tab was found, see if there is a tab in
|
||||
@@ -5434,10 +5572,10 @@
|
||||
@@ -5434,10 +5579,10 @@
|
||||
SessionStore.deleteCustomTabValue(aTab, "hiddenBy");
|
||||
}
|
||||
|
||||
@@ -528,7 +567,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
aTab.selected ||
|
||||
aTab.closing ||
|
||||
// Tabs that are sharing the screen, microphone or camera cannot be hidden.
|
||||
@@ -5675,7 +5813,7 @@
|
||||
@@ -5675,7 +5820,7 @@
|
||||
|
||||
// Don't allow mixing pinned and unpinned tabs.
|
||||
if (aTab.pinned) {
|
||||
@@ -537,7 +576,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
} else {
|
||||
aIndex = Math.max(aIndex, this.pinnedTabCount);
|
||||
}
|
||||
@@ -5685,10 +5823,17 @@
|
||||
@@ -5685,10 +5830,17 @@
|
||||
|
||||
this._handleTabMove(aTab, () => {
|
||||
let neighbor = this.tabs[aIndex];
|
||||
@@ -557,7 +596,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
neighbor.after(aTab);
|
||||
} else {
|
||||
this.tabContainer.insertBefore(aTab, neighbor);
|
||||
@@ -5697,7 +5842,7 @@
|
||||
@@ -5697,7 +5849,7 @@
|
||||
}
|
||||
|
||||
moveTabToGroup(aTab, aGroup) {
|
||||
@@ -566,7 +605,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
return;
|
||||
}
|
||||
if (aTab.group && aTab.group.id === aGroup.id) {
|
||||
@@ -5721,6 +5866,10 @@
|
||||
@@ -5721,6 +5873,10 @@
|
||||
|
||||
moveActionCallback();
|
||||
|
||||
@@ -577,7 +616,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
// Clear tabs cache after moving nodes because the order of tabs may have
|
||||
// changed.
|
||||
this.tabContainer._invalidateCachedTabs();
|
||||
@@ -5771,7 +5920,7 @@
|
||||
@@ -5771,7 +5927,7 @@
|
||||
createLazyBrowser,
|
||||
};
|
||||
|
||||
@@ -586,7 +625,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
if (aIndex < numPinned || (aTab.pinned && aIndex == numPinned)) {
|
||||
params.pinned = true;
|
||||
}
|
||||
@@ -6513,7 +6662,7 @@
|
||||
@@ -6513,7 +6669,7 @@
|
||||
// preventDefault(). It will still raise the window if appropriate.
|
||||
break;
|
||||
}
|
||||
@@ -595,7 +634,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
window.focus();
|
||||
aEvent.preventDefault();
|
||||
break;
|
||||
@@ -7415,6 +7564,7 @@
|
||||
@@ -7415,6 +7571,7 @@
|
||||
aWebProgress.isTopLevel
|
||||
) {
|
||||
this.mTab.setAttribute("busy", "true");
|
||||
@@ -603,7 +642,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
gBrowser._tabAttrModified(this.mTab, ["busy"]);
|
||||
this.mTab._notselectedsinceload = !this.mTab.selected;
|
||||
}
|
||||
@@ -8381,7 +8531,7 @@ var TabContextMenu = {
|
||||
@@ -8381,7 +8538,7 @@ var TabContextMenu = {
|
||||
);
|
||||
contextUnpinSelectedTabs.hidden =
|
||||
!this.contextTab.pinned || !multiselectionContext;
|
||||
@@ -612,7 +651,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
// Move Tab items
|
||||
let contextMoveTabOptions = document.getElementById(
|
||||
"context_moveTabOptions"
|
||||
@@ -8414,7 +8564,7 @@ var TabContextMenu = {
|
||||
@@ -8414,7 +8571,7 @@ var TabContextMenu = {
|
||||
let contextMoveTabToStart = document.getElementById("context_moveToStart");
|
||||
let isFirstTab =
|
||||
tabsToMove[0] == visibleTabs[0] ||
|
||||
@@ -621,7 +660,7 @@ index 628aa6596627c85efe361fc1ece8fd58f7ee653e..06a4aae50ebe8a42d08d4689d8e80a63
|
||||
contextMoveTabToStart.disabled = isFirstTab && allSelectedTabsAdjacent;
|
||||
|
||||
document.getElementById("context_openTabInWindow").disabled =
|
||||
@@ -8647,6 +8797,7 @@ var TabContextMenu = {
|
||||
@@ -8647,6 +8804,7 @@ var TabContextMenu = {
|
||||
if (this.contextTab.multiselected) {
|
||||
gBrowser.removeMultiSelectedTabs();
|
||||
} else {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/tabbrowser/content/tabs.js b/browser/components/tabbrowser/content/tabs.js
|
||||
index fa96568d366fd3608f9bd583fa793150bd815c8b..1c940a3b162919256ca73fa867c5c261a3395e25 100644
|
||||
index fa96568d366fd3608f9bd583fa793150bd815c8b..13a870629a98304cb18dc09b5ae075d734668f2a 100644
|
||||
--- a/browser/components/tabbrowser/content/tabs.js
|
||||
+++ b/browser/components/tabbrowser/content/tabs.js
|
||||
@@ -94,7 +94,7 @@
|
||||
@@ -145,7 +145,7 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..1c940a3b162919256ca73fa867c5c261
|
||||
}
|
||||
|
||||
get verticalMode() {
|
||||
@@ -1537,28 +1565,40 @@
|
||||
@@ -1537,29 +1565,41 @@
|
||||
if (this.#allTabs) {
|
||||
return this.#allTabs;
|
||||
}
|
||||
@@ -189,11 +189,12 @@ index fa96568d366fd3608f9bd583fa793150bd815c8b..1c940a3b162919256ca73fa867c5c261
|
||||
}
|
||||
|
||||
get allGroups() {
|
||||
- let children = Array.from(this.arrowScrollbox.children);
|
||||
+ let children = ZenWorkspaces.tabboxChildren;
|
||||
return children.filter(node => node.tagName == "tab-group");
|
||||
let children = Array.from(this.arrowScrollbox.children);
|
||||
- return children.filter(node => node.tagName == "tab-group");
|
||||
+ return ZenWorkspaces.allTabGroups;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -1579,7 +1619,7 @@
|
||||
*/
|
||||
get visibleTabs() {
|
||||
|
@@ -1,8 +1,15 @@
|
||||
diff --git a/browser/themes/windows/browser.css b/browser/themes/windows/browser.css
|
||||
index f49604e53780763b9aa19897458c45f0be6cbc9b..aa9da99641ba4a3b7f67a27acbbf6c75c1346ced 100644
|
||||
index f49604e53780763b9aa19897458c45f0be6cbc9b..5ea9098a9b689470ef4ddfea91069cd23391d020 100644
|
||||
--- a/browser/themes/windows/browser.css
|
||||
+++ b/browser/themes/windows/browser.css
|
||||
@@ -47,7 +47,7 @@
|
||||
@@ -40,14 +40,13 @@
|
||||
* override these on the tabs toolbar because the accent color is
|
||||
* arbitrary, so the hardcoded colors from browser-custom-colors might
|
||||
* not provide sufficient contrast. */
|
||||
- --toolbarbutton-icon-fill: currentColor;
|
||||
--toolbarbutton-hover-background: color-mix(in srgb, currentColor 17%, transparent);
|
||||
--toolbarbutton-active-background: color-mix(in srgb, currentColor 30%, transparent);
|
||||
}
|
||||
}
|
||||
|
||||
&[sizemode="normal"] #navigator-toolbox {
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/dom/html/HTMLMediaElement.cpp b/dom/html/HTMLMediaElement.cpp
|
||||
index 0b8dee1ca22b1f0ddcf7e6a976f606990104b56e..a3a5a7cfcaa8a4719e56988bc917183fa3cc9d10 100644
|
||||
index 0b8dee1ca22b1f0ddcf7e6a976f606990104b56e..db31132b67a041abf6bf3e5ed68ab20380fdc293 100644
|
||||
--- a/dom/html/HTMLMediaElement.cpp
|
||||
+++ b/dom/html/HTMLMediaElement.cpp
|
||||
@@ -455,6 +455,7 @@ class HTMLMediaElement::MediaControlKeyListener final
|
||||
@@ -10,3 +10,13 @@ index 0b8dee1ca22b1f0ddcf7e6a976f606990104b56e..a3a5a7cfcaa8a4719e56988bc917183f
|
||||
NotifyAudibleStateChanged(mIsOwnerAudible
|
||||
? MediaAudibleState::eAudible
|
||||
: MediaAudibleState::eInaudible);
|
||||
@@ -6952,6 +6953,9 @@ void HTMLMediaElement::FireTimeUpdate(TimeupdateType aType) {
|
||||
DispatchAsyncEvent(std::move(runner));
|
||||
mQueueTimeUpdateRunnerTime = TimeStamp::Now();
|
||||
mLastCurrentTime = CurrentTime();
|
||||
+ if (aType == TimeupdateType::eMandatory) {
|
||||
+ mMediaControlKeyListener->NotifyMediaPositionState();
|
||||
+ }
|
||||
}
|
||||
if (mFragmentEnd >= 0.0 && CurrentTime() >= mFragmentEnd) {
|
||||
Pause();
|
||||
|
@@ -0,0 +1,16 @@
|
||||
diff --git a/toolkit/components/pictureinpicture/content/player.js b/toolkit/components/pictureinpicture/content/player.js
|
||||
index 9a4971d5d24dba6e543be8ea321c6be8c43ad859..b0788967e51736b1ec95daf96a1504bfd7c1dea7 100644
|
||||
--- a/toolkit/components/pictureinpicture/content/player.js
|
||||
+++ b/toolkit/components/pictureinpicture/content/player.js
|
||||
@@ -722,6 +722,11 @@ let Player = {
|
||||
document.getElementById("large").click();
|
||||
break;
|
||||
}
|
||||
+
|
||||
+ case "minimize": {
|
||||
+ this.closePipWindow({ reason: "CloseButton" });
|
||||
+ break;
|
||||
+ }
|
||||
}
|
||||
// If the click came from a element that is not inside the subtitles settings panel
|
||||
// then we want to hide the panel
|
@@ -0,0 +1,37 @@
|
||||
diff --git a/toolkit/components/pictureinpicture/content/player.xhtml b/toolkit/components/pictureinpicture/content/player.xhtml
|
||||
index 440ce51e8e67e4d3a7bdcb78f38f2fb6684c9848..38912579310314a13d516328ec770db6b589d243 100644
|
||||
--- a/toolkit/components/pictureinpicture/content/player.xhtml
|
||||
+++ b/toolkit/components/pictureinpicture/content/player.xhtml
|
||||
@@ -17,6 +17,7 @@
|
||||
<link rel="localization" href="browser/browserSets.ftl"/>
|
||||
<script src="chrome://global/content/pictureinpicture/player.js"></script>
|
||||
<title data-l10n-id="pictureinpicture-player-title"></title>
|
||||
+ <link rel="localization" href="browser/zen-general.ftl"/>
|
||||
</head>
|
||||
|
||||
<body>
|
||||
@@ -52,13 +53,22 @@
|
||||
tabindex="10"
|
||||
#endif
|
||||
/>
|
||||
- <button id="unpip"
|
||||
- class="control-item control-button tooltip-under-controls" data-l10n-id="pictureinpicture-unpip-btn" data-l10n-attrs="tooltip"
|
||||
+ <button id="minimize"
|
||||
+ class="control-item control-button tooltip-under-controls" data-l10n-id="pictureinpicture-minimize-btn" data-l10n-attrs="tooltip"
|
||||
#ifdef XP_MACOSX
|
||||
mac="true"
|
||||
tabindex="10"
|
||||
#else
|
||||
tabindex="9"
|
||||
+#endif
|
||||
+ />
|
||||
+ <button id="unpip"
|
||||
+ class="control-item control-button tooltip-under-controls" data-l10n-id="pictureinpicture-unpip-btn" data-l10n-attrs="tooltip"
|
||||
+#ifdef XP_MACOSX
|
||||
+ mac="true"
|
||||
+ tabindex="11"
|
||||
+#else
|
||||
+ tabindex="10"
|
||||
#endif
|
||||
/>
|
||||
<div id="controls-bottom-gradient" class="control-item"></div>
|
12
src/toolkit/content/widgets/findbar-js.patch
Normal file
12
src/toolkit/content/widgets/findbar-js.patch
Normal file
@@ -0,0 +1,12 @@
|
||||
diff --git a/toolkit/content/widgets/findbar.js b/toolkit/content/widgets/findbar.js
|
||||
index 8ca512e0b212bb6e25ed37e7edb4f8e2587d5bb0..5abfff92b3a8df5d138082af96419668a2c8a9bb 100644
|
||||
--- a/toolkit/content/widgets/findbar.js
|
||||
+++ b/toolkit/content/widgets/findbar.js
|
||||
@@ -1188,6 +1188,7 @@
|
||||
* e.g. <command name="cmd_find" oncommand="gFindBar.onFindCommand();"/>
|
||||
*/
|
||||
onFindCommand() {
|
||||
+ if (gBrowser?.selectedTab?.hasAttribute("zen-empty-tab")) return;
|
||||
return this.startFind(this.FIND_NORMAL);
|
||||
}
|
||||
|
22
src/toolkit/themes/shared/pictureinpicture/player-css.patch
Normal file
22
src/toolkit/themes/shared/pictureinpicture/player-css.patch
Normal file
@@ -0,0 +1,22 @@
|
||||
diff --git a/toolkit/themes/shared/pictureinpicture/player.css b/toolkit/themes/shared/pictureinpicture/player.css
|
||||
index a3ffe31d47cc81a0cb578acc9177aaa6f41668eb..cf69507804b7c50f9afcfabb744098cfbe409396 100644
|
||||
--- a/toolkit/themes/shared/pictureinpicture/player.css
|
||||
+++ b/toolkit/themes/shared/pictureinpicture/player.css
|
||||
@@ -724,3 +724,17 @@ input:checked + .slider::before {
|
||||
justify-self: center;
|
||||
}
|
||||
}
|
||||
+
|
||||
+#minimize {
|
||||
+ background-image: url("chrome://browser/skin/zen-icons/unpin.svg");
|
||||
+ background-color: rgba(255, 255, 255, .8);
|
||||
+ position: absolute;
|
||||
+ fill: var(--close-btn-fill-color);
|
||||
+ right: 50px;
|
||||
+ top: 10px;
|
||||
+}
|
||||
+
|
||||
+#minimize[mac="true"] {
|
||||
+ right: auto;
|
||||
+ left: 50px;
|
||||
+}
|
@@ -5,8 +5,8 @@
|
||||
"binaryName": "zen",
|
||||
"version": {
|
||||
"product": "firefox",
|
||||
"version": "136.0.1",
|
||||
"candidate": "136.0.1"
|
||||
"version": "136.0.4",
|
||||
"candidate": "136.0.4"
|
||||
},
|
||||
"buildOptions": {
|
||||
"generateBranding": true
|
||||
@@ -19,7 +19,7 @@
|
||||
"brandShortName": "Zen",
|
||||
"brandFullName": "Zen Browser",
|
||||
"release": {
|
||||
"displayVersion": "1.10b",
|
||||
"displayVersion": "1.10.3b",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
},
|
||||
@@ -39,7 +39,7 @@
|
||||
"brandShortName": "Twilight",
|
||||
"brandFullName": "Zen Twilight",
|
||||
"release": {
|
||||
"displayVersion": "1.10t",
|
||||
"displayVersion": "1.10.3t",
|
||||
"github": {
|
||||
"repo": "zen-browser/desktop"
|
||||
}
|
||||
|
Reference in New Issue
Block a user