Files
vibesonic/web/static/css/app.css
T
owenandClaude Sonnet 5 789bf91eed Complete Phase 4: security hardening, player/playlist/admin UI, docs
Security:
- New internal/netguard package: podcast feed/enclosure fetching now
  refuses to dial non-public IPs (loopback/RFC1918/link-local/cloud
  metadata/CGNAT), validated per-connection including across redirects,
  closing an SSRF gap where a malicious or compromised feed URL could
  probe the server's internal network. Configurable via
  VIBESONIC_PODCASTS_ALLOW_PRIVATE_NETWORKS for intentional LAN feeds.
- Podcast episode downloads capped at 4GB (was unbounded, disk-exhaustion risk)
- Cover art decoding now rejects images above a 40-megapixel budget
  before full decode (decompression-bomb guard)
- HTTP server sets ReadHeaderTimeout (slowloris hardening)
- Admin folder-scan redirect now validated as same-site instead of
  trusting the raw Referer header (open-redirect fix)
- Legacy Subsonic token/salt auth now uses a constant-time comparison

Web UI completion:
- Persistent player: shuffle and repeat (off/all/one) controls, wired
  into queue advance/prev logic and persisted like other player state
- Admin user-permissions form: adminRole toggle (with a guard against
  demoting the last remaining admin) and per-user music-folder access
  checkboxes, backed by existing schema/enforcement that was previously
  unreachable from the UI
- Playlist M3U8 import/export

Docs: added docs/client-compatibility.md (honest tracking template —
no client testing has been performed), docs/deployment.md,
docs/security.md, docs/backup.md; refreshed README and cross-links;
added a footnote in docs/subsonic-compatibility.md distinguishing
spec-standard from VibeSonic-original OpenSubsonic extensions.

Also added Go fuzz tests for the external-auth CIDR/IP parser and the
LRC lyrics parser.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_014r98AtcBbevpscWLsfwVvv
2026-08-23 09:18:17 -05:00

355 lines
5.8 KiB
CSS

/* VibeSonic — compact, dark-first UI on top of Bootstrap 5. */
:root {
--vs-sidebar-width: 230px;
--vs-player-height: 76px;
--vs-topbar-height: 52px;
}
html, body {
height: 100%;
}
body {
min-height: 100vh;
display: flex;
flex-direction: column;
font-size: 0.9rem;
}
/* --- Top bar --- */
.vs-topbar {
height: var(--vs-topbar-height);
padding: 0 1rem;
border-bottom: 1px solid var(--bs-border-color);
flex: 0 0 auto;
}
.vs-brand {
font-weight: 600;
letter-spacing: 0.02em;
text-decoration: none;
color: var(--bs-body-color);
}
.vs-brand i {
color: var(--bs-primary);
}
.vs-icon-btn {
border: 1px solid var(--bs-border-color);
background: transparent;
color: var(--bs-body-color);
width: 2rem;
height: 2rem;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 0.375rem;
}
.vs-icon-btn:hover {
background: var(--bs-secondary-bg);
}
/* --- Shell --- */
.vs-shell {
flex: 1 1 auto;
display: flex;
min-height: 0;
}
.vs-sidebar {
width: var(--vs-sidebar-width);
flex: 0 0 auto;
border-right: 1px solid var(--bs-border-color);
overflow-y: auto;
padding: 0.75rem 0;
}
.vs-nav .nav-link {
color: var(--bs-secondary-color);
padding: 0.35rem 1rem;
border-radius: 0;
font-size: 0.875rem;
display: flex;
align-items: center;
gap: 0.55rem;
}
.vs-nav .nav-link i {
width: 1.1rem;
text-align: center;
}
.vs-nav .nav-link:hover {
background: var(--bs-secondary-bg);
color: var(--bs-body-color);
}
.vs-nav .nav-link.active {
background: var(--bs-secondary-bg);
color: var(--bs-body-color);
border-left: 2px solid var(--bs-primary);
padding-left: calc(1rem - 2px);
font-weight: 600;
}
.vs-nav-label {
padding: 0.75rem 1rem 0.25rem;
font-size: 0.7rem;
text-transform: uppercase;
letter-spacing: 0.06em;
color: var(--bs-tertiary-color);
}
.vs-main {
flex: 1 1 auto;
overflow-y: auto;
padding-bottom: calc(var(--vs-player-height) + 1rem);
}
.vs-page-header {
padding: 1rem 1.25rem 0.5rem;
}
.vs-content {
padding: 0 1.25rem 1.25rem;
}
/* --- Album/artist grid --- */
.vs-grid {
display: grid;
grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
gap: 1rem;
}
.vs-card {
text-decoration: none;
color: inherit;
}
.vs-card-art {
aspect-ratio: 1 / 1;
width: 100%;
border-radius: 0.375rem;
background: var(--bs-secondary-bg);
object-fit: cover;
display: block;
}
.vs-card-title {
margin-top: 0.4rem;
font-size: 0.85rem;
font-weight: 600;
color: var(--bs-body-color);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
.vs-card-subtitle {
font-size: 0.78rem;
color: var(--bs-secondary-color);
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
}
/* --- Compact tables --- */
.vs-table td, .vs-table th {
padding: 0.35rem 0.6rem;
vertical-align: middle;
font-size: 0.85rem;
}
.vs-table-hover tbody tr:hover {
background: var(--bs-secondary-bg);
cursor: pointer;
}
.vs-track-num {
color: var(--bs-tertiary-color);
width: 2.5rem;
text-align: right;
}
/* --- Player bar --- */
.vs-player {
position: fixed;
left: 0;
right: 0;
bottom: 0;
height: var(--vs-player-height);
background: var(--bs-body-bg);
border-top: 1px solid var(--bs-border-color);
display: flex;
align-items: center;
gap: 1rem;
padding: 0 1rem;
z-index: 1030;
}
.vs-player-art {
width: 48px;
height: 48px;
border-radius: 0.25rem;
background: var(--bs-secondary-bg);
object-fit: cover;
flex: 0 0 auto;
}
.vs-player-meta {
min-width: 140px;
max-width: 220px;
overflow: hidden;
}
.vs-player-title {
font-size: 0.85rem;
font-weight: 600;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.vs-player-artist {
font-size: 0.78rem;
color: var(--bs-secondary-color);
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.vs-player-controls {
display: flex;
align-items: center;
gap: 0.75rem;
flex: 1 1 auto;
min-width: 0;
}
.vs-player-buttons {
display: flex;
align-items: center;
gap: 0.5rem;
flex: 0 0 auto;
}
.vs-player-btn {
background: transparent;
border: none;
color: var(--bs-body-color);
font-size: 1.1rem;
width: 2.1rem;
height: 2.1rem;
display: inline-flex;
align-items: center;
justify-content: center;
border-radius: 50%;
}
.vs-player-btn:hover {
background: var(--bs-secondary-bg);
}
.vs-player-btn.vs-play {
font-size: 1.4rem;
}
.vs-player-btn.active {
color: var(--bs-primary);
}
.vs-player-timeline {
display: flex;
align-items: center;
gap: 0.5rem;
flex: 1 1 auto;
min-width: 0;
}
.vs-player-time {
font-size: 0.72rem;
color: var(--bs-secondary-color);
width: 2.6rem;
text-align: center;
flex: 0 0 auto;
}
.vs-player-volume {
display: flex;
align-items: center;
gap: 0.4rem;
width: 130px;
flex: 0 0 auto;
}
.vs-lyrics-panel {
position: fixed;
left: 0;
right: 0;
bottom: var(--vs-player-height);
max-height: 40vh;
overflow-y: auto;
background: var(--bs-body-bg);
border-top: 1px solid var(--bs-border-color);
padding: 1rem;
z-index: 1029;
text-align: center;
}
.vs-lyrics-line {
padding: 0.15rem 0;
color: var(--bs-secondary-color);
transition: color 0.15s ease;
}
.vs-lyrics-line.vs-lyrics-synced {
cursor: pointer;
}
.vs-lyrics-line.vs-lyrics-synced:hover {
color: var(--bs-body-color);
}
.vs-lyrics-line.vs-lyrics-active {
color: var(--bs-body-color);
font-weight: 600;
}
.vs-lyrics-empty {
color: var(--bs-secondary-color);
font-size: 0.85rem;
}
/* --- Misc --- */
.vs-star-btn {
border: none;
background: transparent;
color: var(--bs-tertiary-color);
}
.vs-star-btn.active,
.vs-star-btn:hover {
color: #f0b429;
}
@media (max-width: 768px) {
.vs-sidebar {
display: none;
}
.vs-player-meta {
max-width: 100px;
}
.vs-player-volume {
display: none;
}
}