T-031: Lesezeichen mit Notiz — bookmarks.json, Panel in der Leiste (Sprung, Notiz editieren, delete)

This commit is contained in:
2026-11-06 20:36:38 +01:00
parent bb1fea60df
commit 06ac4ebd11
7 changed files with 275 additions and 1 deletions

View File

@ -18,6 +18,7 @@
forward:
'<path d="m4 6 6 6-6 6"/><path d="m13 6 6 6-6 6"/>',
check: '<path d="M4 12l5 5L20 6"/>',
flag: '<path d="M6 21V4h11l-2.5 4L17 12H6"/>',
pencil:
'<path d="M4 20h4L20 8l-4-4L4 16v4z"/><path d="M13.5 6.5l4 4"/>',
x: '<path d="M5 5l14 14"/><path d="M19 5 5 19"/>',

View File

@ -67,6 +67,15 @@ export const playerSnapshot = () => invoke<PlayerState>('player_snapshot')
export const onPlayerState = (cb: (s: PlayerState) => void) =>
listen<PlayerState>('player-state', (ev) => cb(ev.payload))
export const assetUri = (path: string) => convertFileSrc(path)
export interface Bm { time: number; note: string }
export const bmList = (asin: string) => invoke<Bm[]>('bookmark_list', { asin })
export const bmAdd = (asin: string, time: number, note: string) =>
invoke<Bm[]>('bookmark_add', { asin, time, note })
export const bmRemove = (asin: string, index: number) =>
invoke<Bm[]>('bookmark_remove', { asin, index })
export const bmSetNote = (asin: string, index: number, note: string) =>
invoke<Bm[]>('bookmark_set_note', { asin, index, note })
export function fmtClock(sec: number): string {
const t = Math.max(0, Math.floor(sec))
const h = Math.floor(t / 3600)