fix: ABS API key auth + mobile bottom-nav Hörbücher button

- Replace username/password login with API key (Bearer token) auth
  - New absVerifyApiKey() verifies via GET /api/me instead of POST /login
  - Settings shows single API Key field with hint (Profil → API Token in ABS)
  - API key never pre-filled in settings for security
- Add "Bücher" button to mobile bottom-nav (bnav-library), hidden until connected
- _showAbsNavItem() helper keeps sidebar + bnav in sync on connect/disconnect

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-05-03 14:41:18 +02:00
1 parent c17b7ea11a
commit 7c6343e28e
4 files changed
+42 -25

No files matched your search

+13 -3
View File
@@ -531,9 +531,15 @@
<span style="width:24px;height:24px;border-radius:6px;background:var(--green-dim);display:inline-flex;align-items:center;justify-content:center;font-size:12px">📚</span>
Audiobookshelf
</h3>
<div class="field"><label>Server URL</label><input id="abs-s-url" type="url" placeholder="https://books.example.com"></div>
<div class="field"><label>Benutzername</label><input id="abs-s-user" type="text" placeholder="admin"></div>
<div class="field"><label>Passwort</label><input id="abs-s-pass" type="password" placeholder="••••••••"></div>
<div class="field">
<label>Server URL</label>
<input id="abs-s-url" type="url" placeholder="https://books.example.com">
</div>
<div class="field">
<label>API Key</label>
<input id="abs-s-apikey" type="password" placeholder="Aus ABS: Profil → API Token">
<div class="hint">Einstellungen → Profil → API Token in Audiobookshelf</div>
</div>
<div id="abs-lib-picker" style="display:none" class="field">
<label>Bibliothek</label>
<select id="abs-lib-select" onchange="absSetLibrary(this.value)" style="width:100%;padding:10px 12px;background:var(--bg2);border:1px solid var(--border2);border-radius:var(--radius-sm);color:var(--text);font-family:var(--font);font-size:14px;outline:none"></select>
@@ -895,6 +901,10 @@
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><polygon points="12 2 15.09 8.26 22 9.27 17 14.14 18.18 21.02 12 17.77 5.82 21.02 7 14.14 2 9.27 8.91 8.26 12 2"/></svg>
Favoriten
</button>
<button class="bnav-item" id="bnav-audiobooks" onclick="navigate('audiobooks')" data-page="audiobooks" style="display:none">
<svg width="22" height="22" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M2 3h6a4 4 0 0 1 4 4v14a3 3 0 0 0-3-3H2z"/><path d="M22 3h-6a4 4 0 0 0-4 4v14a3 3 0 0 1 3-3h7z"/></svg>
Bücher
</button>
</div>
<div class="bnav-pages" id="bnav-discover" style="display:none">
<button class="bnav-item" onclick="navigate('discover')" data-page="discover">