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
+31
@@ -79,6 +79,37 @@ nav{flex:1;overflow-y:auto;padding:4px 10px}
|
||||
.page-title em{color:var(--accent);font-style:normal}
|
||||
.page-title .blue{color:var(--blue)}
|
||||
|
||||
/* ── NOTIFICATION BELL ── */
|
||||
.notif-bell-btn{position:relative}
|
||||
.notif-badge{position:absolute;top:1px;right:1px;min-width:15px;height:15px;background:var(--accent);color:#000;border-radius:8px;font-size:9px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 3px;pointer-events:none;line-height:1}
|
||||
|
||||
/* ── NOTIFICATION PANEL ── */
|
||||
.notif-overlay{display:none;position:fixed;inset:0;z-index:599}
|
||||
.notif-overlay.active{display:block}
|
||||
.notif-panel{position:fixed;top:12px;right:12px;width:320px;max-height:72vh;background:var(--surface);border:1px solid var(--border2);border-radius:14px;z-index:600;display:flex;flex-direction:column;box-shadow:0 8px 32px rgba(0,0,0,.5);transform:translateY(-8px) scale(.97);opacity:0;pointer-events:none;transition:opacity .18s,transform .18s}
|
||||
.notif-panel.open{transform:translateY(0) scale(1);opacity:1;pointer-events:all}
|
||||
.notif-panel-hdr{display:flex;align-items:center;justify-content:space-between;padding:14px 16px 10px;border-bottom:1px solid var(--border);flex-shrink:0}
|
||||
.notif-panel-title{font-size:14px;font-weight:700}
|
||||
.notif-clear-btn{font-size:11px;color:var(--text3);background:none;border:none;cursor:pointer;padding:2px 6px;border-radius:4px;transition:color .15s}
|
||||
.notif-clear-btn:hover{color:var(--text)}
|
||||
.notif-list{overflow-y:auto;flex:1;padding:8px;display:flex;flex-direction:column;gap:6px}
|
||||
.notif-empty{font-size:13px;color:var(--text3);text-align:center;padding:28px 0}
|
||||
.notif-card{background:var(--bg);border:1px solid var(--border);border-radius:10px;padding:10px 12px;font-size:13px}
|
||||
.notif-card.unread{border-color:var(--accent-dim)}
|
||||
.notif-card-top{display:flex;align-items:flex-start;gap:8px}
|
||||
.notif-icon{font-size:15px;flex-shrink:0;margin-top:1px}
|
||||
.notif-info{flex:1;min-width:0}
|
||||
.notif-title{font-weight:600;color:var(--text);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
|
||||
.notif-sub{font-size:11px;color:var(--text3);margin-top:1px}
|
||||
.notif-x{background:none;border:none;cursor:pointer;color:var(--text3);font-size:13px;padding:0;line-height:1;flex-shrink:0;transition:color .15s}
|
||||
.notif-x:hover{color:var(--text)}
|
||||
.notif-msg{font-size:12px;color:var(--text2);margin-top:6px}
|
||||
.notif-failed{margin-top:6px}
|
||||
.notif-failed summary{font-size:11px;color:var(--accent);cursor:pointer;user-select:none}
|
||||
.notif-failed ul{margin:4px 0 0 14px;padding:0;font-size:11px;color:var(--text3)}
|
||||
.notif-failed li{margin-bottom:2px}
|
||||
@media(max-width:600px){.notif-panel{right:8px;left:8px;width:auto;top:60px}}
|
||||
|
||||
/* ── HOME GREETING ── */
|
||||
.home-greeting{font-size:22px;font-weight:700;color:var(--text);padding:18px 0 6px;letter-spacing:-.3px}
|
||||
|
||||
|
||||
Reference in new issue
Block a user