Version sichtbar: Tray-Menü + Tooltip, Einstellungs-Kopf, dynamische Statusleiste (app_version-Kommando)

This commit is contained in:
2026-11-09 11:27:37 +01:00
parent 8e95f66ca9
commit 1838483030
3 changed files with 17 additions and 3 deletions

View File

@ -36,6 +36,7 @@
type SerieRef,
getPrefs,
setPrefs,
appVersion,
type Prefs,
type BookExtra,
type Bm,
@ -137,6 +138,8 @@
playerSetPosition(bookmarks[idx]?.time ?? 0)
}
let appVer = $state('')
// Einstellungs-Werte (Genres-Schlagwörter, Alter-Vorschläge)
let prefs = $state<Prefs>({ genre_keywords: 'kinder,jugend', alter_suggestions: 'ab 3, ab 6, ab 8, ab 10, ab 12, ab 16' })
let prefsGenreDraft = $state('')
@ -575,6 +578,7 @@
getPrefs()
.then((pr) => (prefs = pr))
.catch(() => {})
appVersion().then((v: string) => (appVer = v)).catch(() => {})
return () => {
clearPoll()
clearInterval(syncId)
@ -886,6 +890,7 @@
{/if}
{#if settingsOpen}
<div class="bmpanel settings">
<p class="muted small" style="margin:0"><strong>Hörwerk v{appVer}</strong></p>
<label class="setrow">
<input
type="checkbox"
@ -1014,5 +1019,5 @@
{#if error}
<span class="statcell statflex error">{error}</span>
{/if}
<span class="statcell statend">Hörwerk 0.1.8</span>
<span class="statcell statend">Hörwerk v{appVer}</span>
</footer>

View File

@ -97,6 +97,7 @@ export interface Prefs {
}
export const getPrefs = () => invoke<Prefs>('get_prefs')
export const setPrefs = (prefs: Prefs) => invoke<void>('set_prefs', { prefs })
export const appVersion = () => invoke<string>('app_version')
export interface BookExtra {
description: string