Files
furumi-ng/furumi-node-player/client/src/components/header/header.module.css
T
Ultradesu 6b1aa6b5d5
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
feat: add recent plays history modal
- 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>
2026-04-08 17:08:54 +01:00

234 lines
4.1 KiB
CSS

.header {
display: flex;
align-items: center;
justify-content: space-between;
padding: 0.75rem 1.5rem;
background: var(--bg-panel);
border-bottom: 1px solid var(--border);
flex-shrink: 0;
z-index: 10;
}
.headerLogo {
display: flex;
align-items: center;
gap: 0.75rem;
font-weight: 700;
font-size: 1.1rem;
color: #ffffff;
}
.headerLogo svg {
width: 22px;
height: 22px;
}
.headerVersion {
font-size: 0.7rem;
color: var(--text-muted);
background: rgba(255, 255, 255, 0.05);
padding: 0.1rem 0.4rem;
border-radius: 4px;
margin-left: 0.25rem;
font-weight: 500;
text-decoration: none;
}
/* User menu */
.userMenu {
position: relative;
}
.userAvatar {
width: 32px;
height: 32px;
border-radius: 50%;
background: var(--accent);
color: #fff;
border: none;
font-size: 0.75rem;
font-weight: 600;
cursor: pointer;
display: flex;
align-items: center;
justify-content: center;
transition: background 0.2s;
}
.userAvatar:hover {
background: var(--accent-dim);
}
.userDropdown {
position: absolute;
top: calc(100% + 8px);
right: 0;
min-width: 200px;
background: var(--bg-card);
border: 1px solid var(--border);
border-radius: 10px;
box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
z-index: 100;
overflow: hidden;
animation: fadeIn 0.15s ease;
}
@keyframes fadeIn {
from { opacity: 0; transform: translateY(-4px); }
to { opacity: 1; transform: translateY(0); }
}
.userInfo {
padding: 12px 16px;
border-bottom: 1px solid var(--border);
}
.userName {
font-weight: 600;
font-size: 0.9rem;
color: var(--text);
}
.userEmail {
font-size: 0.75rem;
color: var(--text-muted);
margin-top: 2px;
}
.userLogout {
display: block;
padding: 10px 16px;
color: var(--danger);
text-decoration: none;
font-size: 0.85rem;
font-weight: 500;
transition: background 0.15s;
}
.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;
}