feat: Added migration for old accent colors and fixed private mode, b=no-bug, c=common, workspaces

This commit is contained in:
Mr. M
2025-09-02 01:39:57 +02:00
parent 458f502184
commit 57635ff586
2 changed files with 11 additions and 2 deletions

View File

@@ -6,7 +6,7 @@ const { AppConstants } = ChromeUtils.importESModule('resource://gre/modules/AppC
class nsZenUIMigration {
PREF_NAME = 'zen.ui.migration.version';
MIGRATION_VERSION = 2;
MIGRATION_VERSION = 3;
init(isNewProfile) {
if (!isNewProfile) {
@@ -71,6 +71,12 @@ class nsZenUIMigration {
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();

View File

@@ -2633,7 +2633,10 @@ var gZenWorkspaces = new (class extends nsZenMultiWindowFeature {
'zen-context-menu-new-folder-toolbar',
];
commandsToDisable.forEach((cmd) => {
document.getElementById(cmd).setAttribute('disabled', true);
const element = document.getElementById(cmd);
if (element) {
element.setAttribute('disabled', true);
}
});
return;
}