fix: oopsie
Some checks are pending
Check / check (push) Waiting to run

This commit is contained in:
ThaUnknown 2025-06-14 21:33:43 +02:00
parent c78b18c5e8
commit 8b88e23594
No known key found for this signature in database
4 changed files with 8 additions and 7 deletions

View file

@ -1,6 +1,6 @@
{
"name": "ui",
"version": "6.3.54",
"version": "6.3.55",
"license": "BUSL-1.1",
"private": true,
"packageManager": "pnpm@9.14.4",

View file

@ -1,7 +1,5 @@
<script lang='ts'>
import { highEntropyValues } from '$lib/utils'
</script>
{#if highEntropyValues}

View file

@ -13,7 +13,7 @@
export const binds = persisted<Partial<Record<KeyCode, Bind>>>('thaunknown/svelte-keybinds', {})
const noop = async (_: KeyCode) => true
const noop = (_: KeyCode) => true
let cnd = noop
@ -22,12 +22,14 @@
if (typeof fn === 'function') cnd = fn
})
document.addEventListener('keydown', e => runBind(e, e.code as KeyCode))
document.addEventListener('keydown', e => runBind(e, e.code as KeyCode), {
capture: true
})
async function runBind (e: MouseEvent | KeyboardEvent, code: KeyCode) {
if ('repeat' in e && e.repeat) return
const kbn = get(binds)
if (await cnd(code)) kbn[layout[code] ?? code]?.fn(e)
if (cnd(code)) kbn[layout[code] ?? code]?.fn(e)
}
export function loadWithDefaults (defaults: Partial<Record<string, Bind>>) {

View file

@ -494,6 +494,8 @@
Space: {
fn: (e) => {
e.preventDefault()
e.stopImmediatePropagation()
e.stopPropagation()
playPause()
},
id: 'play_arrow',
@ -646,7 +648,6 @@
const torrentstats = server.stats
// @ts-expect-error bad type infer
$condition = () => !isMiniplayer
let ff = false