Extension settings now holds both extension and site settings
This commit is contained in:
parent
c7f24133e5
commit
57261b5094
@ -150,9 +150,9 @@ export default {
|
|||||||
tabs: [
|
tabs: [
|
||||||
{id: 'videoSettings', label: 'Video settings', icon: 'crop'},
|
{id: 'videoSettings', label: 'Video settings', icon: 'crop'},
|
||||||
{id: 'playerDetection', label: 'Player detection', icon: 'television-play'},
|
{id: 'playerDetection', label: 'Player detection', icon: 'television-play'},
|
||||||
{id: 'extensionSettings', label: 'Extension options', icon: 'cogs' },
|
{id: 'extensionSettings', label: 'Site and Extension options', icon: 'cogs' },
|
||||||
{id: 'autodetectionSettings', label: 'Autodetection options', icon: ''},
|
{id: 'autodetectionSettings', label: 'Autodetection options', icon: ''},
|
||||||
{id: 'advancedOptions', label: 'Advanced options', icon: 'cogs' },
|
// {id: 'advancedOptions', label: 'Advanced options', icon: 'cogs' },
|
||||||
{id: 'debugging', label: 'Debugging', icon: 'bug-outline' }
|
{id: 'debugging', label: 'Debugging', icon: 'bug-outline' }
|
||||||
],
|
],
|
||||||
selectedTab: 'videoSettings',
|
selectedTab: 'videoSettings',
|
||||||
|
@ -1,12 +1,43 @@
|
|||||||
<template>
|
<template>
|
||||||
<div class="flex flex-column w-100">
|
<div class="flex flex-column w-100">
|
||||||
|
|
||||||
<SiteExtensionSettings
|
<!-- TAB ROW -->
|
||||||
v-if="settings"
|
<div class="flex flex-row">
|
||||||
:settings="settings"
|
<div
|
||||||
:siteSettings="globalSettings"
|
class="tab"
|
||||||
:isDefaultConfiguration="true"
|
:class="{'active': tab === 'siteSettings'}"
|
||||||
></SiteExtensionSettings>
|
@click="setTab('siteSettings')"
|
||||||
|
>
|
||||||
|
Settings for current site<br/>
|
||||||
|
<small>{{ site }}</small>
|
||||||
|
</div>
|
||||||
|
<div
|
||||||
|
class="tab"
|
||||||
|
:class="{'active': tab === 'extensionSettings'}"
|
||||||
|
@click="setTab(tab = 'extensionSettings')"
|
||||||
|
>
|
||||||
|
Default settings for extension
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
|
||||||
|
<template v-if="tab === 'siteSettings' && siteSettings">
|
||||||
|
<SiteExtensionSettings
|
||||||
|
v-if="settings"
|
||||||
|
:settings="settings"
|
||||||
|
:siteSettings="siteSettings"
|
||||||
|
:isDefaultConfiguration="false"
|
||||||
|
></SiteExtensionSettings>
|
||||||
|
</template>
|
||||||
|
|
||||||
|
<template v-if="tab === 'extensionSettings' && globalSettings">
|
||||||
|
not site settings
|
||||||
|
<SiteExtensionSettings
|
||||||
|
v-if="settings"
|
||||||
|
:settings="settings"
|
||||||
|
:siteSettings="globalSettings"
|
||||||
|
:isDefaultConfiguration="true"
|
||||||
|
></SiteExtensionSettings>
|
||||||
|
</template>
|
||||||
|
|
||||||
<!-- <SiteSettingsBasicTable
|
<!-- <SiteSettingsBasicTable
|
||||||
:settings="settings"
|
:settings="settings"
|
||||||
@ -22,6 +53,7 @@ import SiteExtensionSettings from './PanelComponents/ExtensionSettings/SiteExten
|
|||||||
export default {
|
export default {
|
||||||
data() {
|
data() {
|
||||||
return {
|
return {
|
||||||
|
tab: 'siteSettings'
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
mixins: [
|
mixins: [
|
||||||
@ -38,6 +70,17 @@ export default {
|
|||||||
computed: {
|
computed: {
|
||||||
globalSettings() {
|
globalSettings() {
|
||||||
return this.settings?.getSiteSettings('@global') ?? null;
|
return this.settings?.getSiteSettings('@global') ?? null;
|
||||||
|
},
|
||||||
|
siteSettings() {
|
||||||
|
if (this.site) {
|
||||||
|
return this.settings?.getSiteSettings(this.site) ?? null;
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
},
|
||||||
|
methods: {
|
||||||
|
setTab(tab) {
|
||||||
|
this.tab = tab;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -214,7 +214,7 @@
|
|||||||
v-if="!isDefaultConfiguration"
|
v-if="!isDefaultConfiguration"
|
||||||
:value="CropModePersistence.Default"
|
:value="CropModePersistence.Default"
|
||||||
>
|
>
|
||||||
Use default ({{defaultPersistanceLabel()}})
|
Use default ({{defaultPersistanceLabel}})
|
||||||
</option>
|
</option>
|
||||||
<option :value="CropModePersistence.Disabled">Disabled</option>
|
<option :value="CropModePersistence.Disabled">Disabled</option>
|
||||||
<option :value="CropModePersistence.UntilPageReload">Until page reload</option>
|
<option :value="CropModePersistence.UntilPageReload">Until page reload</option>
|
||||||
|
Loading…
Reference in New Issue
Block a user