feat: cycle subtitles to off

fix: more forgiving checkbox button
This commit is contained in:
ThaUnknown 2025-09-02 17:10:48 +02:00
parent 132b805ff3
commit 8e5ffd45db
No known key found for this signature in database
4 changed files with 8 additions and 5 deletions

View file

@ -1,6 +1,6 @@
{
"name": "ui",
"version": "6.4.114",
"version": "6.4.115",
"license": "BUSL-1.1",
"private": true,
"packageManager": "pnpm@9.15.5",

View file

@ -479,8 +479,8 @@
if (!subtitles) return
const entries = Object.entries(subtitles._tracks.value)
const index = entries.findIndex(([index]) => index === subtitles!.current.value)
const nextIndex = (index + 1) % entries.length
subtitles.selectCaptions(entries[nextIndex]![0])
const nextIndex = (index + 1)
subtitles.selectCaptions((index + 1) >= entries.length ? -1 : entries[nextIndex]![0])
}
function seekBarKey (event: KeyboardEvent) {

View file

@ -9,8 +9,11 @@
}
export let checked: Writable<boolean>
function check () {
checked.update(value => !value)
}
</script>
<div class='contents' on:click|stopPropagation|stopImmediatePropagation>
<div class='w-full inset-0 h-full flex justify-center items-center' on:click|stopPropagation|stopImmediatePropagation={check}>
<Checkbox bind:checked={$checked} {...$$restProps} class='mx-4' />
</div>

View file

@ -198,7 +198,7 @@
'px-4 min-h-14 first:pl-6 last:pr-6 text-nowrap',
(cell.id === 'episode') && 'text-muted-foreground',
(cell.id === 'series' || cell.id === 'name') && 'min-w-80 text-wrap break-all',
cell.id === 'select' && 'p-0'
cell.id === 'select' && 'p-0 relative [&>div]:absolute'
)}>
<Render of={cell.render()} />
</Table.Cell>