This commit is contained in:
Arkadiusz Fal 2023-06-07 23:19:10 +02:00
parent 7e7225c59f
commit 91290d4736

View File

@ -32,23 +32,8 @@ struct HomeView: View {
var body: some View { var body: some View {
ScrollView(.vertical, showsIndicators: false) { ScrollView(.vertical, showsIndicators: false) {
VStack { VStack {
HStack { #if !os(tvOS)
#if os(tvOS) HStack {
Group {
if showOpenActionsInHome {
AccentButton(text: "Open Video", imageSystemName: "globe") {
NavigationModel.shared.presentingOpenVideos = true
}
}
AccentButton(text: "Locations", imageSystemName: "globe") {
NavigationModel.shared.presentingAccounts = true
}
AccentButton(text: "Settings", imageSystemName: "gear") {
NavigationModel.shared.presentingSettings = true
}
}
#else
if showOpenActionsInHome { if showOpenActionsInHome {
AccentButton(text: "Files", imageSystemName: "folder") { AccentButton(text: "Files", imageSystemName: "folder") {
NavigationModel.shared.presentingFileImporter = true NavigationModel.shared.presentingFileImporter = true
@ -61,16 +46,36 @@ struct HomeView: View {
} }
.frame(maxWidth: 40) .frame(maxWidth: 40)
} }
#endif }
} #endif
#if os(tvOS) #if os(tvOS)
HStack { HStack {
if showOpenActionsInHome {
Button {
NavigationModel.shared.presentingOpenVideos = true
} label: {
Label("Open Video", systemImage: "globe")
}
}
Button {
NavigationModel.shared.presentingAccounts = true
} label: {
Label("Locations", systemImage: "globe")
}
Spacer() Spacer()
HideWatchedButtons() HideWatchedButtons()
HideShortsButtons() HideShortsButtons()
HomeSettingsButton() Button {
NavigationModel.shared.presentingSettings = true
} label: {
Label("Settings", systemImage: "gear")
}
} }
#if os(tvOS)
.font(.caption)
.imageScale(.small)
#endif
#endif #endif
} }
.padding(.top, 15) .padding(.top, 15)