Open the appearance page for users to configure their preferred visual theme on upgrade from 11.4.1rc3 and below.

This commit is contained in:
hackademix 2022-03-23 00:57:11 +01:00
parent c0f08ce2ec
commit 8b57885252
1 changed files with 10 additions and 0 deletions

View File

@ -314,6 +314,16 @@ var LifeCycle = (() => {
// add the lan capability to any preset which already has the script capability
await configureNewCap("lan", ["DEFAULT", "TRUSTED", "CUSTOM"], caps => caps.has("script"));
}
if (Ver.is(previousVersion, "<=", "11.4.1rc3")) {
// show theme switcher on update unless user has already chosen between Vintage Blue and Modern Red
(async () => {
let isVintage = await Themes.isVintage();
if (typeof isVintage === "boolean") return;
await ns.init;
ns.openOptionsPage({tab: 2, focus: "#opt-vintageTheme", hilite: "#sect-themes"});
})();
}
},
async onUpdateAvailable(details) {