Add up-next queue panel

Shows upcoming videos in the autoplay queue below now-playing meta.
Clickable to jump to any video. Hidden when queue has 1 item or empty.
Updates on playFromList, playNext, playPrev. Hidden in empty player state.

Files:
- frontend/index.html: upnext section in player pane
- frontend/app.js: renderUpNext(), wired into playFromList/playNext/playPrev
- frontend/styles.css: .upnext, .upnext-item, .upnext-list styles
This commit is contained in:
Jonathan Sykes
2026-06-14 14:44:52 +08:00
parent 0ba0f56a54
commit 4376cd9e88
7 changed files with 94 additions and 2 deletions

View File

@@ -517,7 +517,62 @@ input[type="range"]::-webkit-slider-thumb:hover { transform: scale(1.25); }
}
.player-pane.empty .controls,
.player-pane.empty .now-meta { display: none; }
.player-pane.empty .now-meta,
.player-pane.empty .upnext { display: none; }
/* ===================== Up next queue ===================== */
.upnext {
margin-top: 16px;
background: linear-gradient(180deg, var(--bg-2), var(--bg-1));
border: 1px solid var(--line);
border-radius: var(--radius);
padding: 14px 16px;
}
.upnext-header {
display: flex; align-items: center; gap: 8px;
font-family: var(--mono);
font-size: 10px; font-weight: 700;
text-transform: uppercase; letter-spacing: 0.16em;
color: var(--text-dim);
margin-bottom: 10px;
}
.upnext-count {
font-family: var(--mono);
font-size: 10px;
color: var(--accent);
background: rgba(255,75,50,0.12);
padding: 0 7px;
border-radius: 10px;
line-height: 17px;
}
.upnext-list {
display: flex; flex-direction: column; gap: 6px;
max-height: 200px; overflow-y: auto;
}
.upnext-item {
display: flex; gap: 10px;
padding: 6px;
border-radius: 9px;
cursor: pointer;
transition: background 0.16s;
}
.upnext-item:hover { background: var(--bg-3); }
.upnext-item img {
width: 80px; aspect-ratio: 16/9;
border-radius: 6px;
object-fit: cover;
background: #000;
flex-shrink: 0;
}
.upnext-info { min-width: 0; display: flex; flex-direction: column; justify-content: center; }
.upnext-title {
font-size: 12.5px; font-weight: 600;
display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}
.upnext-channel {
font-size: 11px; color: var(--text-dim);
margin-top: 3px;
}
/* ===================== List pane ===================== */
.list-pane {