feat: add recent plays history modal
Publish Metadata Agent Image / build-and-push-image (push) Successful in 1m23s
Publish Node Player Image / build-and-push-image (push) Successful in 37s
Publish Web Player Image / build-and-push-image (push) Successful in 1m49s

- GET /api/me/recent endpoint returning last 50 play events with track
  and artist info
- RecentPlays modal component with time-ago display
- "Recent plays" button in user dropdown menu
- Clicking a track in history starts playback

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Ultradesu
2026-04-08 17:08:54 +01:00
parent 4fdd56dae4
commit 6b1aa6b5d5
10 changed files with 286 additions and 24 deletions
@@ -108,4 +108,127 @@
.userLogout:hover {
background: var(--bg-hover);
}
.userAction {
display: block;
padding: 10px 16px;
color: var(--text);
text-decoration: none;
font-size: 0.85rem;
font-weight: 500;
cursor: pointer;
background: none;
border: none;
width: 100%;
text-align: left;
transition: background 0.15s;
}
.userAction:hover {
background: var(--bg-hover);
}
/* Recent plays overlay */
.recentOverlay {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.5);
z-index: 200;
display: grid;
place-items: center;
animation: fadeIn 0.15s ease;
}
.recentPanel {
width: min(480px, 90vw);
max-height: 70vh;
background: var(--bg-panel);
border: 1px solid var(--border);
border-radius: 14px;
display: flex;
flex-direction: column;
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}
.recentHeader {
display: flex;
align-items: center;
justify-content: space-between;
padding: 16px 20px;
border-bottom: 1px solid var(--border);
}
.recentHeader h2 {
font-size: 1rem;
font-weight: 600;
color: var(--text);
margin: 0;
}
.recentClose {
background: none;
border: none;
color: var(--text-muted);
font-size: 1rem;
cursor: pointer;
padding: 4px 8px;
border-radius: 4px;
}
.recentClose:hover {
color: var(--text);
background: var(--bg-hover);
}
.recentList {
overflow-y: auto;
flex: 1;
}
.recentItem {
display: flex;
align-items: center;
justify-content: space-between;
padding: 10px 20px;
cursor: pointer;
transition: background 0.15s;
}
.recentItem:hover {
background: var(--bg-hover);
}
.recentTrack {
min-width: 0;
flex: 1;
}
.recentTitle {
font-size: 0.85rem;
color: var(--text);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.recentArtist {
font-size: 0.75rem;
color: var(--text-muted);
margin-top: 1px;
}
.recentTime {
font-size: 0.7rem;
color: var(--text-dim);
flex-shrink: 0;
margin-left: 12px;
}
.recentEmpty {
padding: 32px 20px;
text-align: center;
color: var(--text-muted);
font-size: 0.85rem;
}