diff --git a/Yattee/Views/Onboarding/OnboardingSheetView.swift b/Yattee/Views/Onboarding/OnboardingSheetView.swift index 87463425..ad0d8940 100644 --- a/Yattee/Views/Onboarding/OnboardingSheetView.swift +++ b/Yattee/Views/Onboarding/OnboardingSheetView.swift @@ -63,7 +63,19 @@ struct OnboardingSheetView: View { #elseif os(iOS) .tabViewStyle(.page(indexDisplayMode: .never)) #endif + #if os(tvOS) + .background(Color.black.ignoresSafeArea()) + .overlay(alignment: .topLeading) { + Button(String(localized: "onboarding.skip")) { + completeOnboarding() + } + .buttonStyle(.plain) + .foregroundStyle(.secondary) + .padding(40) + } + #endif .interactiveDismissDisabled() + #if !os(tvOS) .toolbar { ToolbarItem(placement: .cancellationAction) { Button(String(localized: "onboarding.skip")) { @@ -71,6 +83,7 @@ struct OnboardingSheetView: View { } } } + #endif .task { guard !hasCheckedLegacyData else { return } hasCheckedLegacyData = true diff --git a/Yattee/Views/Onboarding/OnboardingTitleScreen.swift b/Yattee/Views/Onboarding/OnboardingTitleScreen.swift index da849b3f..8d1b63fd 100644 --- a/Yattee/Views/Onboarding/OnboardingTitleScreen.swift +++ b/Yattee/Views/Onboarding/OnboardingTitleScreen.swift @@ -10,6 +10,10 @@ import SwiftUI struct OnboardingTitleScreen: View { let onContinue: () -> Void + #if os(tvOS) + @FocusState private var continueButtonFocused: Bool + #endif + var body: some View { GeometryReader { geometry in let iconSize = min(max(geometry.size.height * 0.13, 60), 140) @@ -67,15 +71,26 @@ struct OnboardingTitleScreen: View { .font(.headline) .frame(maxWidth: .infinity) .padding() + #if os(tvOS) + .background(Color.accentColor.opacity(0.2)) + #else .background(Color.accentColor) .foregroundStyle(.white) + #endif .clipShape(RoundedRectangle(cornerRadius: 12)) } + #if os(tvOS) + .buttonStyle(.card) + .focused($continueButtonFocused) + #endif .padding(.horizontal) .padding(.bottom) } .frame(maxWidth: .infinity, maxHeight: .infinity) .padding() + #if os(tvOS) + .onAppear { continueButtonFocused = true } + #endif } } }