Backend optimizations, frontend optimizations, and UI design improvements
Backend optimizations: - GZip middleware for compressed responses - Concurrent WebSocket broadcast - Skip status polling when no clients connected - Deduplicated token validation with caching - Fire-and-forget HA state callbacks - Single stat() per browser item - Metadata caching (LRU) - M3U playlist optimization - Autostart setup (Task Scheduler + hidden VBS launcher) Frontend code optimizations: - Fix thumbnail blob URL memory leak - Fix WebSocket ping interval leak on reconnect - Skip artwork re-fetch when same track playing - Deduplicate volume slider logic - Extract magic numbers into named constants - Standardize error handling with toast notifications - Cache play/pause SVG constants - Loading state management for async buttons - Request deduplication for rapid clicks - Cache 30+ DOM element references - Deduplicate volume updates over WebSocket Frontend design improvements: - Progress bar seek thumb and hover expansion - Custom themed scrollbars - Toast notification accent border strips - Keyboard focus-visible states - Album art ambient glow effect - Animated sliding tab indicator - Mini-player top progress line - Empty state SVG illustrations - Responsive tablet breakpoint (601-900px) - Horizontal player layout on wide screens (>900px) - Glassmorphism mini-player with backdrop blur - Vinyl spin animation (toggleable) - Table horizontal scroll on narrow screens Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -51,6 +51,55 @@
|
||||
opacity: 1;
|
||||
}
|
||||
|
||||
/* Custom Scrollbars */
|
||||
::-webkit-scrollbar {
|
||||
width: 8px;
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-track {
|
||||
background: var(--bg-primary);
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb {
|
||||
background: var(--border);
|
||||
border-radius: 4px;
|
||||
}
|
||||
|
||||
::-webkit-scrollbar-thumb:hover {
|
||||
background: var(--text-muted);
|
||||
}
|
||||
|
||||
* {
|
||||
scrollbar-width: thin;
|
||||
scrollbar-color: var(--border) var(--bg-primary);
|
||||
}
|
||||
|
||||
/* Focus-visible states for keyboard accessibility */
|
||||
:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
}
|
||||
|
||||
button:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: 2px;
|
||||
box-shadow: 0 0 0 4px rgba(29, 185, 84, 0.2);
|
||||
}
|
||||
|
||||
input:focus-visible,
|
||||
select:focus-visible,
|
||||
textarea:focus-visible {
|
||||
outline: none;
|
||||
border-color: var(--accent);
|
||||
box-shadow: 0 0 0 3px rgba(29, 185, 84, 0.15);
|
||||
}
|
||||
|
||||
.tab-btn:focus-visible {
|
||||
outline: 2px solid var(--accent);
|
||||
outline-offset: -2px;
|
||||
}
|
||||
|
||||
/* Prevent scrolling when dialog is open */
|
||||
body.dialog-open {
|
||||
overflow: hidden;
|
||||
@@ -157,6 +206,20 @@
|
||||
background: var(--bg-secondary);
|
||||
border-radius: 10px;
|
||||
border: 1px solid var(--border);
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.tab-indicator {
|
||||
position: absolute;
|
||||
top: 0.25rem;
|
||||
bottom: 0.25rem;
|
||||
left: 0;
|
||||
background: var(--bg-tertiary);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
||||
transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1), width 0.3s cubic-bezier(0.4, 0, 0.2, 1);
|
||||
z-index: 0;
|
||||
pointer-events: none;
|
||||
}
|
||||
|
||||
.tab-btn {
|
||||
@@ -173,21 +236,21 @@
|
||||
font-size: 0.8rem;
|
||||
font-weight: 500;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s;
|
||||
transition: color 0.2s;
|
||||
width: auto;
|
||||
height: auto;
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
.tab-btn:hover {
|
||||
color: var(--text-primary);
|
||||
background: var(--bg-tertiary) !important;
|
||||
transform: none !important;
|
||||
}
|
||||
|
||||
.tab-btn.active {
|
||||
color: var(--accent);
|
||||
background: var(--bg-tertiary);
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
|
||||
background: transparent;
|
||||
}
|
||||
|
||||
.tab-btn svg {
|
||||
@@ -221,10 +284,35 @@
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.player-layout {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
}
|
||||
|
||||
.player-details {
|
||||
flex: 1;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
.album-art-container {
|
||||
display: flex;
|
||||
justify-content: center;
|
||||
margin-bottom: 2rem;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.album-art-glow {
|
||||
position: absolute;
|
||||
width: 300px;
|
||||
height: 300px;
|
||||
object-fit: cover;
|
||||
border-radius: 8px;
|
||||
filter: blur(40px) saturate(1.5);
|
||||
opacity: 0.5;
|
||||
transform: scale(1.1);
|
||||
z-index: 0;
|
||||
pointer-events: none;
|
||||
transition: opacity 0.5s ease;
|
||||
}
|
||||
|
||||
#album-art {
|
||||
@@ -234,6 +322,38 @@
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
|
||||
background: var(--bg-tertiary);
|
||||
position: relative;
|
||||
z-index: 1;
|
||||
}
|
||||
|
||||
:root[data-theme="light"] .album-art-glow {
|
||||
opacity: 0.35;
|
||||
filter: blur(50px) saturate(1.8);
|
||||
}
|
||||
|
||||
/* Vinyl Spin Animation */
|
||||
.album-art-container.vinyl #album-art {
|
||||
border-radius: 50%;
|
||||
transition: border-radius 0.5s ease, box-shadow 0.5s ease;
|
||||
box-shadow: 0 0 0 8px var(--bg-tertiary), 0 0 0 10px var(--border), 0 8px 24px rgba(0, 0, 0, 0.5);
|
||||
}
|
||||
|
||||
.album-art-container.vinyl .album-art-glow {
|
||||
border-radius: 50%;
|
||||
}
|
||||
|
||||
.album-art-container.vinyl.spinning #album-art {
|
||||
animation: vinylSpin 4s linear infinite;
|
||||
}
|
||||
|
||||
.album-art-container.vinyl.paused #album-art {
|
||||
animation: vinylSpin 4s linear infinite;
|
||||
animation-play-state: paused;
|
||||
}
|
||||
|
||||
@keyframes vinylSpin {
|
||||
from { transform: rotate(0deg); }
|
||||
to { transform: rotate(360deg); }
|
||||
}
|
||||
|
||||
.track-info {
|
||||
@@ -293,7 +413,11 @@
|
||||
border-radius: 3px;
|
||||
cursor: pointer;
|
||||
position: relative;
|
||||
overflow: hidden;
|
||||
transition: height 0.15s ease;
|
||||
}
|
||||
|
||||
.progress-bar:hover {
|
||||
height: 8px;
|
||||
}
|
||||
|
||||
.progress-fill {
|
||||
@@ -302,6 +426,25 @@
|
||||
border-radius: 3px;
|
||||
width: 0;
|
||||
transition: width 0.1s linear;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.progress-fill::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: -6px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%) scale(0);
|
||||
width: 12px;
|
||||
height: 12px;
|
||||
background: var(--accent);
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.progress-bar:hover .progress-fill::after {
|
||||
transform: translateY(-50%) scale(1);
|
||||
}
|
||||
|
||||
.controls {
|
||||
@@ -375,6 +518,12 @@
|
||||
background: var(--accent);
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
||||
}
|
||||
|
||||
#volume-slider:hover::-webkit-slider-thumb {
|
||||
transform: scale(1.3);
|
||||
box-shadow: 0 0 6px rgba(29, 185, 84, 0.4);
|
||||
}
|
||||
|
||||
#volume-slider::-moz-range-thumb {
|
||||
@@ -384,6 +533,12 @@
|
||||
border-radius: 50%;
|
||||
cursor: pointer;
|
||||
border: none;
|
||||
transition: transform 0.15s ease, box-shadow 0.15s ease;
|
||||
}
|
||||
|
||||
#volume-slider:hover::-moz-range-thumb {
|
||||
transform: scale(1.3);
|
||||
box-shadow: 0 0 6px rgba(29, 185, 84, 0.4);
|
||||
}
|
||||
|
||||
.volume-display {
|
||||
@@ -404,6 +559,44 @@
|
||||
color: var(--text-muted);
|
||||
padding-top: 1rem;
|
||||
border-top: 1px solid var(--border);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 0.75rem;
|
||||
}
|
||||
|
||||
.vinyl-toggle-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
padding: 0;
|
||||
background: transparent;
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 50%;
|
||||
color: var(--text-muted);
|
||||
cursor: pointer;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
transition: all 0.2s;
|
||||
margin-left: auto;
|
||||
}
|
||||
|
||||
.vinyl-toggle-btn:hover {
|
||||
color: var(--accent);
|
||||
border-color: var(--accent);
|
||||
background: transparent;
|
||||
transform: none;
|
||||
}
|
||||
|
||||
.vinyl-toggle-btn.active {
|
||||
color: var(--accent);
|
||||
border-color: var(--accent);
|
||||
background: rgba(29, 185, 84, 0.1);
|
||||
}
|
||||
|
||||
.vinyl-toggle-btn svg {
|
||||
width: 16px;
|
||||
height: 16px;
|
||||
}
|
||||
|
||||
/* Scripts Section */
|
||||
@@ -477,6 +670,7 @@
|
||||
border-radius: 12px;
|
||||
padding: 2rem;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
|
||||
overflow-x: auto;
|
||||
}
|
||||
|
||||
.script-management h2 {
|
||||
@@ -511,6 +705,7 @@
|
||||
|
||||
.scripts-table {
|
||||
width: 100%;
|
||||
min-width: 500px;
|
||||
border-collapse: collapse;
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
@@ -527,6 +722,7 @@
|
||||
|
||||
.scripts-table td {
|
||||
padding: 0.75rem;
|
||||
word-break: break-word;
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
@@ -686,6 +882,7 @@
|
||||
|
||||
.dialog-header {
|
||||
padding: 1.5rem;
|
||||
background: var(--bg-tertiary);
|
||||
border-bottom: 1px solid var(--border);
|
||||
}
|
||||
|
||||
@@ -784,6 +981,31 @@
|
||||
font-size: 0.875rem;
|
||||
}
|
||||
|
||||
.empty-state-illustration {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
align-items: center;
|
||||
gap: 1rem;
|
||||
padding: 3rem 2rem;
|
||||
}
|
||||
|
||||
.empty-state-illustration svg {
|
||||
width: 64px;
|
||||
height: 64px;
|
||||
fill: none;
|
||||
stroke: var(--text-muted);
|
||||
stroke-width: 1.5;
|
||||
stroke-linecap: round;
|
||||
stroke-linejoin: round;
|
||||
opacity: 0.5;
|
||||
}
|
||||
|
||||
.empty-state-illustration p {
|
||||
color: var(--text-muted);
|
||||
font-size: 0.875rem;
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.toast {
|
||||
position: fixed;
|
||||
bottom: 2rem;
|
||||
@@ -792,12 +1014,14 @@
|
||||
border: 1px solid var(--border);
|
||||
border-radius: 8px;
|
||||
padding: 1rem 1.5rem;
|
||||
padding-left: 1.25rem;
|
||||
box-shadow: 0 4px 20px rgba(0, 0, 0, 0.5);
|
||||
opacity: 0;
|
||||
transform: translateY(20px);
|
||||
transition: all 0.3s;
|
||||
pointer-events: none;
|
||||
z-index: 1000;
|
||||
border-left: 4px solid var(--border);
|
||||
}
|
||||
|
||||
.toast.show {
|
||||
@@ -807,10 +1031,12 @@
|
||||
|
||||
.toast.success {
|
||||
border-color: var(--accent);
|
||||
border-left-color: var(--accent);
|
||||
}
|
||||
|
||||
.toast.error {
|
||||
border-color: var(--error);
|
||||
border-left-color: var(--error);
|
||||
}
|
||||
|
||||
/* Auth Modal */
|
||||
@@ -933,16 +1159,36 @@
|
||||
bottom: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
background: var(--bg-secondary);
|
||||
border-top: 1px solid var(--border);
|
||||
background: rgba(30, 30, 30, 0.8);
|
||||
-webkit-backdrop-filter: blur(20px) saturate(1.5);
|
||||
backdrop-filter: blur(20px) saturate(1.5);
|
||||
border-top: 1px solid rgba(255, 255, 255, 0.08);
|
||||
padding: 0.75rem 1rem;
|
||||
padding-top: calc(0.75rem + 2px);
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 1.5rem;
|
||||
z-index: 1000;
|
||||
transform: translateY(0);
|
||||
transition: transform 0.3s ease-in-out, opacity 0.3s ease-in-out;
|
||||
box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.3);
|
||||
box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.3);
|
||||
}
|
||||
|
||||
:root[data-theme="light"] .mini-player {
|
||||
background: rgba(245, 245, 245, 0.75);
|
||||
border-top: 1px solid rgba(0, 0, 0, 0.08);
|
||||
box-shadow: 0 -4px 16px rgba(0, 0, 0, 0.1);
|
||||
}
|
||||
|
||||
.mini-player::before {
|
||||
content: '';
|
||||
position: absolute;
|
||||
top: 0;
|
||||
left: 0;
|
||||
height: 2px;
|
||||
width: var(--mini-progress, 0%);
|
||||
background: var(--accent);
|
||||
transition: width 0.1s linear;
|
||||
}
|
||||
|
||||
.mini-player.hidden {
|
||||
@@ -1026,6 +1272,25 @@
|
||||
border-radius: 2px;
|
||||
width: 0%;
|
||||
transition: width 0.1s linear;
|
||||
position: relative;
|
||||
}
|
||||
|
||||
.mini-progress-fill::after {
|
||||
content: '';
|
||||
position: absolute;
|
||||
right: -5px;
|
||||
top: 50%;
|
||||
transform: translateY(-50%) scale(0);
|
||||
width: 10px;
|
||||
height: 10px;
|
||||
background: var(--accent);
|
||||
border-radius: 50%;
|
||||
box-shadow: 0 0 4px rgba(0, 0, 0, 0.3);
|
||||
transition: transform 0.15s ease;
|
||||
}
|
||||
|
||||
.mini-progress-bar:hover .mini-progress-fill::after {
|
||||
transform: translateY(-50%) scale(1);
|
||||
}
|
||||
|
||||
.mini-controls {
|
||||
@@ -1417,7 +1682,7 @@
|
||||
gap: 1rem;
|
||||
margin-bottom: 1.5rem;
|
||||
min-height: 200px;
|
||||
align-items: start;
|
||||
align-items: stretch;
|
||||
}
|
||||
|
||||
/* Compact Grid */
|
||||
@@ -1683,6 +1948,7 @@
|
||||
.browser-item-info {
|
||||
width: 100%;
|
||||
text-align: center;
|
||||
margin-top: auto;
|
||||
}
|
||||
|
||||
.browser-item-name {
|
||||
@@ -1929,4 +2195,73 @@
|
||||
.browser-list-type {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.album-art-glow {
|
||||
width: 250px;
|
||||
height: 250px;
|
||||
}
|
||||
|
||||
.mini-volume-container {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.mini-player {
|
||||
gap: 0.75rem;
|
||||
padding: 0.5rem 0.75rem;
|
||||
padding-top: calc(0.5rem + 2px);
|
||||
}
|
||||
|
||||
.mini-player-info {
|
||||
min-width: 120px;
|
||||
}
|
||||
|
||||
.mini-progress-container {
|
||||
gap: 0.5rem;
|
||||
}
|
||||
}
|
||||
|
||||
/* Tablet breakpoint */
|
||||
@media (min-width: 601px) and (max-width: 900px) {
|
||||
.browser-list-bitrate {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.browser-list-item {
|
||||
grid-template-columns: 40px 1fr auto auto auto;
|
||||
}
|
||||
}
|
||||
|
||||
/* Wide screens - horizontal player layout */
|
||||
@media (min-width: 900px) {
|
||||
.container {
|
||||
max-width: 960px;
|
||||
}
|
||||
|
||||
.player-layout {
|
||||
flex-direction: row;
|
||||
gap: 2.5rem;
|
||||
align-items: flex-start;
|
||||
}
|
||||
|
||||
.album-art-container {
|
||||
margin-bottom: 0;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
|
||||
.player-details .track-info {
|
||||
text-align: left;
|
||||
}
|
||||
|
||||
.player-details .playback-state {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.player-details .controls {
|
||||
justify-content: flex-start;
|
||||
}
|
||||
|
||||
.player-details .source-info {
|
||||
text-align: left;
|
||||
justify-content: flex-start;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user