fix: resolve vite-plugin-svelte warnings
- image-viewer: replace backdrop div with button for a11y - file-drop-zone: wrap prop check in \$effect to avoid state_referenced_locally - about: use \$derived for stats array - magazine: use \$derived for featuredArticle - play: add role/keyboard support to seek bar slider; fix \$state on SvelteMap in device-mapping-dialog - admin/videos/[id]: add <track kind="captions"> to video element Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -480,12 +480,22 @@
|
||||
.padStart(2, "0")}
|
||||
</span>
|
||||
<div
|
||||
role="slider"
|
||||
tabindex="0"
|
||||
aria-label="Seek"
|
||||
aria-valuemin={0}
|
||||
aria-valuemax={data.recording.duration}
|
||||
aria-valuenow={playbackProgress}
|
||||
class="flex-1 h-2 bg-muted rounded-full overflow-hidden cursor-pointer relative"
|
||||
onclick={(e) => {
|
||||
const rect = e.currentTarget.getBoundingClientRect();
|
||||
const percentage = ((e.clientX - rect.left) / rect.width) * 100;
|
||||
seek(percentage);
|
||||
}}
|
||||
onkeydown={(e) => {
|
||||
if (e.key === "ArrowRight") seek(((playbackProgress + 1) / data.recording.duration) * 100);
|
||||
else if (e.key === "ArrowLeft") seek(((playbackProgress - 1) / data.recording.duration) * 100);
|
||||
}}
|
||||
>
|
||||
<div
|
||||
class="absolute inset-0 bg-gradient-to-r from-primary to-accent transition-all duration-150"
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
let { open, recordedDevices, connectedDevices, onConfirm, onCancel }: Props = $props();
|
||||
|
||||
// Device mappings: recorded device name -> connected device
|
||||
let mappings = new SvelteMap<string, BluetoothDevice>();
|
||||
let mappings = $state(new SvelteMap<string, BluetoothDevice>());
|
||||
|
||||
// Check if a connected device is compatible with a recorded device
|
||||
function isCompatible(recordedDevice: DeviceInfo, connectedDevice: BluetoothDevice): boolean {
|
||||
|
||||
Reference in New Issue
Block a user