mirror of
https://github.com/zen-browser/desktop.git
synced 2025-09-07 11:58:20 +00:00
feat: Added migration for old accent colors and fixed private mode, b=no-bug, c=common, workspaces
This commit is contained in:
@@ -6,7 +6,7 @@ const { AppConstants } = ChromeUtils.importESModule('resource://gre/modules/AppC
|
|||||||
|
|
||||||
class nsZenUIMigration {
|
class nsZenUIMigration {
|
||||||
PREF_NAME = 'zen.ui.migration.version';
|
PREF_NAME = 'zen.ui.migration.version';
|
||||||
MIGRATION_VERSION = 2;
|
MIGRATION_VERSION = 3;
|
||||||
|
|
||||||
init(isNewProfile) {
|
init(isNewProfile) {
|
||||||
if (!isNewProfile) {
|
if (!isNewProfile) {
|
||||||
@@ -71,6 +71,12 @@ class nsZenUIMigration {
|
|||||||
Services.prefs.setIntPref('zen.theme.gradient-legacy-version', 0);
|
Services.prefs.setIntPref('zen.theme.gradient-legacy-version', 0);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
_migrateV3() {
|
||||||
|
if (Services.prefs.getStringPref('zen.theme.accent-color', '').startsWith('system')) {
|
||||||
|
Services.prefs.setStringPref('zen.theme.accent-color', '#ffb787');
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
export var gZenUIMigration = new nsZenUIMigration();
|
export var gZenUIMigration = new nsZenUIMigration();
|
||||||
|
@@ -2633,7 +2633,10 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
|
|||||||
'zen-context-menu-new-folder-toolbar',
|
'zen-context-menu-new-folder-toolbar',
|
||||||
];
|
];
|
||||||
commandsToDisable.forEach((cmd) => {
|
commandsToDisable.forEach((cmd) => {
|
||||||
document.getElementById(cmd).setAttribute('disabled', true);
|
const element = document.getElementById(cmd);
|
||||||
|
if (element) {
|
||||||
|
element.setAttribute('disabled', true);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user