Feedback: Buttons icon-only (mit Tooltips), Start ohne Flash — lokale Ansicht bleibt stehen, Online ergänzt im Hintergrund

This commit is contained in:
2026-11-06 20:24:22 +01:00
parent 0b7e223ad5
commit ca352d108c
3 changed files with 25 additions and 24 deletions

View File

@ -30,7 +30,7 @@ Abnahme M0: Ein gekauftes Buch läuft lokal mit Kapiteln.
| ID | Titel | Status | | ID | Titel | Status |
|----|-------|--------| |----|-------|--------|
| T-020 | Playback-Engine wählen und einbauen (Entscheidung E-01) | offen | | T-020 | Playback-Engine wählen und einbauen (Entscheidung E-01) | läuft |
| T-021 | Play/Pause, Seek, Kapitelnavigation | offen | | T-021 | Play/Pause, Seek, Kapitelnavigation | offen |
| T-022 | Wiedergabegeschwindigkeit (0.5–3.0×) | offen | | T-022 | Wiedergabegeschwindigkeit (0.5–3.0×) | offen |
| T-023 | Sleep-Timer | offen | | T-023 | Sleep-Timer | offen |

View File

@ -231,21 +231,22 @@
const s = await authStatus() const s = await authStatus()
if (s.logged_in) { if (s.logged_in) {
clearPoll() clearPoll()
// Sofort die lokalen Titel zeigen (schnell, ohne Netz), loadingMsg = 'Lade Bibliothek…'
// danach Online-Daten still ergänzen. // Falls lokale Titel da sind: SOFORT anzeigen und stehen lassen;
loadingMsg = 'Suche lokale Titel…' // Online-Daten werden im Hintergrund ergänzt (kein Flash).
let showedLocals = false
try { try {
const locals = await getLocalBooks() const locals = await getLocalBooks()
if (locals.length) { if (locals.length) {
books = locals books = locals
view = 'library' view = 'library'
showedLocals = true
} }
} catch { } catch {
// kein Bücherordner — weiter mit 'Lade Bibliothek…' // kein Bücherordner — normal warten
} }
view = 'loading' if (showedLocals) loadLibrary()
loadingMsg = 'Lade Bibliothek…' else await loadLibrary()
await loadLibrary()
} else if (view !== 'login') { } else if (view !== 'login') {
view = 'login' view = 'login'
} else { } else {
@ -444,37 +445,36 @@
bind:value={alterDraft} bind:value={alterDraft}
onkeydown={(e) => e.key === 'Enter' && saveAlter(b)} onkeydown={(e) => e.key === 'Enter' && saveAlter(b)}
/> />
<button class="primary" onclick={() => saveAlter(b)}>Speichern</button> <button class="primary" title="Speichern" onclick={() => saveAlter(b)}><Icon name="check" size={14} /></button>
<button class="ghost" onclick={() => (editingAlter = null)}><Icon name="x" size={13} /></button> <button class="ghost" title="Abbrechen" onclick={() => (editingAlter = null)}><Icon name="x" size={13} /></button>
{:else if isLocal(b)} {:else if isLocal(b)}
<button class="ghost" onclick={() => loeschen(b)}><Icon name="trash" size={14} /> Löschen</button> <button class="ghost" title="Löschen" onclick={() => loeschen(b)}><Icon name="trash" size={14} /></button>
<button class="ghost" title="Altersnote setzen" onclick={() => startEditAlter(b)}> <button class="ghost" title="Altersnote setzen" onclick={() => startEditAlter(b)}><Icon name="pencil" size={13} /></button>
<Icon name="pencil" size={13} /> Alter
</button>
{:else if streamOnly[b.asin]} {:else if streamOnly[b.asin]}
<button <button
class="ghost" class="ghost"
title="Abspielen (nur Streaming — Wiedergabe folgt mit M2)"
onclick={() => (info = 'Wiedergabe folgt mit M2 — diesen Titel liefert Audible nur zum Streamen.')} onclick={() => (info = 'Wiedergabe folgt mit M2 — diesen Titel liefert Audible nur zum Streamen.')}
> >
<Icon name="play" size={14} /> Abspielen <Icon name="play" size={14} />
</button> </button>
<span class="muted small">nur Streaming</span> <span class="muted small">nur Streaming</span>
{:else if dlg === 'running' || dlg === 'queued' || dlg === 'decrypting'} {:else if dlg === 'running' || dlg === 'queued' || dlg === 'decrypting'}
<button class="ghost" onclick={() => abbrechen(b)}> <button class="ghost" title="Abbrechen" onclick={() => abbrechen(b)}>
{dlg === 'queued' ? 'In der Queue — abbrechen?' : 'Abbrechen'} <Icon name="x" size={14} />
</button> </button>
{#if dlg === 'queued'}<span class="muted small">wartet…</span>{/if} {#if dlg === 'queued'}<span class="muted small">wartet…</span>{:else if dlg === 'decrypting'}<span class="muted small">entschlüsselt…</span>{/if}
{:else if d && d.status === 'failed'} {:else if d && d.status === 'failed'}
<button class="ghost" onclick={() => laden(b)}><Icon name="download" size={14} /> Nochmal laden</button> <button class="ghost" title="Nochmal laden" onclick={() => laden(b)}><Icon name="download" size={14} /></button>
<button class="ghost" onclick={() => loeschen(b)}><Icon name="trash" size={14} /> Löschen</button> <button class="ghost" title="Löschen" onclick={() => loeschen(b)}><Icon name="trash" size={14} /></button>
<span class="muted small" title={d.msg}>{d.msg.slice(0, 60)}</span> <span class="muted small" title={d.msg}>{d.msg.slice(0, 60)}</span>
{:else if d && d.status === 'done'} {:else if d && d.status === 'done'}
<button class="ghost" onclick={() => loeschen(b)}><Icon name="trash" size={14} /> Löschen</button> <button class="ghost" title="Löschen" onclick={() => loeschen(b)}><Icon name="trash" size={14} /></button>
{:else if d && d.status === 'cancelled'} {:else if d && d.status === 'cancelled'}
<button class="ghost" onclick={() => laden(b)}><Icon name="download" size={14} /> Laden</button> <button class="ghost" title="Laden" onclick={() => laden(b)}><Icon name="download" size={14} /></button>
<button class="ghost" onclick={() => loeschen(b)}><Icon name="trash" size={14} /> Löschen</button> <button class="ghost" title="Löschen" onclick={() => loeschen(b)}><Icon name="trash" size={14} /></button>
{:else if !isLocal(b)} {:else if !isLocal(b)}
<button class="primary" onclick={() => laden(b)}><Icon name="download" size={14} /> Laden</button> <button class="primary" title="Laden" onclick={() => laden(b)}><Icon name="download" size={14} /></button>
{/if} {/if}
</div> </div>
</div> </div>

View File

@ -8,6 +8,7 @@
trash: trash:
'<path d="M4 7h16"/><path d="M9 7V4h6v3"/><path d="M6.5 7l1 14h9l1-14"/>', '<path d="M4 7h16"/><path d="M9 7V4h6v3"/><path d="M6.5 7l1 14h9l1-14"/>',
play: '<path d="M8 5v14l11-7z" fill="currentColor" stroke="none"/>', play: '<path d="M8 5v14l11-7z" fill="currentColor" stroke="none"/>',
check: '<path d="M4 12l5 5L20 6"/>',
pencil: pencil:
'<path d="M4 20h4L20 8l-4-4L4 16v4z"/><path d="M13.5 6.5l4 4"/>', '<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"/>', x: '<path d="M5 5l14 14"/><path d="M19 5 5 19"/>',