mirror of
https://github.com/zen-browser/desktop.git
synced 2025-10-02 16:08:41 +00:00
Merge branch 'dev' into new-onboarding
This commit is contained in:
87
.github/workflows/build.yml
vendored
87
.github/workflows/build.yml
vendored
@@ -482,6 +482,7 @@ jobs:
|
||||
token: ${{ secrets.DEPLOY_KEY }}
|
||||
|
||||
- name: Download object files
|
||||
if: ${{ inputs.update_branch == 'release' }}
|
||||
run: |
|
||||
git clone https://github.com/zen-browser/windows-binaries.git .github/workflows/object
|
||||
|
||||
@@ -515,31 +516,33 @@ jobs:
|
||||
# If we are on Twilight, we want to just update the Twilight tag's release
|
||||
- name: Update Twilight tag
|
||||
if: ${{ inputs.update_branch == 'twilight' }}
|
||||
uses: marvinpinto/action-automatic-releases@master
|
||||
uses: softprops/action-gh-release@v2
|
||||
with:
|
||||
files: |
|
||||
zen.source.tar.zst
|
||||
zen.linux-x86_64.tar.xz
|
||||
zen.linux-aarch64.tar.xz
|
||||
zen-x86_64.AppImage
|
||||
zen-x86_64.AppImage.zsync
|
||||
zen-aarch64.AppImage
|
||||
zen-aarch64.AppImage.zsync
|
||||
zen.win-x86_64.zip
|
||||
zen.win-arm64.zip
|
||||
linux.mar
|
||||
linux-aarch64.mar
|
||||
windows.mar
|
||||
windows-arm64.mar
|
||||
macos.mar
|
||||
zen.installer.exe
|
||||
zen.installer-arm64.exe
|
||||
zen.macos-universal.dmg
|
||||
automatic_release_tag: 'twilight'
|
||||
title: 'Twilight build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }} at ${{ needs.build-data.outputs.build_time }})'
|
||||
./zen.source.tar.zst/*
|
||||
./zen.linux-x86_64.tar.xz/*
|
||||
./zen.linux-aarch64.tar.xz/*
|
||||
./zen-x86_64.AppImage/*
|
||||
./zen-x86_64.AppImage.zsync/*
|
||||
./zen-aarch64.AppImage/*
|
||||
./zen-aarch64.AppImage.zsync/*
|
||||
./zen.win-x86_64.zip/*
|
||||
./zen.win-arm64.zip/*
|
||||
./linux.mar/*
|
||||
./linux-aarch64.mar/*
|
||||
./windows.mar/*
|
||||
./windows-arm64.mar/*
|
||||
./macos.mar/*
|
||||
./zen.installer.exe/*
|
||||
./zen.installer-arm64.exe/*
|
||||
./zen.macos-universal.dmg/*
|
||||
tag_name: 'twilight'
|
||||
name: 'Twilight build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }} at ${{ needs.build-data.outputs.build_time }})'
|
||||
draft: false
|
||||
generate_release_notes: false
|
||||
prerelease: true
|
||||
repo_token: ${{ secrets.DEPLOY_KEY }}
|
||||
token: ${{ secrets.DEPLOY_KEY }}
|
||||
fail_on_unmatched_files: false
|
||||
env:
|
||||
GITHUB_REPOSITORY: ${{ github.repository }}
|
||||
|
||||
@@ -547,28 +550,30 @@ jobs:
|
||||
uses: marvinpinto/action-automatic-releases@master
|
||||
if: ${{ inputs.update_branch == 'release' }}
|
||||
with:
|
||||
repo_token: '${{ secrets.DEPLOY_KEY }}'
|
||||
automatic_release_tag: ${{ needs.build-data.outputs.version }}
|
||||
token: '${{ secrets.DEPLOY_KEY }}'
|
||||
tag_name: ${{ needs.build-data.outputs.version }}
|
||||
prerelease: false
|
||||
title: 'Release build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }})'
|
||||
fail_on_unmatched_files: false
|
||||
generate_release_notes: false
|
||||
name: 'Release build - ${{ needs.build-data.outputs.version }} (${{ needs.build-data.outputs.build_date }})'
|
||||
files: |
|
||||
zen.source.tar.zst
|
||||
zen.linux-x86_64.tar.xz
|
||||
zen.linux-aarch64.tar.xz
|
||||
zen-x86_64.AppImage
|
||||
zen-x86_64.AppImage.zsync
|
||||
zen-aarch64.AppImage
|
||||
zen-aarch64.AppImage.zsync
|
||||
.github/workflows/object/windows-x64-signed-x86_64/zen.win-x86_64.zip
|
||||
.github/workflows/object/windows-x64-signed-arm64/zen.win-arm64.zip
|
||||
linux.mar
|
||||
linux-aarch64.mar
|
||||
.github/workflows/object/windows-x64-signed-x86_64/windows.mar
|
||||
.github/workflows/object/windows-x64-signed-arm64/windows-arm64.mar
|
||||
macos.mar
|
||||
.github/workflows/object/windows-x64-signed-x86_64/zen.installer.exe
|
||||
.github/workflows/object/windows-x64-signed-arm64/zen.installer-arm64.exe
|
||||
zen.macos-universal.dmg
|
||||
./zen.source.tar.zst/*
|
||||
./zen.linux-x86_64.tar.xz/*
|
||||
./zen.linux-aarch64.tar.xz/*
|
||||
./zen-x86_64.AppImage/*
|
||||
./zen-x86_64.AppImage.zsync/*
|
||||
./zen-aarch64.AppImage/*
|
||||
./zen-aarch64.AppImage.zsync/*
|
||||
./.github/workflows/object/windows-x64-signed-x86_64/zen.win-x86_64.zip
|
||||
./.github/workflows/object/windows-x64-signed-arm64/zen.win-arm64.zip
|
||||
./linux.mar/*
|
||||
./linux-aarch64.mar/*
|
||||
./.github/workflows/object/windows-x64-signed-x86_64/windows.mar
|
||||
./.github/workflows/object/windows-x64-signed-arm64/windows-arm64.mar
|
||||
./macos.mar/*
|
||||
./.github/workflows/object/windows-x64-signed-x86_64/zen.installer.exe
|
||||
./.github/workflows/object/windows-x64-signed-arm64/zen.installer-arm64.exe
|
||||
./zen.macos-universal.dmg/*
|
||||
|
||||
prepare-flatpak:
|
||||
if: ${{ inputs.create_release && inputs.update_branch == 'release' }}
|
||||
|
@@ -9,7 +9,6 @@ ac_add_options --with-l10n-base="${topsrcdir}/browser/locales"
|
||||
export MOZ_USER_DIR="${name}"
|
||||
export MOZ_APP_BASENAME=Zen
|
||||
export MOZ_APP_PROFILE=${binName}
|
||||
export MOZ_APP_DISPLAYNAME="Zen"
|
||||
export MOZ_BRANDING_DIRECTORY=${brandingDir}
|
||||
export MOZ_OFFICIAL_BRANDING_DIRECTORY=${brandingDir}
|
||||
|
||||
|
15
package-lock.json
generated
15
package-lock.json
generated
@@ -9,7 +9,7 @@
|
||||
"version": "1.0.0",
|
||||
"license": "ISC",
|
||||
"dependencies": {
|
||||
"@zen-browser/surfer": "^1.9.14"
|
||||
"@zen-browser/surfer": "^1.9.18"
|
||||
},
|
||||
"devDependencies": {
|
||||
"husky": "^9.1.7",
|
||||
@@ -270,9 +270,10 @@
|
||||
"integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw=="
|
||||
},
|
||||
"node_modules/@zen-browser/surfer": {
|
||||
"version": "1.9.15",
|
||||
"resolved": "https://registry.npmjs.org/@zen-browser/surfer/-/surfer-1.9.15.tgz",
|
||||
"integrity": "sha512-mG/nTFduaXpYmGNYh5+d5ZzRX6XOkF6VEgia1nSZUoiPAXbwKblmwKro/b6uYAELTvpMCEneRl86CIU8HK++Tg==",
|
||||
"version": "1.9.18",
|
||||
"resolved": "https://registry.npmjs.org/@zen-browser/surfer/-/surfer-1.9.18.tgz",
|
||||
"integrity": "sha512-lTMQ/RkIYI1fBjvd+UWHwcZqIk3H2X0wZniwFFpQOVg3wNEjljk3DVcuxwOEy08PrQYbxEX1vfQLyyjzlJWnEw==",
|
||||
"license": "MPL-2.0",
|
||||
"dependencies": {
|
||||
"@resvg/resvg-js": "^1.4.0",
|
||||
"async-icns": "^1.0.2",
|
||||
@@ -2810,9 +2811,9 @@
|
||||
"integrity": "sha512-w+tIMs3rq2afQdsPJlODhoUEKzFP1ayaoyl1CcnwtIlsVe7K7bA1NGm4s3PraqTLlXnbIN84zuBlxBWo1u9BLw=="
|
||||
},
|
||||
"@zen-browser/surfer": {
|
||||
"version": "1.9.15",
|
||||
"resolved": "https://registry.npmjs.org/@zen-browser/surfer/-/surfer-1.9.15.tgz",
|
||||
"integrity": "sha512-mG/nTFduaXpYmGNYh5+d5ZzRX6XOkF6VEgia1nSZUoiPAXbwKblmwKro/b6uYAELTvpMCEneRl86CIU8HK++Tg==",
|
||||
"version": "1.9.18",
|
||||
"resolved": "https://registry.npmjs.org/@zen-browser/surfer/-/surfer-1.9.18.tgz",
|
||||
"integrity": "sha512-lTMQ/RkIYI1fBjvd+UWHwcZqIk3H2X0wZniwFFpQOVg3wNEjljk3DVcuxwOEy08PrQYbxEX1vfQLyyjzlJWnEw==",
|
||||
"requires": {
|
||||
"@resvg/resvg-js": "^1.4.0",
|
||||
"async-icns": "^1.0.2",
|
||||
|
@@ -41,7 +41,7 @@
|
||||
},
|
||||
"homepage": "https://github.com/zen-browser/core#readme",
|
||||
"dependencies": {
|
||||
"@zen-browser/surfer": "^1.9.16"
|
||||
"@zen-browser/surfer": "^1.9.18"
|
||||
},
|
||||
"devDependencies": {
|
||||
"husky": "^9.1.7",
|
||||
|
@@ -142,6 +142,7 @@ pref('zen.view.sidebar-expanded.max-width', 500);
|
||||
|
||||
#ifdef XP_MACOSX
|
||||
pref('zen.view.mac.show-three-dot-menu', false);
|
||||
pref('zen.widget.mac.mono-window-controls', true);
|
||||
#endif
|
||||
pref('zen.view.show-bottom-border', false);
|
||||
pref('zen.view.use-single-toolbar', true);
|
||||
|
@@ -10,6 +10,8 @@ var gZenUIManager = {
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, 'contentElementSeparation', 'zen.theme.content-element-separation', 0);
|
||||
XPCOMUtils.defineLazyPreferenceGetter(this, 'urlbarWaitToClear', 'zen.urlbar.wait-to-clear', 0);
|
||||
|
||||
gURLBar._zenTrimURL = this.urlbarTrim.bind(this);
|
||||
|
||||
ChromeUtils.defineLazyGetter(this, 'motion', () => {
|
||||
return ChromeUtils.importESModule('chrome://browser/content/zen-vendor/motion.min.mjs', { global: 'current' });
|
||||
});
|
||||
@@ -151,6 +153,8 @@ var gZenUIManager = {
|
||||
this.__currentPopupTrackElement = null;
|
||||
},
|
||||
|
||||
// Section: URL bar
|
||||
|
||||
get newtabButtons() {
|
||||
return document.querySelectorAll('#tabs-newtab-button');
|
||||
},
|
||||
@@ -214,6 +218,14 @@ var gZenUIManager = {
|
||||
}
|
||||
},
|
||||
|
||||
urlbarTrim(aURL) {
|
||||
if (gZenVerticalTabsManager._hasSetSingleToolbar) {
|
||||
let url = BrowserUIUtils.removeSingleTrailingSlashFromURL(aURL);
|
||||
return url.startsWith('http://') || url.startsWith('https://') ? url.split('/')[2] : url;
|
||||
}
|
||||
return BrowserUIUtils.trimURL(aURL);
|
||||
},
|
||||
|
||||
// Section: Notification messages
|
||||
_createToastElement(messageId, options) {
|
||||
const element = document.createXULElement('vbox');
|
||||
@@ -234,7 +246,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', duration: 0.3 });
|
||||
await this.motion.animate(toast, { opacity: [0, 1], scale: [0.8, 1] }, { type: 'spring', bounce: 0.4 });
|
||||
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;
|
||||
|
@@ -152,12 +152,33 @@
|
||||
gap: var(--zen-element-separation);
|
||||
}
|
||||
|
||||
@media not (-moz-platform: macos) {
|
||||
.titlebar-buttonbox-container {
|
||||
height: 100%;
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-platform: macos) {
|
||||
.titlebar-buttonbox-container {
|
||||
margin-inline-end: 8px;
|
||||
padding: 3px 0;
|
||||
|
||||
& > .titlebar-buttonbox {
|
||||
margin-inline-start: var(--zen-toolbox-padding);
|
||||
}
|
||||
}
|
||||
|
||||
@media (-moz-bool-pref: 'zen.widget.mac.mono-window-controls') {
|
||||
.titlebar-buttonbox-container {
|
||||
/* Draw 3 dots as background to represent the window controls,
|
||||
all with the same cololr as the titlebar */
|
||||
background-image: radial-gradient(circle, var(--zen-toolbar-element-bg) 6px, transparent 0.5px);
|
||||
background-size: 20px 22px;
|
||||
background-position: 53% 50%;
|
||||
|
||||
&:not([zen-has-hover='true']) > .titlebar-buttonbox {
|
||||
opacity: 0;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
@@ -132,8 +132,9 @@
|
||||
|
||||
:root[zen-single-toolbar='true'] {
|
||||
.urlbar-page-action:not([open]),
|
||||
.identity-box-button:not([open]),
|
||||
#tracking-protection-icon-container {
|
||||
margin-inline-end: calc(-14px - 2 * var(--urlbar-icon-padding)) !important;
|
||||
margin-inline-end: calc(-8px - 2 * var(--urlbar-icon-padding)) !important;
|
||||
opacity: 0;
|
||||
transition: all 0.1s ease;
|
||||
}
|
||||
@@ -142,9 +143,10 @@
|
||||
visibility: collapse;
|
||||
}
|
||||
|
||||
#urlbar[open] :is(#tracking-protection-icon-container, .urlbar-page-action),
|
||||
#urlbar:hover :is(#tracking-protection-icon-container, .urlbar-page-action),
|
||||
#urlbar[open] :is(#tracking-protection-icon-container, .urlbar-page-action, .identity-box-button),
|
||||
#urlbar:hover :is(#tracking-protection-icon-container, .urlbar-page-action, .identity-box-button),
|
||||
.urlbar-page-action[open],
|
||||
.identity-box-button[open],
|
||||
#tracking-protection-icon-container[open] {
|
||||
opacity: 1;
|
||||
margin-inline-end: 0 !important;
|
||||
|
@@ -292,6 +292,9 @@ var gZenCompactModeManager = {
|
||||
element: document.getElementById('zen-appcontent-navbar-container'),
|
||||
screenEdge: 'top',
|
||||
},
|
||||
{
|
||||
element: gZenVerticalTabsManager.actualWindowButtons,
|
||||
},
|
||||
];
|
||||
},
|
||||
|
||||
@@ -336,9 +339,15 @@ var gZenCompactModeManager = {
|
||||
target.addEventListener('mouseleave', (event) => {
|
||||
// If on Mac, ignore mouseleave in the area of window buttons
|
||||
if (AppConstants.platform == 'macosx') {
|
||||
const MAC_WINDOW_BUTTONS_X_BORDER = 75;
|
||||
const MAC_WINDOW_BUTTONS_Y_BORDER = 40;
|
||||
if (event.clientX < MAC_WINDOW_BUTTONS_X_BORDER && event.clientY < MAC_WINDOW_BUTTONS_Y_BORDER) {
|
||||
const buttonRect = gZenVerticalTabsManager.actualWindowButtons.getBoundingClientRect();
|
||||
const MAC_WINDOW_BUTTONS_X_BORDER = buttonRect.width + buttonRect.x;
|
||||
const MAC_WINDOW_BUTTONS_Y_BORDER = buttonRect.height + buttonRect.y;
|
||||
if (
|
||||
event.clientX < MAC_WINDOW_BUTTONS_X_BORDER &&
|
||||
event.clientY < MAC_WINDOW_BUTTONS_Y_BORDER &&
|
||||
event.clientX > buttonRect.x &&
|
||||
event.clientY > buttonRect.y
|
||||
) {
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
@@ -290,6 +290,9 @@
|
||||
for (let otherTab of gBrowser.tabs) {
|
||||
if (otherTab.pinned && otherTab._tPos > tab.position) {
|
||||
const actualPin = this._pinsCache.find((pin) => pin.uuid === otherTab.getAttribute('zen-pin-id'));
|
||||
if (!actualPin) {
|
||||
continue;
|
||||
}
|
||||
actualPin.position = otherTab._tPos;
|
||||
await ZenPinnedTabsStorage.savePin(actualPin, false);
|
||||
}
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/components/urlbar/UrlbarInput.sys.mjs b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
index 50968dc04b527438acf30151f0c2e92f8b45097c..f8587b68ac057bb0f829fc21f08ade6605b14c92 100644
|
||||
index 50968dc04b527438acf30151f0c2e92f8b45097c..ff77a2407b8ca628bcad06a9822ba2dbf0d43a51 100644
|
||||
--- a/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
+++ b/browser/components/urlbar/UrlbarInput.sys.mjs
|
||||
@@ -67,6 +67,13 @@ XPCOMUtils.defineLazyPreferenceGetter(
|
||||
@@ -89,6 +89,15 @@ index 50968dc04b527438acf30151f0c2e92f8b45097c..f8587b68ac057bb0f829fc21f08ade66
|
||||
this.removeAttribute("breakout-extend");
|
||||
this.#updateTextboxPosition();
|
||||
}
|
||||
@@ -2946,7 +2978,7 @@ export class UrlbarInput {
|
||||
*/
|
||||
_trimValue(val) {
|
||||
let trimmedValue = lazy.UrlbarPrefs.get("trimURLs")
|
||||
- ? lazy.BrowserUIUtils.trimURL(val)
|
||||
+ ? this._zenTrimURL(val)
|
||||
: val;
|
||||
// Only trim value if the directionality doesn't change to RTL and we're not
|
||||
// showing a strikeout https protocol.
|
||||
@@ -3305,7 +3337,7 @@ export class UrlbarInput {
|
||||
} else {
|
||||
where = lazy.BrowserUtils.whereToOpenLink(event, false, false);
|
||||
|
@@ -1,8 +1,8 @@
|
||||
diff --git a/modules/libpref/init/StaticPrefList.yaml b/modules/libpref/init/StaticPrefList.yaml
|
||||
index 7364514f74703184462e8dbce3f0aafc3f850a3d..560671beddf6c216e918a47bd5dbd4e770a24ec7 100644
|
||||
index ce2393978f77f55f42ae9b97e5d40328ce8eaae4..a426679de76c2d172974ec87f5fe48e22d5ab7b0 100644
|
||||
--- a/modules/libpref/init/StaticPrefList.yaml
|
||||
+++ b/modules/libpref/init/StaticPrefList.yaml
|
||||
@@ -18067,7 +18067,7 @@
|
||||
@@ -18060,7 +18060,7 @@
|
||||
# Whether we use the mica backdrop. Off by default for now.
|
||||
- name: widget.windows.mica
|
||||
type: bool
|
||||
@@ -11,7 +11,7 @@ index 7364514f74703184462e8dbce3f0aafc3f850a3d..560671beddf6c216e918a47bd5dbd4e7
|
||||
mirror: once
|
||||
#endif
|
||||
|
||||
@@ -18180,6 +18180,26 @@
|
||||
@@ -18173,6 +18173,19 @@
|
||||
mirror: always
|
||||
#endif
|
||||
|
||||
@@ -21,13 +21,6 @@ index 7364514f74703184462e8dbce3f0aafc3f850a3d..560671beddf6c216e918a47bd5dbd4e7
|
||||
+ value: true
|
||||
+ mirror: never
|
||||
+
|
||||
+#ifdef XP_MACOSX
|
||||
+- name: zen.widget.mac.mono-window-controls
|
||||
+ type: RelaxedAtomicBool
|
||||
+ value: false
|
||||
+ mirror: always
|
||||
+#endif
|
||||
+
|
||||
+#ifdef XP_WIN
|
||||
+- name: zen.widget.windows.acrylic
|
||||
+ type: bool
|
||||
|
@@ -1,27 +0,0 @@
|
||||
diff --git a/widget/cocoa/nsCocoaWindow.mm b/widget/cocoa/nsCocoaWindow.mm
|
||||
index f1c87dd8faef8c6caf9248ce7d9f40c12f5db9f6..f5280b8fc6cf46d3941d1ff04835b12dd2755170 100644
|
||||
--- a/widget/cocoa/nsCocoaWindow.mm
|
||||
+++ b/widget/cocoa/nsCocoaWindow.mm
|
||||
@@ -51,6 +51,7 @@
|
||||
#include "mozilla/ScopeExit.h"
|
||||
#include "mozilla/StaticPrefs_gfx.h"
|
||||
#include "mozilla/StaticPrefs_widget.h"
|
||||
+#include "mozilla/StaticPrefs_zen.h"
|
||||
#include "mozilla/WritingModes.h"
|
||||
#include "mozilla/layers/CompositorBridgeChild.h"
|
||||
#include "mozilla/widget/Screen.h"
|
||||
@@ -682,9 +683,11 @@ static unsigned int WindowMaskForBorderStyle(BorderStyle aBorderStyle) {
|
||||
continue;
|
||||
}
|
||||
NSWindow* win = ancestor->GetCocoaWindow();
|
||||
- [[win standardWindowButton:NSWindowCloseButton] setEnabled:!aModal];
|
||||
- [[win standardWindowButton:NSWindowMiniaturizeButton] setEnabled:!aModal];
|
||||
- [[win standardWindowButton:NSWindowZoomButton] setEnabled:!aModal];
|
||||
+
|
||||
+ auto zenBtnEnabled = StaticPrefs::zen_widget_mac_mono_window_controls() ? false : !aModal;
|
||||
+ [[win standardWindowButton:NSWindowCloseButton] setEnabled:zenBtnEnabled];
|
||||
+ [[win standardWindowButton:NSWindowMiniaturizeButton] setEnabled:zenBtnEnabled];
|
||||
+ [[win standardWindowButton:NSWindowZoomButton] setEnabled:zenBtnEnabled];
|
||||
}
|
||||
if (aModal) {
|
||||
mWindow.level = NSModalPanelWindowLevel;
|
Reference in New Issue
Block a user