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