Statusleiste: Anmeldung, Download-Zähler, Sleep-Restzeit, laufender Titel, aktuelle Meldungen, Version — immer sichtbar unten
This commit is contained in:
@ -56,6 +56,7 @@
|
|||||||
let loadedOverride = $state<Record<string, boolean>>({})
|
let loadedOverride = $state<Record<string, boolean>>({})
|
||||||
let removedLocals = $state<Record<string, boolean>>({})
|
let removedLocals = $state<Record<string, boolean>>({})
|
||||||
let streamOnly = $state<Record<string, boolean>>({})
|
let streamOnly = $state<Record<string, boolean>>({})
|
||||||
|
let profile = $state('')
|
||||||
let player = $state<PlayerState>({
|
let player = $state<PlayerState>({
|
||||||
loaded: false,
|
loaded: false,
|
||||||
playing: false,
|
playing: false,
|
||||||
@ -375,6 +376,7 @@
|
|||||||
error = ''
|
error = ''
|
||||||
try {
|
try {
|
||||||
const s = await authStatus()
|
const s = await authStatus()
|
||||||
|
profile = s.profiles[0] ?? ''
|
||||||
if (s.logged_in) {
|
if (s.logged_in) {
|
||||||
clearPoll()
|
clearPoll()
|
||||||
loadingMsg = 'Lade Bibliothek…'
|
loadingMsg = 'Lade Bibliothek…'
|
||||||
@ -758,3 +760,35 @@
|
|||||||
{/if}
|
{/if}
|
||||||
</main>
|
</main>
|
||||||
{/if}
|
{/if}
|
||||||
|
|
||||||
|
<footer class="statusbar">
|
||||||
|
<span class="statcell">
|
||||||
|
{#if profile}
|
||||||
|
<Icon name="home" size={12} /> angemeldet
|
||||||
|
{:else}
|
||||||
|
<Icon name="cloud" size={12} /> nicht angemeldet
|
||||||
|
{/if}
|
||||||
|
</span>
|
||||||
|
{#if actives.n > 0}
|
||||||
|
<span class="statcell">
|
||||||
|
<Icon name="download" size={12} />
|
||||||
|
{actives.n === 1 ? '1 Download' : `${actives.n} Downloads`}{actives.bytes > 0 ? ` · ${mb(actives.bytes)}` : ''}
|
||||||
|
</span>
|
||||||
|
{/if}
|
||||||
|
{#if sleepLeft}
|
||||||
|
<span class="statcell"><Icon name="moon" size={12} /> {sleepLeft}</span>
|
||||||
|
{/if}
|
||||||
|
{#if player.loaded}
|
||||||
|
<span class="statcell statflex">
|
||||||
|
<Icon name="play" size={12} />
|
||||||
|
{player.title ?? player.asin} · {player.chapters[player.chapter]?.title ?? ''} · {fmtClock(player.position)} / {fmtClock(player.duration)}
|
||||||
|
</span>
|
||||||
|
{/if}
|
||||||
|
{#if info}
|
||||||
|
<span class="statcell statflex info">{info}</span>
|
||||||
|
{/if}
|
||||||
|
{#if error}
|
||||||
|
<span class="statcell statflex error">{error}</span>
|
||||||
|
{/if}
|
||||||
|
<span class="statcell statend">Hörwerk 0.1.0</span>
|
||||||
|
</footer>
|
||||||
|
|||||||
47
src/app.css
47
src/app.css
@ -443,3 +443,50 @@ code {
|
|||||||
align-items: center;
|
align-items: center;
|
||||||
gap: 0.5rem;
|
gap: 0.5rem;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* Statusleiste (immer sichtbar, unten) */
|
||||||
|
|
||||||
|
.statusbar {
|
||||||
|
position: fixed;
|
||||||
|
left: 0;
|
||||||
|
right: 0;
|
||||||
|
bottom: 0;
|
||||||
|
height: 26px;
|
||||||
|
display: flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.9rem;
|
||||||
|
padding: 0 1rem;
|
||||||
|
background: var(--bg-card);
|
||||||
|
border-top: 1px solid var(--border);
|
||||||
|
font-size: 0.78rem;
|
||||||
|
color: var(--fg-muted);
|
||||||
|
z-index: 7;
|
||||||
|
overflow: hidden;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statcell {
|
||||||
|
display: inline-flex;
|
||||||
|
align-items: center;
|
||||||
|
gap: 0.3rem;
|
||||||
|
white-space: nowrap;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statflex {
|
||||||
|
flex: 1;
|
||||||
|
overflow: hidden;
|
||||||
|
text-overflow: ellipsis;
|
||||||
|
min-width: 0;
|
||||||
|
}
|
||||||
|
|
||||||
|
.statend {
|
||||||
|
margin-left: auto;
|
||||||
|
opacity: 0.7;
|
||||||
|
}
|
||||||
|
|
||||||
|
.playerbar {
|
||||||
|
bottom: 27px;
|
||||||
|
}
|
||||||
|
|
||||||
|
.bmpanel {
|
||||||
|
bottom: 5.9rem;
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user