feat: add multi-user support for favorites management and room clock synchronization
- Implemented a new API endpoint for retrieving and managing user favorites in /api/users. - Added functionality for admins to edit the shared "main" user's favorites. - Created a one-shot DB smoke test script for verifying multi-user kiosk migrations. - Introduced a RoomClock class for synchronizing server time across clients using WebSocket.
This commit is contained in:
@@ -267,6 +267,27 @@ body {
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
/* Live spectrum analyser canvas (Electron-only feature). Sits between the
|
||||
genre tags and the stats line. Height is fixed; internal width is set by
|
||||
the visualiser module based on devicePixelRatio. */
|
||||
.master .np .meta .np-spectrum {
|
||||
display: block;
|
||||
width: 100%;
|
||||
height: 72px;
|
||||
border-radius: 8px;
|
||||
background: linear-gradient(180deg, rgba(255, 255, 255, 0.02), rgba(0, 0, 0, 0.25));
|
||||
border: 1px solid rgba(255, 255, 255, 0.06);
|
||||
}
|
||||
|
||||
/* "Broadcasting" role indicator in the topbar \u2014 makes it explicit that
|
||||
this window IS the room's audio source. */
|
||||
.master .topbar .role-pill {
|
||||
background: rgba(80, 220, 255, 0.10);
|
||||
border-color: rgba(80, 220, 255, 0.35);
|
||||
color: rgb(180, 235, 255);
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
|
||||
/* ---------- Transport (embedded in now-playing) ---------- */
|
||||
.master .np .transport {
|
||||
display: flex;
|
||||
@@ -721,3 +742,271 @@ body {
|
||||
padding: 12px 4px;
|
||||
text-align: center;
|
||||
width: 100%;
|
||||
}
|
||||
|
||||
/* ---------- Favorite tabs (users-as-folders) ---------- */
|
||||
.master .fav-tabs {
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
padding: 6px 12px 0;
|
||||
overflow-x: auto;
|
||||
scrollbar-width: none;
|
||||
}
|
||||
|
||||
.master .fav-tabs::-webkit-scrollbar {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.master .fav-tab {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 6px 12px;
|
||||
background: var(--bg-2);
|
||||
color: var(--muted);
|
||||
border: 1px solid var(--line);
|
||||
border-bottom: none;
|
||||
font-size: 12px;
|
||||
cursor: pointer;
|
||||
white-space: nowrap;
|
||||
height: 30px;
|
||||
}
|
||||
|
||||
.master .fav-tab:hover {
|
||||
color: var(--fg);
|
||||
background: var(--bg-3);
|
||||
}
|
||||
|
||||
.master .fav-tab.active {
|
||||
background: var(--bg-1);
|
||||
color: var(--fg);
|
||||
border-color: var(--accent);
|
||||
border-bottom-color: var(--bg-1);
|
||||
margin-bottom: -1px;
|
||||
}
|
||||
|
||||
.master .fav-tab.main .fav-tab-glyph {
|
||||
color: var(--accent-2);
|
||||
}
|
||||
|
||||
.master .fav-tab.self {
|
||||
font-weight: 700;
|
||||
}
|
||||
|
||||
.master .fav-tab-glyph {
|
||||
font-size: 13px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.master .fav-count {
|
||||
color: var(--muted-2);
|
||||
font-weight: 400;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.master .fav-readonly {
|
||||
color: var(--muted-2);
|
||||
font-weight: 400;
|
||||
font-size: 11px;
|
||||
font-style: italic;
|
||||
}
|
||||
|
||||
/* ---------- User pill + avatar ---------- */
|
||||
.master .topbar .user-pill {
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 4px 10px 4px 4px;
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.master .topbar .user-pill .avatar {
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
width: 24px;
|
||||
height: 24px;
|
||||
background: var(--accent);
|
||||
color: #1a0a00;
|
||||
font-weight: 800;
|
||||
font-size: 12px;
|
||||
line-height: 1;
|
||||
border-radius: 0;
|
||||
}
|
||||
|
||||
.master .topbar .user-pill .caret {
|
||||
color: var(--muted-2);
|
||||
font-size: 10px;
|
||||
}
|
||||
|
||||
.master .topbar .user-pill.active {
|
||||
border-color: var(--accent);
|
||||
color: var(--fg);
|
||||
}
|
||||
|
||||
.master .topbar .follow-pill {
|
||||
cursor: pointer;
|
||||
}
|
||||
|
||||
.master .topbar .follow-pill.active {
|
||||
border-color: var(--accent);
|
||||
color: var(--accent-2);
|
||||
}
|
||||
|
||||
/* ---------- Avatar / user-switch popover ---------- */
|
||||
.avatar-popover-wrap {
|
||||
position: fixed;
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.45);
|
||||
display: grid;
|
||||
place-items: center;
|
||||
z-index: 100;
|
||||
}
|
||||
|
||||
.avatar-popover {
|
||||
min-width: 340px;
|
||||
max-width: 480px;
|
||||
background: var(--bg-1);
|
||||
border: 1px solid var(--line);
|
||||
box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
|
||||
}
|
||||
|
||||
.avatar-popover-head {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 12px 16px;
|
||||
border-bottom: 1px solid var(--line);
|
||||
}
|
||||
|
||||
.avatar-popover-head h3 {
|
||||
margin: 0;
|
||||
font-size: 14px;
|
||||
font-weight: 700;
|
||||
letter-spacing: .06em;
|
||||
text-transform: uppercase;
|
||||
color: var(--muted);
|
||||
}
|
||||
|
||||
.avatar-popover .close {
|
||||
background: transparent;
|
||||
border: none;
|
||||
color: var(--muted);
|
||||
font-size: 20px;
|
||||
cursor: pointer;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.avatar-list {
|
||||
display: grid;
|
||||
gap: 4px;
|
||||
padding: 8px;
|
||||
max-height: 60vh;
|
||||
overflow-y: auto;
|
||||
}
|
||||
|
||||
.avatar-row {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 10px 12px;
|
||||
background: var(--bg-2);
|
||||
border: 1px solid var(--line);
|
||||
color: var(--fg);
|
||||
cursor: pointer;
|
||||
text-align: left;
|
||||
font-size: 14px;
|
||||
}
|
||||
|
||||
.avatar-row:hover {
|
||||
border-color: var(--accent);
|
||||
}
|
||||
|
||||
.avatar-row.active {
|
||||
background: var(--bg-3);
|
||||
cursor: default;
|
||||
}
|
||||
|
||||
.avatar.lg {
|
||||
display: inline-grid;
|
||||
place-items: center;
|
||||
width: 36px;
|
||||
height: 36px;
|
||||
background: var(--accent);
|
||||
color: #1a0a00;
|
||||
font-weight: 800;
|
||||
font-size: 16px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.avatar-name {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
.avatar-tag {
|
||||
color: var(--accent-2);
|
||||
font-size: 11px;
|
||||
font-weight: 600;
|
||||
letter-spacing: .04em;
|
||||
}
|
||||
|
||||
.avatar-tag.dim {
|
||||
color: var(--muted-2);
|
||||
font-weight: 400;
|
||||
}
|
||||
|
||||
.avatar-hint {
|
||||
padding: 8px 16px 14px;
|
||||
color: var(--muted-2);
|
||||
font-size: 11px;
|
||||
text-align: center;
|
||||
}
|
||||
/* === Click-to-start gate modal === */
|
||||
.play-gate-backdrop {
|
||||
position: fixed; inset: 0;
|
||||
background: rgba(0,0,0,0.72);
|
||||
backdrop-filter: blur(6px);
|
||||
display: flex; align-items: center; justify-content: center;
|
||||
z-index: 9999;
|
||||
}
|
||||
.play-gate-card {
|
||||
background: #161a22; border: 1px solid #262b36;
|
||||
border-radius: 20px; padding: 28px 32px;
|
||||
min-width: 320px; max-width: 480px;
|
||||
box-shadow: 0 18px 40px rgba(0,0,0,0.55);
|
||||
text-align: center; color: #e9ecf2;
|
||||
}
|
||||
.play-gate-title { margin: 0 0 8px; font-size: 20px; }
|
||||
.play-gate-station { color: #ff7a3d; font-weight: 600; margin-bottom: 4px; }
|
||||
.play-gate-sub { color: #8a90a0; font-size: 13px; margin-bottom: 16px; }
|
||||
.play-gate-row { display: flex; gap: 12px; justify-content: center; margin-top: 18px; }
|
||||
.play-gate-start, .play-gate-cancel {
|
||||
padding: 10px 22px; border-radius: 14px;
|
||||
border: 1px solid #262b36; background: #1f242e; color: #e9ecf2;
|
||||
font-size: 15px; cursor: pointer;
|
||||
}
|
||||
.play-gate-start { background: #ff7a3d; border-color: #ff7a3d; color: #07080b; font-weight: 600; }
|
||||
.play-gate-start:hover { filter: brightness(1.1); }
|
||||
.play-gate-cancel:hover { background: #0e1116; }
|
||||
.play-gate-dismiss {
|
||||
display: flex; gap: 8px; align-items: center; justify-content: center;
|
||||
margin-top: 14px; color: #8a90a0; font-size: 12px; cursor: pointer;
|
||||
}
|
||||
|
||||
/* === Zones panel === */
|
||||
.zones-panel {
|
||||
margin-top: 12px;
|
||||
padding: 10px 12px;
|
||||
background: #0e1116;
|
||||
border: 1px solid #262b36;
|
||||
border-radius: 12px;
|
||||
display: flex; flex-direction: column; gap: 6px;
|
||||
}
|
||||
.zones-label {
|
||||
font-size: 11px; color: #8a90a0; text-transform: uppercase; letter-spacing: 0.1em;
|
||||
}
|
||||
.zone-row {
|
||||
display: grid; grid-template-columns: 120px 1fr 44px; align-items: center; gap: 10px;
|
||||
}
|
||||
.zone-name { font-size: 13px; color: #e9ecf2; overflow: hidden; text-overflow: ellipsis; }
|
||||
.zone-row input[type=range] { width: 100%; }
|
||||
.zone-val { font-size: 12px; color: #8a90a0; text-align: right; font-variant-numeric: tabular-nums; }
|
||||
|
||||
Reference in New Issue
Block a user