mirror of
https://github.com/yattee/yattee.git
synced 2025-12-03 22:58:16 +00:00
Use fullScreenCover for Settings and Accounts on tvOS
- Replace sheet presentation with fullScreenCover for Settings and Accounts views on tvOS - Add proper background color to Settings and Accounts screens on tvOS - Clean up trailing whitespace in HomeView 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
@@ -43,7 +43,7 @@ struct HomeView: View {
|
|||||||
AccentButton(imageSystemName: "ellipsis") {
|
AccentButton(imageSystemName: "ellipsis") {
|
||||||
NavigationModel.shared.presentingOpenVideos = true
|
NavigationModel.shared.presentingOpenVideos = true
|
||||||
}
|
}
|
||||||
.frame(maxWidth: 40)
|
.frame(maxWidth: 40)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
|
|||||||
@@ -3,6 +3,9 @@ import SwiftUI
|
|||||||
struct AccountsView: View {
|
struct AccountsView: View {
|
||||||
@StateObject private var model = AccountsViewModel()
|
@StateObject private var model = AccountsViewModel()
|
||||||
@Environment(\.presentationMode) private var presentationMode
|
@Environment(\.presentationMode) private var presentationMode
|
||||||
|
#if os(tvOS)
|
||||||
|
@Environment(\.colorScheme) private var colorScheme
|
||||||
|
#endif
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
@@ -28,6 +31,7 @@ struct AccountsView: View {
|
|||||||
}
|
}
|
||||||
#if os(tvOS)
|
#if os(tvOS)
|
||||||
.frame(maxWidth: 1000)
|
.frame(maxWidth: 1000)
|
||||||
|
.background(Color.background(scheme: colorScheme).ignoresSafeArea())
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -63,17 +63,29 @@ struct ContentView: View {
|
|||||||
WelcomeScreen()
|
WelcomeScreen()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
#if os(tvOS)
|
||||||
|
.fullScreenCover(isPresented: $navigation.presentingSettings) {
|
||||||
|
SettingsView()
|
||||||
|
}
|
||||||
|
#else
|
||||||
.background(
|
.background(
|
||||||
EmptyView().sheet(isPresented: $navigation.presentingSettings) {
|
EmptyView().sheet(isPresented: $navigation.presentingSettings) {
|
||||||
SettingsView()
|
SettingsView()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
#endif
|
||||||
.modifier(ImportSettingsSheetViewModifier(isPresented: $navigation.presentingSettingsImportSheet, settingsFile: $navigation.settingsImportURL))
|
.modifier(ImportSettingsSheetViewModifier(isPresented: $navigation.presentingSettingsImportSheet, settingsFile: $navigation.settingsImportURL))
|
||||||
|
#if os(tvOS)
|
||||||
|
.fullScreenCover(isPresented: $navigation.presentingAccounts) {
|
||||||
|
AccountsView()
|
||||||
|
}
|
||||||
|
#else
|
||||||
.background(
|
.background(
|
||||||
EmptyView().sheet(isPresented: $navigation.presentingAccounts) {
|
EmptyView().sheet(isPresented: $navigation.presentingAccounts) {
|
||||||
AccountsView()
|
AccountsView()
|
||||||
}
|
}
|
||||||
)
|
)
|
||||||
|
#endif
|
||||||
.background(
|
.background(
|
||||||
EmptyView().sheet(isPresented: $navigation.presentingHomeSettings) {
|
EmptyView().sheet(isPresented: $navigation.presentingHomeSettings) {
|
||||||
#if os(macOS)
|
#if os(macOS)
|
||||||
|
|||||||
@@ -134,6 +134,9 @@ struct SettingsView: View {
|
|||||||
settingsList
|
settingsList
|
||||||
.navigationTitle("Settings")
|
.navigationTitle("Settings")
|
||||||
}
|
}
|
||||||
|
#if os(tvOS)
|
||||||
|
.background(Color.background(scheme: colorScheme).ignoresSafeArea())
|
||||||
|
#endif
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user