Fix invalid default values for popupTheme and popupOuterTheme (#2180)
* Fix invalid default values for popupTheme and popupOuterTheme * Options update
This commit is contained in:
parent
0b1ad40347
commit
ada4df1971
@ -215,12 +215,12 @@
|
||||
"popupTheme": {
|
||||
"type": "string",
|
||||
"enum": ["light", "dark", "browser"],
|
||||
"default": "default"
|
||||
"default": "light"
|
||||
},
|
||||
"popupOuterTheme": {
|
||||
"type": "string",
|
||||
"enum": ["light", "dark", "browser", "site"],
|
||||
"default": "default"
|
||||
"default": "light"
|
||||
},
|
||||
"customPopupCss": {
|
||||
"type": "string",
|
||||
|
@ -980,8 +980,17 @@ class OptionsUtil {
|
||||
_updateVersion20(options) {
|
||||
// Version 20 changes:
|
||||
// Added anki.downloadTimeout.
|
||||
// Fixed general.popupTheme invalid default.
|
||||
// Fixed general.popupOuterTheme invalid default.
|
||||
for (const profile of options.profiles) {
|
||||
profile.options.anki.downloadTimeout = 0;
|
||||
const {general} = profile.options;
|
||||
if (general.popupTheme === 'default') {
|
||||
general.popupTheme = 'light';
|
||||
}
|
||||
if (general.popupOuterTheme === 'default') {
|
||||
general.popupOuterTheme = 'light';
|
||||
}
|
||||
}
|
||||
return options;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user