Lyrics pipeline (Whisper + Demucs + description alignment):
- New GenerateLyricsJob runs WhisperX with VAD filtering and forced word
alignment, writes per-track JSON to NAS.
- New DecorateLyricsJob calls the active LLM provider to bake one to
several emojis into each line (heavy decoration prompt).
- LyricsDescriptionParser strips heading content, section markers, and
emoji-decoration from a song's description while preserving every
language verbatim.
- correct_whisper_with_description aligner: strong-match anchors only,
vocal-region-aware gap-fill so missing verses land on actual singing.
- Owner UI for generate/regenerate/edit/delete in the player gear.
Admin pages:
- /admin/lyrics toggles for VAD, vocal gap-fill, Demucs, master
- /admin/gpu extracted GPU section, encoder picker, FFmpeg path
- /admin/backup extracted users-and-settings export/import
- /admin/settings now AI/LLM only with provider list and Test button
- /admin/nas-storage hosts NAS settings, repair, disable flow, browser
- Shared partials/settings-styles for a uniform look across pages.
Playlist view tracking:
- Migration adds playlists.view_count and playlist_views dedup table.
- Playlist::bumpViewIfNew increments per device with a one-hour window.
- Tracked from /playlists/{id}, /playlists/share/{token}, /ps/{token},
and /videos/{id}?playlist={token}. Dispatched after-response so it
never blocks the page render.
- Loading a playlist on the video page now runs one query instead of
the four the old getNextVideo/getPreviousVideo path triggered.
- View counts shown on every playlist card and the playlist hero.
Player polish:
- Floating mini-player is draggable, persists its position in
localStorage, clamps to viewport on resize.
- Mini disabled entirely on mobile (less than 768px).
- New gear-menu Mini Player toggle (persists in localStorage) lets the
user disable both scroll-activation and SPA-nav-activation.
- Close button keeps media playing when used on the player's own page.
- SPA navigator now swaps a #page-scripts container so per-page JS
(channel tabs, etc.) gets re-executed after content swaps.
Storage layout:
- Runtime data moved from /storage/* to /data/* and gitignored.
- /ml/venv, /ml/cache, /ml/__pycache__ excluded.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
125 lines
5.4 KiB
PHP
125 lines
5.4 KiB
PHP
{{-- Shared styles for all admin settings-style pages: GPU, NAS, Backup, Settings. --}}
|
|
<style>
|
|
.settings-section {
|
|
background: var(--bg-card);
|
|
border: 1px solid var(--border);
|
|
border-radius: var(--radius);
|
|
margin-bottom: 24px;
|
|
overflow: hidden;
|
|
}
|
|
.settings-section-header {
|
|
display: flex; align-items: center; gap: 10px;
|
|
padding: 18px 22px;
|
|
border-bottom: 1px solid var(--border);
|
|
font-size: 14px; font-weight: 600;
|
|
}
|
|
.settings-section-header i { color: var(--brand); font-size: 16px; }
|
|
.settings-section-body { padding: 22px; }
|
|
|
|
.setting-row {
|
|
display: flex; align-items: flex-start; justify-content: space-between;
|
|
gap: 24px; padding: 16px 0;
|
|
border-bottom: 1px solid var(--border);
|
|
}
|
|
.setting-row:last-child { border-bottom: none; padding-bottom: 0; }
|
|
.setting-row:first-child { padding-top: 0; }
|
|
.setting-label { flex: 1; min-width: 0; }
|
|
.setting-label strong { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 3px; }
|
|
.setting-label small { font-size: 12px; color: var(--text-2); line-height: 1.5; }
|
|
.setting-control { flex-shrink: 0; min-width: 220px; display: flex; flex-direction: column; align-items: stretch; gap: 8px; }
|
|
|
|
/* Toggle switch */
|
|
.toggle-wrap { display: flex; align-items: center; gap: 10px; }
|
|
.toggle-switch { position: relative; width: 44px; height: 24px; flex-shrink: 0; cursor: pointer; display: inline-block; }
|
|
.toggle-switch input { opacity: 0; width: 0; height: 0; position: absolute; }
|
|
.toggle-track {
|
|
position: absolute; inset: 0;
|
|
background: var(--border-light); border-radius: 12px;
|
|
transition: background .2s;
|
|
}
|
|
.toggle-thumb {
|
|
position: absolute; top: 3px; left: 3px;
|
|
width: 18px; height: 18px; border-radius: 50%;
|
|
background: #fff; transition: transform .2s;
|
|
box-shadow: 0 1px 3px rgba(0,0,0,.4);
|
|
}
|
|
.toggle-switch input:checked ~ .toggle-track { background: var(--brand); }
|
|
.toggle-switch input:checked ~ .toggle-thumb { transform: translateX(20px); }
|
|
.toggle-label { font-size: 13px; color: var(--text-2); }
|
|
|
|
/* Select / text inputs in setting rows */
|
|
.adm-select-full,
|
|
.adm-input-full {
|
|
width: 100%; height: 38px; box-sizing: border-box;
|
|
background: var(--bg); border: 1px solid var(--border-light);
|
|
border-radius: 8px; color: var(--text); font-size: 13px;
|
|
padding: 0 12px; outline: none; font-family: inherit;
|
|
transition: border-color .15s;
|
|
}
|
|
.adm-select-full { cursor: pointer; }
|
|
.adm-select-full:focus,
|
|
.adm-input-full:focus { border-color: var(--brand); }
|
|
.adm-select-full option { background: #1e1e1e; }
|
|
|
|
/* GPU cards */
|
|
.gpu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px; margin-bottom: 4px; }
|
|
.gpu-card {
|
|
background: var(--bg); border: 1px solid var(--border);
|
|
border-radius: 10px; padding: 16px;
|
|
cursor: pointer; transition: border-color .15s, background .15s;
|
|
position: relative;
|
|
}
|
|
.gpu-card:hover { border-color: #444; background: var(--bg-card2); }
|
|
.gpu-card.selected { border-color: var(--brand); background: var(--brand-dim); }
|
|
.gpu-card-check {
|
|
position: absolute; top: 10px; right: 10px;
|
|
width: 18px; height: 18px; border-radius: 50%;
|
|
border: 2px solid var(--border); background: transparent;
|
|
display: flex; align-items: center; justify-content: center;
|
|
font-size: 10px; color: #fff;
|
|
transition: background .15s, border-color .15s;
|
|
}
|
|
.gpu-card.selected .gpu-card-check { background: var(--brand); border-color: var(--brand); }
|
|
.gpu-card-name { font-size: 13px; font-weight: 600; margin-bottom: 8px; padding-right: 24px; }
|
|
.gpu-stat { display: flex; justify-content: space-between; font-size: 12px; color: var(--text-2); margin-bottom: 4px; }
|
|
.gpu-stat:last-child { margin-bottom: 0; }
|
|
.gpu-stat-val { color: var(--text); font-weight: 500; }
|
|
.mem-bar-wrap { margin-top: 8px; }
|
|
.mem-bar-track { height: 4px; background: var(--border); border-radius: 2px; overflow: hidden; }
|
|
.mem-bar-fill { height: 100%; background: var(--brand); border-radius: 2px; transition: width .4s; }
|
|
|
|
/* No GPU state */
|
|
.no-gpu-state { text-align: center; padding: 28px 20px; color: var(--text-2); }
|
|
.no-gpu-state i { font-size: 32px; display: block; margin-bottom: 10px; opacity: .3; }
|
|
|
|
/* Status chip */
|
|
.chip {
|
|
display: inline-flex; align-items: center; gap: 5px;
|
|
padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600;
|
|
}
|
|
.chip-green { background: rgba(34,197,94,.15); color: #4ade80; border: 1px solid rgba(34,197,94,.25); }
|
|
.chip-red { background: rgba(239,68,68,.15); color: #f87171; border: 1px solid rgba(239,68,68,.25); }
|
|
.chip-dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
|
|
|
|
/* Encoder option cards */
|
|
.enc-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 8px; }
|
|
.enc-card {
|
|
background: var(--bg); border: 1px solid var(--border);
|
|
border-radius: 8px; padding: 12px 14px;
|
|
cursor: pointer; transition: border-color .15s;
|
|
text-align: left;
|
|
}
|
|
.enc-card:hover { border-color: #444; }
|
|
.enc-card.selected { border-color: var(--brand); background: var(--brand-dim); }
|
|
.enc-card-name { font-size: 13px; font-weight: 600; display: block; }
|
|
.enc-card-desc { font-size: 11px; color: var(--text-2); margin-top: 3px; display: block; }
|
|
|
|
.save-bar {
|
|
display: flex; align-items: center; justify-content: flex-end;
|
|
gap: 12px; padding: 4px 0 24px;
|
|
}
|
|
|
|
@keyframes spin { to { transform: rotate(360deg); } }
|
|
.spin { display: inline-block; animation: spin .6s linear infinite; }
|
|
</style>
|