Changes
2 changed files (+53/-45)
-
-
@@ -213,7 +213,12 @@ var zones: [String: MockZone] = ["foo": MockZone( id: "foo", name: "Foo", playback: PlacKit.PLAC_TRANSPORT_PLAYBACK_PLAYING playback: PlacKit.PLAC_TRANSPORT_PLAYBACK_PLAYING, nowPlaying: MockNowPlaying( line1: "My great song", line2: "Some untrusted artist", seek: (5, 3 * 60 + 30) ) ), "bar": MockZone( id: "bar",
-
-
-
@@ -29,59 +29,62 @@ })?.value} var body: some View { VStack(spacing: 12) { VStack { if let line1 = zone?.nowPlaying?.twoline.0 { Text(line1) .font(.headline) .lineLimit(1) .frame(maxWidth: .infinity, alignment: .leading) HStack { HStack { Button { } label: { Label("Previous", systemImage: "backward.end.fill") } .font(.title3) if zone?.playback == PlacKit.PLAC_TRANSPORT_PLAYBACK_PLAYING { Button { } label: { Label("Pause", systemImage: "pause.fill") } .font(.title) } else { Text("Not Playing") .font(.subheadline) .foregroundStyle(.secondary) .lineLimit(1) .frame(maxWidth: .infinity, alignment: .leading) Button { } label: { Label("Play", systemImage: "play.fill") } .font(.title) } Button { } label: { Label("Next", systemImage: "forward.end.fill") } .font(.title3) } .labelStyle(.iconOnly) .buttonStyle(.borderless) Text(zone?.nowPlaying?.twoline.1 ?? " ") VStack { let line1 = zone?.nowPlaying?.twoline.0 ?? " " let line2 = zone?.nowPlaying?.twoline.1 ?? " " Text(line1) .font(.headline) .lineLimit(1) Text(line2) .font(.subheadline) .lineLimit(1) .frame(maxWidth: .infinity, alignment: .leading) } .frame(maxWidth: .infinity) HStack { HStack { if zone?.playback == PlacKit.PLAC_TRANSPORT_PLAYBACK_PLAYING { Button { } label: { Label("Pause", systemImage: "pause.fill") } } else { Button { } label: { Label("Play", systemImage: "play.fill") } if zones.count > 0 && zone_id != nil { Picker("Zone", selection: $zone_id) { ForEach( zones.values.sorted(by: { $0.id < $1.id }) ) { zone in Text(zone.name).tag(zone.id as String?) } } .labelStyle(.iconOnly) .buttonStyle(.borderless) .font(.system(size: 20)) Spacer() if zones.count > 0 && zone_id != nil { Picker("Zone", selection: $zone_id) { ForEach( zones.values.sorted(by: { $0.id < $1.id }) ) { zone in Text(zone.name).tag(zone.id as String?) } } .scaledToFit() } .scaledToFit() } } .padding([.horizontal], 10)
-