iOS: Duo unfolded layout with right-edge tab rail, stems+queue deck and swap sides
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
1 parent
f4af7b6cf8
commit
08f7af9421
4 files changed
+138
-14
No files matched your search
@@ -53,6 +53,8 @@ final class Ui {
|
||||
}
|
||||
/// True while an unfolded iPhone Duo shows Now Playing docked beside the library.
|
||||
private(set) var split = false
|
||||
/// Split only: the side opposite Now Playing shows the stems and queue (true) or the selected tab.
|
||||
var deck = true
|
||||
let overlays: Overlays
|
||||
|
||||
init(overlays: Overlays) { self.overlays = overlays }
|
||||
@@ -67,6 +69,7 @@ final class Ui {
|
||||
|
||||
/// Tapping the selected tab again pops it to its root.
|
||||
func selectTab(_ t: Tab) {
|
||||
if split && deck { deck = false; tab = t; return }
|
||||
if t == tab { paths[t] = [] } else { tab = t }
|
||||
}
|
||||
|
||||
@@ -89,6 +92,9 @@ final class Ui {
|
||||
/// Docked Now Playing is already on screen, so there's nothing to open while split.
|
||||
func openNowPlaying() { if !split { nowPlayingOpen = true } }
|
||||
|
||||
/// Split only: brings the stems and queue back beside Now Playing.
|
||||
func showDeck() { deck = true }
|
||||
|
||||
func setSplit(_ on: Bool) {
|
||||
guard on != split else { return }
|
||||
split = on
|
||||
@@ -98,6 +104,7 @@ final class Ui {
|
||||
/// Switches to the Library tab and pushes [r] there.
|
||||
func showInLibrary(_ r: Route) {
|
||||
nowPlayingOpen = false
|
||||
deck = false
|
||||
let t = home
|
||||
tab = t
|
||||
paths[t, default: []].append(r)
|
||||
@@ -106,6 +113,7 @@ final class Ui {
|
||||
/// Switches to Settings and opens [r] (the Equalizer) there.
|
||||
func showInSettings(_ r: Route) {
|
||||
nowPlayingOpen = false
|
||||
deck = false
|
||||
tab = .Settings
|
||||
if paths[.Settings]?.last != r { paths[.Settings, default: []].append(r) }
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user