Fix problem where 'default' is always 'disabled'
This commit is contained in:
parent
f0840b78e1
commit
a5c9835d9d
@ -175,7 +175,7 @@ export default {
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.tabs.find(x => x.id === 'changelog').highlight = !this.settings.active.whatsNewChecked;
|
||||
this.tabs.find(x => x.id === 'changelog').highlight = !this.settings.active?.whatsNewChecked;
|
||||
},
|
||||
async created() {
|
||||
this.logger = new Logger();
|
||||
|
@ -206,7 +206,7 @@ export default {
|
||||
this.selectedTab = this.defaultTab;
|
||||
}
|
||||
this.siteSettings = this.settings.getSiteSettings(this.site);
|
||||
this.tabs.find(x => x.id === 'changelog').highlight = !this.settings.active.whatsNewChecked;
|
||||
this.tabs.find(x => x.id === 'changelog').highlight = !this.settings.active?.whatsNewChecked;
|
||||
|
||||
this.eventBus.subscribe(
|
||||
'uw-show-ui',
|
||||
|
@ -352,12 +352,15 @@ export default {
|
||||
return '??';
|
||||
}
|
||||
},
|
||||
mounted() {
|
||||
this.forceRefreshPage();
|
||||
},
|
||||
methods: {
|
||||
/**
|
||||
* Compiles our extension settings into more user-friendly options
|
||||
*/
|
||||
compileSimpleSettings(component, getFor = 'site') {
|
||||
// console.log('compiling simple settings!', component, getFor, 'site settings?', this.siteSettings);
|
||||
|
||||
let settingsData;
|
||||
switch (getFor) {
|
||||
case 'site':
|
||||
@ -517,6 +520,9 @@ export default {
|
||||
|
||||
// we also need to force re-compute all watchers, otherwise UI will lag behind
|
||||
// actual state of settings until reload
|
||||
this.forceRefreshPage();
|
||||
},
|
||||
forceRefreshPage() {
|
||||
this._computedWatchers?.simpleExtensionSettings?.run();
|
||||
this._computedWatchers?.simpleDefaultSettings?.run();
|
||||
this._computedWatchers?.siteDefaultCrop?.run();
|
||||
@ -527,6 +533,7 @@ export default {
|
||||
|
||||
this.$nextTick( () => this.$forceUpdate());
|
||||
},
|
||||
|
||||
setExtensionMode(component, event) {
|
||||
const option = event.target.value;
|
||||
|
||||
|
@ -30,7 +30,7 @@ export class SiteSettings {
|
||||
this.settings = settings;
|
||||
this.raw = settings.active.sites[site];
|
||||
this.site = site;
|
||||
this.defaultSettings = settings.default.sites['@global'];
|
||||
this.defaultSettings = settings.active.sites['@global'];
|
||||
|
||||
this.compileSettingsObject();
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user