T-031: Lesezeichen mit Notiz — bookmarks.json, Panel in der Leiste (Sprung, Notiz editieren, delete)
This commit is contained in:
@ -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)
|
||||
|
||||
Reference in New Issue
Block a user