allow opening of extension settings window on specific tab

This commit is contained in:
Tamius Han 2024-12-17 12:30:37 +01:00
parent ca1a375f2d
commit 4853d7e2fd
2 changed files with 11 additions and 8 deletions

View File

@ -134,6 +134,7 @@
:logger="logger"
:in-player="!isGlobal"
:site="site"
:defaultTab="defaultWindowTab"
@close="uwWindowVisible = false"
@preventClose="(event) => uwWindowFadeOutDisabled = event"
></PlayerUIWindow>
@ -220,10 +221,9 @@ export default {
statusFlags: {
hasDrm: undefined,
},
defaultWindowTab: 'videoSettings',
saveState: {},
selectedTab: 'videoSettings',
};
},
computed: {
@ -406,10 +406,13 @@ export default {
this.triggerZoneActive = active;
},
showUwWindow() {
showUwWindow(tab) {
this.defaultWindowTab = tab; // can be undefined
this.uwWindowFadeOut = false;
this.uwWindowVisible = true;
this.uwTriggerZoneVisible = false;
this.allowContextMenuHide();
// refresh DRM status
this.eventBus.send('get-drm-status');
@ -447,10 +450,6 @@ export default {
handleBusTunnelIn(payload) {
this.eventBus.send(payload.action, payload.config, payload.routingData);
},
selectTab(tab) {
this.selectedTab = tab;
}
}
}

View File

@ -200,7 +200,8 @@ export default {
'eventBus',
'logger',
'in-player',
'site'
'site',
'defaultTab'
],
computed: {
// LPT: NO ARROW FUNCTIONS IN COMPUTED,
@ -211,6 +212,9 @@ export default {
}
},
created() {
if (this.defaultTab) {
this.selectedTab = this.defaultTab;
}
this.siteSettings = this.settings.getSiteSettings(this.site);
this.tabs.find(x => x.id === 'changelog').highlight = !this.settings.active.whatsNewChecked;