Fixed icons colors and other details
@@ -33,8 +33,6 @@
|
||||
|
||||
this._initSidebarScrolling();
|
||||
|
||||
gZenUIMigration.init();
|
||||
|
||||
gZenCompactModeManager.init();
|
||||
ZenWorkspaces.init();
|
||||
gZenVerticalTabsManager.init();
|
||||
|
@@ -1,5 +1,5 @@
|
||||
diff --git a/browser/base/content/browser-init.js b/browser/base/content/browser-init.js
|
||||
index 63100defacf66c6b3232b9e0a783a5fd14e3a46a..eb7ed966628a595847b850f981418d425b78f14b 100644
|
||||
index 63100defacf66c6b3232b9e0a783a5fd14e3a46a..22b79b021ff0baab4dac602447a124308208c828 100644
|
||||
--- a/browser/base/content/browser-init.js
|
||||
+++ b/browser/base/content/browser-init.js
|
||||
@@ -162,13 +162,15 @@ var gBrowserInit = {
|
||||
@@ -19,12 +19,11 @@ index 63100defacf66c6b3232b9e0a783a5fd14e3a46a..eb7ed966628a595847b850f981418d42
|
||||
if (isVerticalTabs) {
|
||||
// Show the vertical tabs toolbar
|
||||
setToolbarVisibility(
|
||||
@@ -287,6 +289,11 @@ var gBrowserInit = {
|
||||
@@ -287,6 +289,10 @@ var gBrowserInit = {
|
||||
gPrivateBrowsingUI.init();
|
||||
BrowserSearch.init();
|
||||
BrowserPageActions.init();
|
||||
+
|
||||
+Services.scriptloader.loadSubScript("chrome://browser/content/zen-components/ZenUIMigration.mjs", window);
|
||||
+Services.scriptloader.loadSubScript("chrome://browser/content/ZenStartup.mjs", window);
|
||||
+Services.scriptloader.loadSubScript("chrome://browser/content/zenThemeModifier.js", window);
|
||||
+
|
||||
|
@@ -1016,7 +1016,7 @@
|
||||
position: relative;
|
||||
|
||||
&::before {
|
||||
background: light-dark(rgba(255, 255, 255, 0.85), rgba(68, 64, 64, 0.85));
|
||||
backdrop-filter: invert(0.5);
|
||||
margin: 2px;
|
||||
border-radius: calc(var(--border-radius-medium) - 2px);
|
||||
position: absolute;
|
||||
|
@@ -41,9 +41,15 @@ var gZenCompactModeManager = {
|
||||
|
||||
get preference() {
|
||||
if (!document.documentElement.hasAttribute('zen-compact-mode')) {
|
||||
document.documentElement.setAttribute(
|
||||
'zen-compact-mode',
|
||||
lazyCompactMode.mainAppWrapper.getAttribute('zen-compact-mode')
|
||||
window.addEventListener(
|
||||
'MozAfterPaint',
|
||||
() => {
|
||||
document.documentElement.setAttribute(
|
||||
'zen-compact-mode',
|
||||
lazyCompactMode.mainAppWrapper.getAttribute('zen-compact-mode')
|
||||
);
|
||||
},
|
||||
{ once: true }
|
||||
);
|
||||
}
|
||||
return lazyCompactMode.mainAppWrapper.getAttribute('zen-compact-mode') === 'true';
|
||||
|
@@ -1,60 +1,64 @@
|
||||
{
|
||||
const PREF_NAME = 'zen.migration.version';
|
||||
const MIGRATION_VERSION = 1;
|
||||
const lazy = {};
|
||||
|
||||
class ZenUIMigration {
|
||||
init() {
|
||||
if (Services.prefs.prefHasUserValue(PREF_NAME)) {
|
||||
this._migrate();
|
||||
}
|
||||
this.clearVariables();
|
||||
ChromeUtils.defineESModuleGetters(lazy, {
|
||||
BrowserWindowTracker: 'resource:///modules/BrowserWindowTracker.sys.mjs',
|
||||
});
|
||||
|
||||
class ZenUIMigration {
|
||||
PREF_NAME = 'zen.migration.version';
|
||||
MIGRATION_VERSION = 1;
|
||||
|
||||
init(isNewProfile, win) {
|
||||
console.log(isNewProfile, win);
|
||||
if (!isNewProfile) {
|
||||
this._migrate(win);
|
||||
}
|
||||
this.clearVariables();
|
||||
}
|
||||
|
||||
get _migrationVersion() {
|
||||
return Services.prefs.getIntPref(PREF_NAME, 0);
|
||||
}
|
||||
get _migrationVersion() {
|
||||
return Services.prefs.getIntPref(this.PREF_NAME, 0);
|
||||
}
|
||||
|
||||
set _migrationVersion(value) {
|
||||
Services.prefs.setIntPref(PREF_NAME, value);
|
||||
}
|
||||
set _migrationVersion(value) {
|
||||
Services.prefs.setIntPref(this.PREF_NAME, value);
|
||||
}
|
||||
|
||||
_migrate() {
|
||||
if (this._migrationVersion < 1) {
|
||||
this._migrateV1();
|
||||
}
|
||||
}
|
||||
|
||||
clearVariables() {
|
||||
this._migrationVersion = MIGRATION_VERSION;
|
||||
window.gZenUIMigration = null;
|
||||
}
|
||||
|
||||
async _migrateV1() {
|
||||
// Introduction of the new URL bar, show a message to the user
|
||||
const notification = gNotificationBox.appendNotification(
|
||||
'zen-new-urlbar-notification',
|
||||
{
|
||||
label: { 'l10n-id': 'zen-new-urlbar-notification' },
|
||||
image: 'chrome://browser/skin/notification-icons/persistent-storage-blocked.svg',
|
||||
priority: gNotificationBox.PRIORITY_WARNING_HIGH,
|
||||
},
|
||||
[
|
||||
{
|
||||
'l10n-id': 'zen-disable',
|
||||
accessKey: 'D',
|
||||
callback: () => {
|
||||
Services.prefs.setBoolPref('zen.urlbar.replace-newtab', false);
|
||||
},
|
||||
},
|
||||
{
|
||||
link: 'https://docs.zen-browser.app/user-manual/urlbar/',
|
||||
'l10n-id': 'zen-learn-more-text',
|
||||
},
|
||||
]
|
||||
);
|
||||
notification.persistence = -1;
|
||||
_migrate(win) {
|
||||
if (this._migrationVersion < 1) {
|
||||
this._migrateV1(win);
|
||||
}
|
||||
}
|
||||
|
||||
window.gZenUIMigration = new ZenUIMigration();
|
||||
clearVariables() {
|
||||
this._migrationVersion = this.MIGRATION_VERSION;
|
||||
}
|
||||
|
||||
async _migrateV1(win) {
|
||||
// Introduction of the new URL bar, show a message to the user
|
||||
const notification = win.gNotificationBox.appendNotification(
|
||||
'zen-new-urlbar-notification',
|
||||
{
|
||||
label: { 'l10n-id': 'zen-new-urlbar-notification' },
|
||||
image: 'chrome://browser/skin/notification-icons/persistent-storage-blocked.svg',
|
||||
priority: win.gNotificationBox.PRIORITY_WARNING_HIGH,
|
||||
},
|
||||
[
|
||||
{
|
||||
'l10n-id': 'zen-disable',
|
||||
accessKey: 'D',
|
||||
callback: () => {
|
||||
Services.prefs.setBoolPref('zen.urlbar.replace-newtab', false);
|
||||
},
|
||||
},
|
||||
{
|
||||
link: 'https://docs.zen-browser.app/user-manual/urlbar/',
|
||||
'l10n-id': 'zen-learn-more-text',
|
||||
},
|
||||
]
|
||||
);
|
||||
notification.persistence = -1;
|
||||
}
|
||||
}
|
||||
|
||||
export var gZenUIMigration = new ZenUIMigration();
|
||||
|
@@ -1,8 +1,24 @@
|
||||
diff --git a/browser/components/BrowserGlue.sys.mjs b/browser/components/BrowserGlue.sys.mjs
|
||||
index 2de73e75bf98b21dde9ec05213a66f9e9039200f..04ab3ea4c47d674778e8965654867c4cf0f99161 100644
|
||||
index b888a753a7f23a9800fe04da51a4e6b898314ff2..35eea774e1ea4b1807ec65ebc767f423d81602bd 100644
|
||||
--- a/browser/components/BrowserGlue.sys.mjs
|
||||
+++ b/browser/components/BrowserGlue.sys.mjs
|
||||
@@ -4643,6 +4643,7 @@ BrowserGlue.prototype = {
|
||||
@@ -121,6 +121,7 @@ ChromeUtils.defineESModuleGetters(lazy, {
|
||||
WindowsGPOParser: "resource://gre/modules/policies/WindowsGPOParser.sys.mjs",
|
||||
clearTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
setTimeout: "resource://gre/modules/Timer.sys.mjs",
|
||||
+ gZenUIMigration: "chrome://browser/content/zen-components/ZenUIMigration.mjs",
|
||||
});
|
||||
|
||||
if (AppConstants.MOZ_UPDATER) {
|
||||
@@ -1951,6 +1952,7 @@ BrowserGlue.prototype = {
|
||||
|
||||
lazy.UrlbarPrefs.updateFirefoxSuggestScenario();
|
||||
|
||||
+ lazy.gZenUIMigration.init(this._isNewProfile, aWindow);
|
||||
// A channel for "remote troubleshooting" code...
|
||||
let channel = new lazy.WebChannel(
|
||||
"remote-troubleshooting",
|
||||
@@ -4761,6 +4763,7 @@ BrowserGlue.prototype = {
|
||||
},
|
||||
|
||||
async _maybeShowDefaultBrowserPrompt() {
|
||||
@@ -10,7 +26,7 @@ index 2de73e75bf98b21dde9ec05213a66f9e9039200f..04ab3ea4c47d674778e8965654867c4c
|
||||
// Highest priority is about:welcome window modal experiment
|
||||
// Second highest priority is the upgrade dialog, which can include a "primary
|
||||
// browser" request and is limited in various ways, e.g., major upgrades.
|
||||
@@ -5169,6 +5170,16 @@ BrowserGlue.prototype = {
|
||||
@@ -5302,6 +5305,16 @@ BrowserGlue.prototype = {
|
||||
"nsIObserver",
|
||||
"nsISupportsWeakReference",
|
||||
]),
|
||||
|
@@ -3,7 +3,7 @@
|
||||
- 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="black" fill-opacity="context-fill-opacity">
|
||||
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="currentColor" fill-opacity="context-fill-opacity">
|
||||
<defs><clipPath id="a"><path d="M2.1 0 16 13.9V0zM0 .7V16h15.3z"/></clipPath></defs>
|
||||
<path clip-path="url(#a)" d="M4 1a3 3 0 0 0-3 3v8a3 3 0 0 0 3 3h8a3 3 0 0 0 3-3V4a3 3 0 0 0-3-3H4zm0 1h8a2 2 0 0 1 2 2v8c0 .373-.102.72-.28 1.02L9.05 8.432a1.5 1.5 0 0 0-2.101 0l-4.67 4.588a1.988 1.988 0 0 1-.28-1.02V4a2 2 0 0 1 2-2zm6.5 2a1.5 1.5 0 1 0 0 3 1.5 1.5 0 0 0 0-3zm0 1a.5.5 0 1 1 0 1 .5.5 0 0 1 0-1zM8 9.002c.127 0 .252.047.35.143l4.662 4.582A1.99 1.99 0 0 1 12 14H4c-.37 0-.715-.099-1.012-.273L7.65 9.145A.496.496 0 0 1 8 9.002z"/>
|
||||
<path d="M.5 0a.5.5 0 0 0-.354.146.5.5 0 0 0 0 .707l15 15a.5.5 0 0 0 .707 0 .5.5 0 0 0 0-.707l-15-15A.5.5 0 0 0 .499 0z"/>
|
||||
|
Before Width: | Height: | Size: 999 B After Width: | Height: | Size: 1006 B |
@@ -3,4 +3,4 @@
|
||||
- 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 id="a" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="black" fill-opacity="context-fill-opacity"><path d="M14.7498,13.0913c-.0154.9253-.7896,1.6587-1.715,1.6587h-6.956c-.2705,0-.4541-.275-.3505-.5248l.0024-.0057c.4574-1.1044,1.1996-2.0362,2.1473-2.7161.1179-.0846.2601-.1284.4052-.1284h4.7793c.9416,0,1.703.7711,1.6873,1.7163Z"/><path d="M9.9212,1.25c.2705,0,.4541.275.3505.5248l-.0024.0057c-.4574,1.1044-1.1996,2.0362-2.1473,2.7161-.1179.0846-.2601.1284-.4052.1284H2.9653c-.9254,0-1.6996-.7334-1.715-1.6587-.0158-.9452.7457-1.7163,1.6873-1.7163h6.9837Z"/><path d="M2.9372,14.75c-.2152,0-.4339-.0414-.6451-.1289-.861-.3566-1.2699-1.3437-.9132-2.2047.5485-1.3241,1.3346-2.5112,2.3367-3.5283,1.0381-1.0537,2.2623-1.877,3.6387-2.4471,1.8919-.7837,3.3654-2.2571,4.149-4.149.3566-.861,1.3437-1.2698,2.2047-.9132.861.3566,1.2699,1.3437.9132,2.2047-.5485,1.3241-1.3346,2.5112-2.3367,3.5283-1.0381,1.0537-2.2623,1.877-3.6387,2.4471-1.8919.7837-3.3654,2.2571-4.149,4.149-.2691.6498-.8975,1.0421-1.5596,1.0421Z"/></svg>
|
||||
<svg id="a" xmlns="http://www.w3.org/2000/svg" width="16" height="16" viewBox="0 0 16 16" fill="currentColor" fill-opacity="context-fill-opacity"><path d="M14.7498,13.0913c-.0154.9253-.7896,1.6587-1.715,1.6587h-6.956c-.2705,0-.4541-.275-.3505-.5248l.0024-.0057c.4574-1.1044,1.1996-2.0362,2.1473-2.7161.1179-.0846.2601-.1284.4052-.1284h4.7793c.9416,0,1.703.7711,1.6873,1.7163Z"/><path d="M9.9212,1.25c.2705,0,.4541.275.3505.5248l-.0024.0057c-.4574,1.1044-1.1996,2.0362-2.1473,2.7161-.1179.0846-.2601.1284-.4052.1284H2.9653c-.9254,0-1.6996-.7334-1.715-1.6587-.0158-.9452.7457-1.7163,1.6873-1.7163h6.9837Z"/><path d="M2.9372,14.75c-.2152,0-.4339-.0414-.6451-.1289-.861-.3566-1.2699-1.3437-.9132-2.2047.5485-1.3241,1.3346-2.5112,2.3367-3.5283,1.0381-1.0537,2.2623-1.877,3.6387-2.4471,1.8919-.7837,3.3654-2.2571,4.149-4.149.3566-.861,1.3437-1.2698,2.2047-.9132.861.3566,1.2699,1.3437.9132,2.2047-.5485,1.3241-1.3346,2.5112-2.3367,3.5283-1.0381,1.0537-2.2623,1.877-3.6387,2.4471-1.8919.7837-3.3654,2.2571-4.149,4.149-.2691.6498-.8975,1.0421-1.5596,1.0421Z"/></svg>
|
||||
|
Before Width: | Height: | Size: 1.2 KiB After Width: | Height: | Size: 1.2 KiB |
@@ -3,7 +3,7 @@
|
||||
- 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="black" fill-opacity="context-fill-opacity">
|
||||
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="currentColor" fill-opacity="context-fill-opacity">
|
||||
<path d="M2.5 1A2.5 2.5 0 0 0 0 3.5v8A2.5 2.5 0 0 0 2.5 14h11a2.5 2.5 0 0 0 2.5-2.5v-8A2.5 2.5 0 0 0 13.5 1h-11zm0 1h11A1.5 1.5 0 0 1 15 3.5v.3L8 7.92 1 3.803V3.5A1.5 1.5 0 0 1 2.5 2zM15 4.961V11.5a1.5 1.5 0 0 1-1.5 1.5h-11A1.5 1.5 0 0 1 1 11.5V4.963l6.746 3.969.082.037a.5.5 0 0 0 .426-.037L15 4.961z"/>
|
||||
</svg>
|
||||
a<svg xmlns="http://www.w3.org/2000/svg" height="18" width="18" viewBox="0 0 18 18"><g stroke-linecap="round" stroke-width="1.5" fill="none" stroke="currentColor" stroke-linejoin="round" class="nc-icon-wrapper"><path d="M1.75,5.75l6.767,3.733c.301,.166,.665,.166,.966,0l6.767-3.733" data-color="color-2"></path><rect x="1.75" y="3.25" width="14.5" height="11.5" rx="2" ry="2" transform="translate(18 18) rotate(180)"></rect></g></svg>
|
||||
|
Before Width: | Height: | Size: 1.1 KiB After Width: | Height: | Size: 1.1 KiB |
@@ -3,6 +3,6 @@
|
||||
- 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="black" fill-opacity="context-fill-opacity">
|
||||
<svg width="16" height="16" xmlns="http://www.w3.org/2000/svg" fill="currentColor" fill-opacity="context-fill-opacity">
|
||||
<path d="M.5 2a.5.5 0 0 0-.5.5v11a.5.5 0 0 0 .5.5h15a.5.5 0 0 0 .5-.5v-11a.5.5 0 0 0-.5-.5H.5zM1 3h14v4H1V3zm2.711 1a.75.75 0 1 0 .04 0h-.04zM10.5 4a.5.5 0 0 0 0 1h2a.5.5 0 0 0 0-1h-2zm-4.289.002a.75.75 0 1 0 .04 0h-.04zM1 8h2v3.5a.5.5 0 0 0 1 0V8h2v3.5a.5.5 0 0 0 1 0V8h2v3.5a.5.5 0 0 0 1 0V8h2v3.5a.5.5 0 0 0 1 0V8h2v5H1V8z"/>
|
||||
</svg>
|
||||
|
Before Width: | Height: | Size: 671 B After Width: | Height: | Size: 678 B |
@@ -3,6 +3,6 @@
|
||||
- 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="black" fill-opacity="context-fill-opacity">
|
||||
<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: 695 B After Width: | Height: | Size: 702 B |