fix(npb-classic): "+" opens the grouped add flyout like the other layouts
Classic NPB's "+" fired a one-click add-to-playlist; now it opens the same grouped add menu (library / playlist / queue / play-next / mixtape / collection) as New and Large. Classic keeps its inline favorite toggle next to it so the favorite state stays visible. cc
This commit is contained in:
1 file changed
+8
-18
@@ -4,9 +4,9 @@
|
|||||||
// without duplicating popups.
|
// without duplicating popups.
|
||||||
//
|
//
|
||||||
// `play-circle` = New filled disc vs Classic plain glyph.
|
// `play-circle` = New filled disc vs Classic plain glyph.
|
||||||
// `classic-actions` = New keeps the grouped "+" add menu; Classic swaps it for
|
// `classic-actions` = both New and Classic use the grouped "+" add flyout;
|
||||||
// an inline one-click add-to-playlist + a favorite toggle
|
// Classic ADDS an inline favorite toggle (filled-heart state)
|
||||||
// (filled-heart state), 1:1 with the Tauri Classic transport.
|
// next to it so the favorite state stays visible at a glance.
|
||||||
// The track-info "(i)" lives in the song card, not here.
|
// The track-info "(i)" lives in the song card, not here.
|
||||||
//
|
//
|
||||||
// Reads NowPlayingState + QueueState directly; bubbles add/menu actions through
|
// Reads NowPlayingState + QueueState directly; bubbles add/menu actions through
|
||||||
@@ -111,8 +111,9 @@ export component TransportControls inherits HorizontalLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// New: "+" — grouped add menu.
|
// "+" — grouped add menu. Both New AND Classic open this same flyout (Classic
|
||||||
if !root.classic-actions: VerticalLayout {
|
// used to fire a one-click add-to-playlist; owner wants the flyout instead).
|
||||||
|
VerticalLayout {
|
||||||
alignment: center;
|
alignment: center;
|
||||||
Rectangle {
|
Rectangle {
|
||||||
width: 32px;
|
width: 32px;
|
||||||
@@ -181,19 +182,8 @@ export component TransportControls inherits HorizontalLayout {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Classic: inline add-to-playlist (one click) — 1:1 with Tauri.
|
// Classic keeps the inline favorite toggle (filled-heart state) next to the
|
||||||
if root.classic-actions: VerticalLayout {
|
// shared "+" flyout, so the favorite state stays visible at a glance.
|
||||||
alignment: center;
|
|
||||||
IconButton {
|
|
||||||
icon: @image-url("../assets/icons/plus.svg");
|
|
||||||
icon-size: 16px;
|
|
||||||
tooltip: @tr("Add to playlist");
|
|
||||||
enabled: NowPlayingState.has-track;
|
|
||||||
clicked => {
|
|
||||||
root.media-action("track", NowPlayingState.track-id, "add-to-playlist");
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
// Classic: inline favorite toggle with filled-heart state — 1:1 with Tauri.
|
// Classic: inline favorite toggle with filled-heart state — 1:1 with Tauri.
|
||||||
if root.classic-actions: VerticalLayout {
|
if root.classic-actions: VerticalLayout {
|
||||||
alignment: center;
|
alignment: center;
|
||||||
|
|||||||
Reference in new issue
Block a user