Other minor settings, add CSS we forgot about

This commit is contained in:
Tamius Han 2026-01-14 22:41:46 +01:00
parent f0baa6ad67
commit 925a9fdea3
4 changed files with 116 additions and 41 deletions

View File

@ -88,7 +88,8 @@ export default class IframeManager {
* @param context * @param context
*/ */
private handleIframeRegister(data, context) { private handleIframeRegister(data, context) {
const existingIndex = this.iframeList.findIndex(x => x.frameId === context.comms.sourceFrame.frameId); console.log('handling iframe register:', {data, context});
const existingIndex = this.iframeList.findIndex(x => x.frameId && x.frameId === context.comms?.sourceFrame?.frameId);
if (existingIndex !== -1) { if (existingIndex !== -1) {
this.iframeList[existingIndex] = { this.iframeList[existingIndex] = {

View File

@ -37,7 +37,7 @@
v-for="suboption of tab.children" v-for="suboption of tab.children"
:key="suboption.id" :key="suboption.id"
class="suboption" class="suboption"
:class="{'active': suboption.id === selectedTab, 'disabled': suboption.disabled }" :class="{'active': suboption.id === selectedTab, 'disabled': suboption.disabled, 'hidden': suboption.visible === false }"
@click="selectTab(suboption.id)" @click="selectTab(suboption.id)"
> >
<div class="label"> <div class="label">
@ -60,8 +60,8 @@
</div> </div>
</div> </div>
<div class="grow content flex flex-col overflow-auto pr-4 pb-12"> <div class="grow content flex flex-col overflow-auto pr-4 pb-12">
<!-- autodetection warning -->
<!-- autodetection warning -->
<div class="warning-area"> <div class="warning-area">
<div <div
v-if="statusFlags.hasDrm" v-if="statusFlags.hasDrm"
@ -72,7 +72,19 @@
</div> </div>
<div> <div>
This site is blocking automatic aspect ratio detection. You will have to adjust aspect ratio manually.<br/> This site is blocking automatic aspect ratio detection. You will have to adjust aspect ratio manually.<br/>
<a>Learn more ...</a> <!-- <a>Learn more ...</a> -->
</div>
</div>
<div
v-if="settings.active.preventReload"
class="info-box"
>
<div class="icon-container">
<mdicon name="information" :size="24" />
</div>
<div>
Some settings will only reply after page reload.
</div> </div>
</div> </div>
</div> </div>
@ -86,6 +98,19 @@
:site="site" :site="site"
></VideoSettings> ></VideoSettings>
<template v-if="[
'site-extension-settings',
'window.site-extension-settings',
'embedded-extension-settings',
].includes(selectedTab)">
<template v-if="!settings || !siteSettings">
Loading settings ...
<pre> site: {{site}}</pre>
<pre> settings: {{!!settings}}</pre>
<pre>site settings: {{!!siteSettings}}</pre>
</template>
<template v-else>
<template v-if="settings && selectedTab === 'site-extension-settings'" > <template v-if="settings && selectedTab === 'site-extension-settings'" >
<h3>Settings for {{site?.host}}</h3> <h3>Settings for {{site?.host}}</h3>
<SiteExtensionSettings <SiteExtensionSettings
@ -112,8 +137,14 @@
:settings="settings" :settings="settings"
></FrameSiteSettings> ></FrameSiteSettings>
</template> </template>
</template>
</template>
<template v-if="settings && selectedTab === 'default-extension-settings'" > <template v-if="selectedTab === 'default-extension-settings'" >
<template v-if="!settings">
Loading settings ...
</template>
<template v-else>
<h3>Default settings</h3> <h3>Default settings</h3>
<SiteExtensionSettings <SiteExtensionSettings
:settings="settings" :settings="settings"
@ -121,6 +152,7 @@
:isDefaultConfiguration="true" :isDefaultConfiguration="true"
></SiteExtensionSettings> ></SiteExtensionSettings>
</template> </template>
</template>
<OtherSiteSettings <OtherSiteSettings
v-if="selectedTab === 'website-extension-settings'" v-if="selectedTab === 'website-extension-settings'"
@ -236,7 +268,8 @@ const AVAILABLE_TABS = {
id: 'window.site-extension-settings', label: 'Site and Extension options', icon: 'cogs', id: 'window.site-extension-settings', label: 'Site and Extension options', icon: 'cogs',
children: [ children: [
{ id: 'window.site-extension-settings', label: 'For this site', }, { id: 'window.site-extension-settings', label: 'For this site', },
{ id: 'embedded-extension-settings', label: 'For embedded sites', disabled: true, badgeCount: 0, }, { id: 'window.parent-site-extension-settings', label: 'For parent page', visible: false,},
{ id: 'embedded-extension-settings', label: 'For embedded sites', disabled: true, visible: true, badgeCount: 0, },
{ id: 'default-extension-settings', label: 'Default settings' }, { id: 'default-extension-settings', label: 'Default settings' },
{ id: 'website-extension-settings', label: 'Website exceptions' }, { id: 'website-extension-settings', label: 'Website exceptions' },
] ]
@ -407,7 +440,6 @@ export default defineComponent({
const tabs = []; const tabs = [];
for (const tab of TAB_LOADOUT[this.role]) { for (const tab of TAB_LOADOUT[this.role]) {
if (!AVAILABLE_TABS[tab]) { if (!AVAILABLE_TABS[tab]) {
console.warn('[uw:SettingsWindowContent] tab', tab, 'is not present in available tabs:', AVAILABLE_TABS, '— tabs for role', this.role, TAB_LOADOUT[this.role]);
continue; continue;
} else { } else {
if (tab === 'site-extension-settings') { if (tab === 'site-extension-settings') {

View File

@ -14,6 +14,16 @@
class="w-full h-[100dvh] overflow-hidden flex flex-col" class="w-full h-[100dvh] overflow-hidden flex flex-col"
:class="{'max-w-[1920px]': !isDebugging && role !== 'ui'}" :class="{'max-w-[1920px]': !isDebugging && role !== 'ui'}"
> >
<div class="flex flex-row font-mono text-[0.8rem] text-stone-500 border-stone-500">
<!-- <pre>
url: {{getUrl}}
site: <pre>{{JSON.stringify(site, null, 2)}}</pre>
</pre> -->
</div>
<PopupHead <PopupHead
v-if="role === 'popup' && settings && siteSettings && eventBus" v-if="role === 'popup' && settings && siteSettings && eventBus"
:settings="settings" :settings="settings"
@ -22,9 +32,7 @@
:eventBus="eventBus" :eventBus="eventBus"
> >
</PopupHead> </PopupHead>
<div v-else-if="role === 'ui'" class="flex flex-row font-mono text-[0.8rem] text-stone-500 border-stone-500">
url: {{getUrl}}
</div>
<div v-else> <div v-else>
<h1 class="text-[3em] grow-0 shrink-0">Ultrawidify settings</h1> <h1 class="text-[3em] grow-0 shrink-0">Ultrawidify settings</h1>
</div> </div>

View File

@ -42,6 +42,39 @@
top: 0; top: 0;
transform: translateY(69%); transform: translateY(69%);
} }
.unit-select {
@apply bg-stone-950 text-white px-4 py-1 border border-transparent border-l-stone-600 border-dotted;
flex-grow: 1;
flex-shrink: 1;
min-width: 12px;
max-width: 24rem;
outline: none;
font: inherit;
font-size: inherit;
option {
@apply bg-stone-950 text-white;
&:checked {
@apply text-primary-400;
}
&:before {
content: ">";
display: none;
background-color: #f41 !important;
font-size: 5rem;;
}
&:hover {
@apply text-black bg-primary-300;
}
}
}
} }
.range-input { .range-input {
@ -95,6 +128,7 @@
flex-direction: column; flex-direction: column;
} }
.select { .select {
flex-grow: 1; flex-grow: 1;
flex-shrink: 1; flex-shrink: 1;