web-player: fix playlist ownership, sidebar counts, home spotlight and assorted page bugs
This commit is contained in:
@@ -37,9 +37,16 @@
|
||||
function onInput(event: Event) {
|
||||
const file = (event.currentTarget as HTMLInputElement).files?.[0];
|
||||
if (!file) return;
|
||||
releasePreview();
|
||||
preview = URL.createObjectURL(file);
|
||||
onselect?.(file);
|
||||
}
|
||||
|
||||
function releasePreview() {
|
||||
if (preview !== '') URL.revokeObjectURL(preview);
|
||||
}
|
||||
|
||||
$effect(() => releasePreview);
|
||||
</script>
|
||||
|
||||
<label
|
||||
|
||||
@@ -61,7 +61,7 @@
|
||||
{/if}
|
||||
<MenuItem
|
||||
icon={themeMode.current === 'dark' ? Sun : Moon}
|
||||
label={themeMode.current === 'dark' ? 'Modo blanco' : 'Modo oscuro'}
|
||||
label={themeMode.current === 'dark' ? 'Modo claro' : 'Modo oscuro'}
|
||||
onclick={() => themeMode.toggle()}
|
||||
/>
|
||||
<form method="POST" action="/auth/logout" data-sveltekit-reload>
|
||||
|
||||
@@ -9,15 +9,19 @@
|
||||
description: string;
|
||||
confirmLabel: string;
|
||||
action: string;
|
||||
fields?: Record<string, string>;
|
||||
}
|
||||
|
||||
let { open, onClose, title, description, confirmLabel, action }: Props = $props();
|
||||
let { open, onClose, title, description, confirmLabel, action, fields = {} }: Props = $props();
|
||||
</script>
|
||||
|
||||
<Dialog {open} {onClose} {title} {description}>
|
||||
{#snippet actions()}
|
||||
<Button variant="secondary" onclick={onClose}>Cancelar</Button>
|
||||
<form method="POST" {action}>
|
||||
{#each Object.entries(fields) as [name, value] (name)}
|
||||
<input type="hidden" {name} {value} />
|
||||
{/each}
|
||||
<Button type="submit" variant="danger">{confirmLabel}</Button>
|
||||
</form>
|
||||
{/snippet}
|
||||
|
||||
Reference in New Issue
Block a user