feat: skeleton cards + tab fade + modal pop animation + scrollbar polish
Visual-polish round 2. - VOD skeleton loader: replaces the "Loading..." placeholder with six shimmering skeleton cards that share the real cards dimensions. The grid no longer collapses+expands as VODs arrive, and the shimmer telegraphs that work is happening rather than the app sitting silent. CSS @keyframes skel-shimmer drives a smooth 1.5s gradient pan. - Tab switch animation: 180ms ease-out fade-in + 4px lift on every .tab-content.active. Switching between VODs / Statistik / Archiv / Einstellungen no longer feels like an instant paint-swap. - Modal overhaul: backdrop-filter blur(8px) on the overlay so the app behind softly blurs out, animated pop on the modal itself (scale 0.96 -> 1 + translateY 8px -> 0 with a clean spring curve), proper bordered + glow-cornered card, and the close X swapped from a flat 24px text button to a real 30x30 rounded pill with hover-red highlight. - Scrollbar: thin 10px purple-tinted webkit scrollbar across the entire app, matching the accent color. Hover deepens to full purple. Track is near-transparent. Looks intentional instead of the default OS gray. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
8928d1f8ed
commit
cc23f1e272
@ -682,7 +682,19 @@ async function selectStreamer(name: string, forceRefresh = false): Promise<void>
|
|||||||
updateStatus(UI_TEXT.status.noLogin, false);
|
updateStatus(UI_TEXT.status.noLogin, false);
|
||||||
}
|
}
|
||||||
|
|
||||||
byId('vodGrid').innerHTML = `<div class="empty-state"><p>${UI_TEXT.vods.loading}</p></div>`;
|
// Skeleton loader — six placeholder cards while VODs come in. Much
|
||||||
|
// less jarring than a "Loading..." text block in an otherwise blank
|
||||||
|
// grid. Shimmer animation is in CSS.
|
||||||
|
byId('vodGrid').innerHTML = Array.from({ length: 6 }, () => `
|
||||||
|
<div class="vod-card vod-card-skeleton">
|
||||||
|
<div class="vod-skel-thumb"></div>
|
||||||
|
<div class="vod-info">
|
||||||
|
<div class="vod-skel-line" style="width: 85%;"></div>
|
||||||
|
<div class="vod-skel-line" style="width: 55%; margin-top: 8px; height: 10px;"></div>
|
||||||
|
<div class="vod-skel-line" style="width: 40%; margin-top: 6px; height: 10px;"></div>
|
||||||
|
</div>
|
||||||
|
</div>
|
||||||
|
`).join('');
|
||||||
|
|
||||||
const userId = await window.api.getUserId(name);
|
const userId = await window.api.getUserId(name);
|
||||||
if (isStaleRequest()) {
|
if (isStaleRequest()) {
|
||||||
|
|||||||
124
src/styles.css
124
src/styles.css
@ -166,6 +166,80 @@ body {
|
|||||||
font-weight: 600;
|
font-weight: 600;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/* ============================================
|
||||||
|
VOD SKELETON CARDS — shown while VODs load
|
||||||
|
============================================ */
|
||||||
|
.vod-card-skeleton {
|
||||||
|
cursor: default;
|
||||||
|
pointer-events: none;
|
||||||
|
border-color: transparent !important;
|
||||||
|
box-shadow: none !important;
|
||||||
|
transform: none !important;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vod-card-skeleton .vod-skel-thumb {
|
||||||
|
width: 100%;
|
||||||
|
aspect-ratio: 16/9;
|
||||||
|
background: linear-gradient(90deg, var(--bg-elevated) 0%, rgba(255,255,255,0.04) 50%, var(--bg-elevated) 100%);
|
||||||
|
background-size: 200% 100%;
|
||||||
|
animation: skel-shimmer 1.5s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
.vod-card-skeleton .vod-skel-line {
|
||||||
|
height: 14px;
|
||||||
|
background: linear-gradient(90deg, var(--bg-elevated) 0%, rgba(255,255,255,0.06) 50%, var(--bg-elevated) 100%);
|
||||||
|
background-size: 200% 100%;
|
||||||
|
border-radius: 3px;
|
||||||
|
animation: skel-shimmer 1.5s linear infinite;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes skel-shimmer {
|
||||||
|
0% { background-position: 200% 0; }
|
||||||
|
100% { background-position: -200% 0; }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================
|
||||||
|
TAB SWITCH FADE — subtle 180ms ease-in
|
||||||
|
============================================ */
|
||||||
|
.tab-content.active {
|
||||||
|
animation: tab-fade-in 0.18s ease-out;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes tab-fade-in {
|
||||||
|
from { opacity: 0; transform: translateY(4px); }
|
||||||
|
to { opacity: 1; transform: translateY(0); }
|
||||||
|
}
|
||||||
|
|
||||||
|
/* ============================================
|
||||||
|
SCROLLBAR — twitch-themed, thin, subtle
|
||||||
|
============================================ */
|
||||||
|
*::-webkit-scrollbar {
|
||||||
|
width: 10px;
|
||||||
|
height: 10px;
|
||||||
|
}
|
||||||
|
|
||||||
|
*::-webkit-scrollbar-track {
|
||||||
|
background: rgba(255, 255, 255, 0.02);
|
||||||
|
}
|
||||||
|
|
||||||
|
*::-webkit-scrollbar-thumb {
|
||||||
|
background: rgba(145, 70, 255, 0.25);
|
||||||
|
border-radius: 5px;
|
||||||
|
border: 2px solid transparent;
|
||||||
|
background-clip: padding-box;
|
||||||
|
transition: background 0.2s;
|
||||||
|
}
|
||||||
|
|
||||||
|
*::-webkit-scrollbar-thumb:hover {
|
||||||
|
background: rgba(145, 70, 255, 0.55);
|
||||||
|
background-clip: padding-box;
|
||||||
|
border: 2px solid transparent;
|
||||||
|
}
|
||||||
|
|
||||||
|
*::-webkit-scrollbar-corner {
|
||||||
|
background: transparent;
|
||||||
|
}
|
||||||
|
|
||||||
.add-streamer {
|
.add-streamer {
|
||||||
padding: 10px;
|
padding: 10px;
|
||||||
display: flex;
|
display: flex;
|
||||||
@ -1836,45 +1910,77 @@ body.theme-light .modal {
|
|||||||
left: 0;
|
left: 0;
|
||||||
right: 0;
|
right: 0;
|
||||||
bottom: 0;
|
bottom: 0;
|
||||||
background: rgba(0, 0, 0, 0.7);
|
background: rgba(0, 0, 0, 0.65);
|
||||||
display: none;
|
display: none;
|
||||||
justify-content: center;
|
justify-content: center;
|
||||||
align-items: center;
|
align-items: center;
|
||||||
z-index: 1000;
|
z-index: 1000;
|
||||||
|
backdrop-filter: blur(8px);
|
||||||
|
-webkit-backdrop-filter: blur(8px);
|
||||||
|
animation: modal-overlay-fade 0.2s ease-out;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-overlay.show {
|
.modal-overlay.show {
|
||||||
display: flex;
|
display: flex;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@keyframes modal-overlay-fade {
|
||||||
|
from { opacity: 0; }
|
||||||
|
to { opacity: 1; }
|
||||||
|
}
|
||||||
|
|
||||||
.modal {
|
.modal {
|
||||||
background: var(--bg-card);
|
background: var(--bg-card);
|
||||||
border-radius: 12px;
|
border: 1px solid var(--border-soft);
|
||||||
padding: 25px;
|
border-radius: 14px;
|
||||||
|
padding: 25px 28px;
|
||||||
width: 90%;
|
width: 90%;
|
||||||
max-width: 500px;
|
max-width: 500px;
|
||||||
max-height: 90vh;
|
max-height: 90vh;
|
||||||
overflow-y: auto;
|
overflow-y: auto;
|
||||||
|
box-shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(145, 70, 255, 0.10);
|
||||||
|
animation: modal-pop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
|
||||||
|
position: relative;
|
||||||
|
}
|
||||||
|
|
||||||
|
@keyframes modal-pop {
|
||||||
|
from { opacity: 0; transform: scale(0.96) translateY(8px); }
|
||||||
|
to { opacity: 1; transform: scale(1) translateY(0); }
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal h2 {
|
.modal h2 {
|
||||||
margin-bottom: 20px;
|
margin-bottom: 18px;
|
||||||
font-size: 18px;
|
font-size: 18px;
|
||||||
|
font-weight: 600;
|
||||||
|
letter-spacing: -0.2px;
|
||||||
|
color: var(--text);
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-close {
|
.modal-close {
|
||||||
float: right;
|
position: absolute;
|
||||||
background: none;
|
top: 14px;
|
||||||
border: none;
|
right: 14px;
|
||||||
|
width: 30px;
|
||||||
|
height: 30px;
|
||||||
|
background: transparent;
|
||||||
|
border: 1px solid var(--border-soft);
|
||||||
|
border-radius: 8px;
|
||||||
color: var(--text-secondary);
|
color: var(--text-secondary);
|
||||||
font-size: 24px;
|
font-size: 16px;
|
||||||
cursor: pointer;
|
cursor: pointer;
|
||||||
padding: 0;
|
padding: 0;
|
||||||
line-height: 1;
|
line-height: 1;
|
||||||
|
transition: background 0.15s, color 0.15s, border-color 0.15s, transform 0.12s;
|
||||||
}
|
}
|
||||||
|
|
||||||
.modal-close:hover {
|
.modal-close:hover {
|
||||||
color: var(--text);
|
color: #fff;
|
||||||
|
background: rgba(255, 70, 70, 0.18);
|
||||||
|
border-color: rgba(255, 70, 70, 0.55);
|
||||||
|
}
|
||||||
|
|
||||||
|
.modal-close:active {
|
||||||
|
transform: scale(0.92);
|
||||||
}
|
}
|
||||||
|
|
||||||
.slider-group {
|
.slider-group {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user