mirror of
https://github.com/kilyabin/psysonic.git
synced 2026-07-22 06:25:41 +00:00
feat(mini-player): custom titlebar with action icons; cover/meta/controls layout polish
- Drop the native titlebar on Windows + Linux (decorations: false in open_mini_player); macOS keeps the system titlebar with traffic lights. - Add a slim 26 px custom titlebar with drag region, current track title, and the queue / pin / open-main / close action icons. - Remove the bottom toolbar — those four buttons now live in the titlebar where they're easier to reach. - Refresh the player layout: cover shrinks 112 → 84 px, the right column gets title / artist / transport in a single 84 px-tall block, progress bar spans the full width below. - Add a miniPlayer i18n namespace (showQueue, hideQueue, pinOnTop, pinOff, openMainWindow, close, emptyQueue) localized for all 8 supported locales — previously the tooltips were hard-coded English. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
+74
-19
@@ -9056,30 +9056,87 @@ html.no-compositing .fsr-lyric-line.fsrl-active .fsr-lyric-word.active {
|
||||
}
|
||||
|
||||
/* ─ Mini Player window ───────────────────────────────────────────────────── */
|
||||
.mini-player {
|
||||
/* ── Mini player shell ── outermost wrapper that fills the window ── */
|
||||
.mini-player-shell {
|
||||
width: 100%;
|
||||
height: 100vh;
|
||||
display: grid;
|
||||
grid-template-columns: 112px 1fr;
|
||||
grid-template-rows: auto auto;
|
||||
gap: 10px;
|
||||
padding: 12px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--bg-app);
|
||||
color: var(--text-primary);
|
||||
overflow: hidden;
|
||||
user-select: none;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
}
|
||||
|
||||
/* ── Custom in-page titlebar (Linux + Windows; macOS keeps the native one) ── */
|
||||
.mini-player__titlebar {
|
||||
flex-shrink: 0;
|
||||
height: 26px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
padding: 0 4px 0 10px;
|
||||
background: color-mix(in srgb, var(--bg-app) 85%, var(--bg-card) 15%);
|
||||
border-bottom: 1px solid var(--border-subtle);
|
||||
}
|
||||
.mini-player__titlebar-title {
|
||||
flex: 1;
|
||||
font-size: 11px;
|
||||
font-weight: 500;
|
||||
color: var(--text-muted);
|
||||
white-space: nowrap;
|
||||
overflow: hidden;
|
||||
text-overflow: ellipsis;
|
||||
letter-spacing: 0.02em;
|
||||
}
|
||||
.mini-player__titlebar-btn {
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
display: inline-flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
border: none;
|
||||
background: transparent;
|
||||
color: var(--text-muted);
|
||||
border-radius: 4px;
|
||||
cursor: pointer;
|
||||
transition: background 0.12s, color 0.12s;
|
||||
}
|
||||
.mini-player__titlebar-btn:hover {
|
||||
background: var(--bg-hover);
|
||||
color: var(--text-primary);
|
||||
}
|
||||
.mini-player__titlebar-btn--active {
|
||||
color: var(--accent);
|
||||
}
|
||||
.mini-player__titlebar-btn--close:hover {
|
||||
background: var(--danger);
|
||||
color: var(--ctp-base);
|
||||
}
|
||||
|
||||
.mini-player {
|
||||
flex: 1;
|
||||
display: grid;
|
||||
grid-template-columns: 84px 1fr;
|
||||
grid-template-rows: 84px auto;
|
||||
gap: 8px 10px;
|
||||
padding: 10px 12px;
|
||||
overflow: hidden;
|
||||
box-sizing: border-box;
|
||||
min-height: 0;
|
||||
}
|
||||
|
||||
.mini-player--queue-open {
|
||||
grid-template-rows: auto auto 1fr;
|
||||
grid-template-rows: 84px auto 1fr;
|
||||
}
|
||||
|
||||
.mini-player__art {
|
||||
grid-row: 1 / span 2;
|
||||
grid-column: 1;
|
||||
grid-row: 1;
|
||||
aspect-ratio: 1;
|
||||
width: 112px;
|
||||
height: 112px;
|
||||
width: 84px;
|
||||
height: 84px;
|
||||
background: var(--bg-card);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
@@ -9097,10 +9154,13 @@ html.no-compositing .fsr-lyric-line.fsrl-active .fsr-lyric-word.active {
|
||||
}
|
||||
|
||||
.mini-player__body {
|
||||
grid-column: 2;
|
||||
grid-row: 1;
|
||||
padding: 0 2px;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
justify-content: space-between;
|
||||
gap: 4px;
|
||||
min-width: 0;
|
||||
}
|
||||
|
||||
@@ -9130,7 +9190,6 @@ html.no-compositing .fsr-lyric-line.fsrl-active .fsr-lyric-word.active {
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
gap: 10px;
|
||||
margin-top: 2px;
|
||||
}
|
||||
.mini-player__btn {
|
||||
display: flex;
|
||||
@@ -9160,6 +9219,8 @@ html.no-compositing .fsr-lyric-line.fsrl-active .fsr-lyric-word.active {
|
||||
}
|
||||
|
||||
.mini-player__progress {
|
||||
grid-column: 1 / -1;
|
||||
grid-row: 2;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
@@ -9183,12 +9244,6 @@ html.no-compositing .fsr-lyric-line.fsrl-active .fsr-lyric-word.active {
|
||||
transition: width 0.25s linear;
|
||||
}
|
||||
|
||||
.mini-player__toolbar {
|
||||
grid-column: 2;
|
||||
display: flex;
|
||||
gap: 4px;
|
||||
justify-content: flex-end;
|
||||
}
|
||||
|
||||
.mini-queue-wrap {
|
||||
grid-column: 1 / -1;
|
||||
|
||||
Reference in New Issue
Block a user