Compare commits
No commits in common. "c2a6a3f0827adfaa43f0f870e8764aa1087307bc" and "4a562443b1d0d7398def7720ea4e6ae076cc84cb" have entirely different histories.
c2a6a3f082
...
4a562443b1
@ -96,6 +96,7 @@ class Settings {
|
||||
if (!changes.uwSettings) {
|
||||
return;
|
||||
}
|
||||
console.log('new settings change.')
|
||||
this.logger?.info('storageOnChange', "Settings have been changed outside of here. Updating active settings. Changes:", changes, "storage area:", area);
|
||||
// if (changes['uwSettings'] && changes['uwSettings'].newValue) {
|
||||
// this.logger?.log('info', 'settings',"[Settings::<storage/on change>] new settings object:", JSON.parse(changes.uwSettings.newValue));
|
||||
|
||||
@ -183,6 +183,7 @@ export class SiteSettings {
|
||||
*/
|
||||
private compileSettingsObject() {
|
||||
const {siteSettings, usesSettingsFor} = this.getSettingsForSite(this.options);
|
||||
console.log('got settings for site:', siteSettings, usesSettingsFor)
|
||||
|
||||
this.data = _cp(siteSettings);
|
||||
this.usesSettingsFor = usesSettingsFor;
|
||||
|
||||
@ -532,11 +532,7 @@ class VideoData {
|
||||
let confirmAspectRatioRestore = false;
|
||||
|
||||
if (!this.video) {
|
||||
if (this.logger) {
|
||||
this.logger.error('onVideoMutation', 'mutation was triggered, but video element is missing. Something is fishy. Terminating this uw instance.');
|
||||
} else {
|
||||
console.error('uw::onVideoMutation', 'mutation was triggered, but neither video nor logger exist. Something is ultra-fishy. UW instance will be terminated. This:', this);
|
||||
}
|
||||
this.logger.error('onVideoMutation', 'mutation was triggered, but video element is missing. Something is fishy. Terminating this uw instance.');
|
||||
this.destroy();
|
||||
return;
|
||||
}
|
||||
|
||||
@ -105,8 +105,8 @@
|
||||
<h3>Default settings</h3>
|
||||
<SiteExtensionSettings
|
||||
:settings="settings"
|
||||
:siteSettings="globalSettings"
|
||||
:isDefaultConfiguration="true"
|
||||
:siteSettings="siteSettings"
|
||||
:isDefaultConfiguration="false"
|
||||
></SiteExtensionSettings>
|
||||
</template>
|
||||
|
||||
@ -220,13 +220,7 @@ const AVAILABLE_TABS = {
|
||||
{ id: 'default-extension-settings', label: 'Default settings' }
|
||||
]
|
||||
},
|
||||
'extension-settings': {
|
||||
id: 'extensionSettings', label: 'Site and Extension options', icon: 'cogs',
|
||||
children: [
|
||||
{ id: 'default-extension-settings', label: 'Default settings' },
|
||||
{ id: 'website-extension-list', label: 'Website settings', },
|
||||
]
|
||||
},
|
||||
'extensionSettings': {id: 'extensionSettings', label: 'Site and Extension options', icon: 'cogs' },
|
||||
'siteSettings': {id: 'extensionSettings', label: 'Site and Extension options', icon: 'cogs' },
|
||||
'settings.player-element-settings': { id: 'settings.player-element-settings', label: 'Advanced video player options', icon: 'play-box-edit-outline' },
|
||||
'window.player-element-settings': { id: 'window.player-element-settings', label: 'Advanced video player options', icon: 'play-box-edit-outline' },
|
||||
@ -235,7 +229,7 @@ const AVAILABLE_TABS = {
|
||||
'keyboardShortcuts': {id: 'keyboardShortcuts', label: 'Keyboard shortcuts', icon: 'keyboard-outline' },
|
||||
'playerDetection': {id: 'playerDetection', label: 'Player detection', icon: 'television-play'},
|
||||
|
||||
'installed': { id: 'installed', label: 'Update completed', icon: 'monitor-arrow-down-variant'},
|
||||
'installed': { id: 'updated', label: 'Update completed', icon: 'monitor-arrow-down-variant'},
|
||||
'updated': { id: 'updated', label: 'Update completed', icon: 'update'},
|
||||
|
||||
'changelog': {id: 'changelog', label: 'What\'s new', icon: 'alert-decagram' },
|
||||
@ -246,7 +240,7 @@ const AVAILABLE_TABS = {
|
||||
|
||||
const TAB_LOADOUT = {
|
||||
'settings': [
|
||||
'extension-settings',
|
||||
'extensionSettings',
|
||||
'settings.player-element-settings',
|
||||
'autodetectionSettings',
|
||||
'ui-settings',
|
||||
@ -305,7 +299,6 @@ export default defineComponent({
|
||||
BrowserDetect: BrowserDetect,
|
||||
preventClose: false,
|
||||
siteSettings: null,
|
||||
globalSettings: null,
|
||||
}
|
||||
},
|
||||
props: [
|
||||
@ -343,7 +336,6 @@ export default defineComponent({
|
||||
changelogTab.highlight = !this.settings.active?.whatsNewChecked;
|
||||
}
|
||||
|
||||
this.globalSettings = this.settings.getSiteSettings({site: '@global'});
|
||||
if (this.site) {
|
||||
this.siteSettings = this.settings.getSiteSettings({site: this.site});
|
||||
}
|
||||
@ -385,7 +377,6 @@ export default defineComponent({
|
||||
console.warn('[uw:SettingsWindowContent] tab', tab, 'is not present in available tabs:', AVAILABLE_TABS, '— tabs for role', this.role, TAB_LOADOUT[this.role]);
|
||||
continue;
|
||||
} else {
|
||||
console.log('pushing tab:', tab, AVAILABLE_TABS[tab])
|
||||
tabs.push(AVAILABLE_TABS[tab]);
|
||||
}
|
||||
}
|
||||
|
||||
@ -310,6 +310,13 @@
|
||||
</div>
|
||||
</div>
|
||||
|
||||
<pre>
|
||||
SITE SETTINGS: raw
|
||||
{{JSON.stringify(siteSettings.raw)}}
|
||||
|
||||
SITE SETTINGS: data
|
||||
{{JSON.stringify(siteSettings.data)}}
|
||||
</pre>
|
||||
</div>
|
||||
</template>
|
||||
|
||||
@ -539,7 +546,28 @@ export default defineComponent({
|
||||
|
||||
setExtensionMode(component, event) {
|
||||
const option = event.target.value;
|
||||
this.siteSettings.set(component, option);
|
||||
|
||||
console.log('set extension mode - we received option', option, 'for component', component);
|
||||
|
||||
return;
|
||||
if (option === 'complex') {
|
||||
return;
|
||||
}
|
||||
|
||||
|
||||
|
||||
if (component === 'enable' && !this.isDefaultConfiguration) {
|
||||
this.setExtensionMode('enableAard', event);
|
||||
this.setExtensionMode('enableKeyboard', event);
|
||||
|
||||
// in enableUI, 'enabled' is unused and 'theater' uses its place
|
||||
if (option === 'enabled') {
|
||||
this.setExtensionMode('enableUI', {target: {value: 'theater'}});
|
||||
} else {
|
||||
this.setExtensionMode('enableUI', event);
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@ -123,7 +123,7 @@ export default defineComponent({
|
||||
this.role = segment.replace('#', '');
|
||||
}
|
||||
|
||||
this.logAggregator = new LogAggregator('App.vue');
|
||||
this.logAggregator = new LogAggregator('');
|
||||
this.logger = new ComponentLogger(this.logAggregator, 'App.vue');
|
||||
|
||||
this.settings = new Settings({
|
||||
@ -198,7 +198,7 @@ export default defineComponent({
|
||||
}
|
||||
)
|
||||
|
||||
this.comms = new CommsClient('popup-port', this.logAggregator, this.eventBus);
|
||||
this.comms = new CommsClient('popup-port', this.logger, this.eventBus);
|
||||
this.eventBus.setComms(this.comms);
|
||||
this.eventBus.setupPopupTunnelWorkaround({
|
||||
origin: CommsOrigin.Popup,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user