tvOS 17+ SwiftUI client for the unofficial Yandex Music API: rotor stations with feedback, library, search, artist and album pages, synced lyrics, and system Now Playing integration.
28 lines
829 B
Swift
28 lines
829 B
Swift
import SwiftUI
|
|
|
|
struct RootView: View {
|
|
@EnvironmentObject private var player: PlayerController
|
|
@State private var selection = 0
|
|
|
|
var body: some View {
|
|
TabView(selection: $selection) {
|
|
MyWaveView()
|
|
.tabItem { Label("Волна", systemImage: "dot.radiowaves.left.and.right") }
|
|
.tag(0)
|
|
|
|
LikesView()
|
|
.tabItem { Label("Мне нравится", systemImage: "heart.fill") }
|
|
.tag(1)
|
|
|
|
NowPlayingView()
|
|
.tabItem { Label("Сейчас играет", systemImage: "play.circle.fill") }
|
|
.tag(2)
|
|
|
|
SearchView()
|
|
.tabItem { Image(systemName: "magnifyingglass") }
|
|
.tag(3)
|
|
}
|
|
.onPlayPauseCommand { player.togglePlayPause() }
|
|
}
|
|
}
|