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
*/
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) {
this.iframeList[existingIndex] = {

View File

@ -37,7 +37,7 @@
v-for="suboption of tab.children"
:key="suboption.id"
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)"
>
<div class="label">
@ -60,8 +60,8 @@
</div>
</div>
<div class="grow content flex flex-col overflow-auto pr-4 pb-12">
<!-- autodetection warning -->
<!-- autodetection warning -->
<div class="warning-area">
<div
v-if="statusFlags.hasDrm"
@ -72,7 +72,19 @@
</div>
<div>
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>
@ -86,6 +98,19 @@
:site="site"
></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'" >
<h3>Settings for {{site?.host}}</h3>
<SiteExtensionSettings
@ -112,8 +137,14 @@
:settings="settings"
></FrameSiteSettings>
</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>
<SiteExtensionSettings
:settings="settings"
@ -121,6 +152,7 @@
:isDefaultConfiguration="true"
></SiteExtensionSettings>
</template>
</template>
<OtherSiteSettings
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',
children: [
{ 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: 'website-extension-settings', label: 'Website exceptions' },
]
@ -407,7 +440,6 @@ export default defineComponent({
const tabs = [];
for (const tab of TAB_LOADOUT[this.role]) {
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;
} else {
if (tab === 'site-extension-settings') {

View File

@ -14,6 +14,16 @@
class="w-full h-[100dvh] overflow-hidden flex flex-col"
: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
v-if="role === 'popup' && settings && siteSettings && eventBus"
:settings="settings"
@ -22,9 +32,7 @@
:eventBus="eventBus"
>
</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>
<h1 class="text-[3em] grow-0 shrink-0">Ultrawidify settings</h1>
</div>

View File

@ -42,6 +42,39 @@
top: 0;
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 {
@ -95,6 +128,7 @@
flex-direction: column;
}
.select {
flex-grow: 1;
flex-shrink: 1;