feat: add notification bell with persistent download log
- Bell icon in sidebar and mobile header with unread badge - On download complete/error: saves notification to localStorage (survives reload) - Playlist/album downloads: parses job log to list which tracks failed - Panel toggles open with animation, click-outside closes it - Each notification dismissable with X; "clear all" button - Notifications capped at 100 entries in localStorage Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
1 parent
fef8578a27
commit
d5a26b764d
4 files changed
+159
-4
No files matched your search
+18
@@ -48,6 +48,10 @@
|
||||
<span>Nova<em>Sonic</em></span>
|
||||
</div>
|
||||
<div class="header-btns">
|
||||
<button class="hbtn notif-bell-btn" onclick="toggleNotifPanel()" title="Benachrichtigungen">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg>
|
||||
<span class="notif-badge" style="display:none">0</span>
|
||||
</button>
|
||||
<button class="hbtn" onclick="openSettings()" title="Einstellungen">
|
||||
<svg width="14" height="14" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="12" cy="12" r="3"/><path d="M19.07 4.93a10 10 0 0 1 0 14.14M14.24 9.76a4 4 0 0 1 0 4.48M4.93 4.93a10 10 0 0 0 0 14.14M9.76 9.76a4 4 0 0 0 0 4.48"/></svg>
|
||||
</button>
|
||||
@@ -121,6 +125,10 @@
|
||||
<span style="font-size:15px;font-weight:700">Nova<em style="color:var(--accent);font-style:normal">Sonic</em></span>
|
||||
</div>
|
||||
<div style="display:flex;align-items:center;gap:4px">
|
||||
<button class="hbtn notif-bell-btn" onclick="toggleNotifPanel()" title="Benachrichtigungen" style="padding:8px;color:var(--text2)">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><path d="M18 8A6 6 0 0 0 6 8c0 7-3 9-3 9h18s-3-2-3-9"/><path d="M13.73 21a2 2 0 0 1-3.46 0"/></svg>
|
||||
<span class="notif-badge" style="display:none">0</span>
|
||||
</button>
|
||||
<button class="hbtn" id="mobile-search-btn" onclick="toggleMobileSearch()" title="Suche" style="padding:8px;color:var(--text2)">
|
||||
<svg width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2"><circle cx="11" cy="11" r="8"/><path d="m21 21-4.35-4.35"/></svg>
|
||||
</button>
|
||||
@@ -739,5 +747,15 @@
|
||||
</div>
|
||||
</nav>
|
||||
|
||||
<!-- NOTIFICATION PANEL -->
|
||||
<div id="notif-overlay" class="notif-overlay" onclick="toggleNotifPanel()"></div>
|
||||
<div id="notif-panel" class="notif-panel">
|
||||
<div class="notif-panel-hdr">
|
||||
<span class="notif-panel-title">Benachrichtigungen</span>
|
||||
<button class="notif-clear-btn" onclick="clearNotifs()">Alle löschen</button>
|
||||
</div>
|
||||
<div id="notif-list" class="notif-list"></div>
|
||||
</div>
|
||||
|
||||
</body>
|
||||
</html>
|
||||
Reference in new issue
Block a user