fix: remove bell+settings from sidebar; preserve backend/api keys on re-login

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
HoneyandClaude Sonnet 4.6 committed 2026-04-28 13:28:37 +02:00
1 parent 85290a54f6
commit abe048c4ed
2 files changed
+5 -13

No files matched your search

+5 -4
View File
@@ -40,10 +40,11 @@ async function doConnect() {
const url = document.getElementById('srv-url').value.trim().replace(/\/$/,'');
const user = document.getElementById('srv-user').value.trim();
const pass = document.getElementById('srv-pass').value;
const lfKey = document.getElementById('lastfm-key')?.value.trim() ?? S.cfg.lastfmKey ?? '';
const backUrl = (document.getElementById('backend-url')?.value.trim() ?? S.cfg.backendUrl ?? '').replace(/\/$/,'');
const spId = document.getElementById('spotify-client-id')?.value.trim() ?? S.cfg.spotifyClientId ?? '';
const spSecret = document.getElementById('spotify-client-secret')?.value.trim() ?? S.cfg.spotifyClientSecret ?? '';
const _prev = (() => { try { return JSON.parse(localStorage.getItem('ns_cfg') || '{}'); } catch { return {}; } })();
const lfKey = document.getElementById('lastfm-key')?.value.trim() || _prev.lastfmKey || '';
const backUrl = (document.getElementById('backend-url')?.value.trim() || _prev.backendUrl || '').replace(/\/$/,'');
const spId = document.getElementById('spotify-client-id')?.value.trim() || _prev.spotifyClientId || '';
const spSecret = document.getElementById('spotify-client-secret')?.value.trim() || _prev.spotifyClientSecret || '';
if(!url || !user || !pass) { _showSetupError('Bitte Server-URL, Benutzernamen und Passwort ausfüllen.'); return; }
const btn = document.getElementById('btn-connect');
btn.disabled=true; btn.textContent='Verbinde…';