forked from jellyfin/Swiftfin
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[tvOS] Add pin prompt to sign-in screen (jellyfin#1383)
* Add pin prompt to sign-in screen * Bring over security views from iOS * silence tvOS 17 warnings * Add user profile and security views to routing * Changes * revert and remove commented code * cleanup * CodeFactor fixes * Joe's Suggestions: - Move UserProfileSettings to their own Coordinator - Make Views Modal to better reflect existing items - Fix CustomizeSettingsCoordinator (This is on me!) - Change PINs to use SecureField - Move all Settings View to use SplitFormWindowView to mirror existing Settings - Use user profile image for SplitFormWindowView Icon - Change Profile Security to use LearnMoreModal - Use suggestion from https://forums.developer.apple.com/forums/thread/739545 - Tag Alert > TextFields with TODO so we can check this on tvOS 18 * Fix PIN for https://forums.developer.apple.com/forums/thread/739545 on SelectUserView * Fix Build Issue. * use user --------- Co-authored-by: chickdan <=> Co-authored-by: Joe <[email protected]> Co-authored-by: Ethan Pippin <[email protected]>
- Loading branch information
1 parent
a13f604
commit f9ebebe
Showing
11 changed files
with
534 additions
and
14 deletions.
There are no files selected for viewing
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
// | ||
// Swiftfin is subject to the terms of the Mozilla Public | ||
// License, v2.0. If a copy of the MPL was not distributed with this | ||
// file, you can obtain one at https://mozilla.org/MPL/2.0/. | ||
// | ||
// Copyright (c) 2025 Jellyfin & Jellyfin Contributors | ||
// | ||
|
||
import Stinsen | ||
import SwiftUI | ||
|
||
final class UserProfileSettingsCoordinator: NavigationCoordinatable { | ||
|
||
// MARK: - Navigation Components | ||
|
||
let stack = Stinsen.NavigationStack(initial: \UserProfileSettingsCoordinator.start) | ||
|
||
@Root | ||
var start = makeStart | ||
|
||
// MARK: - Route to User Profile Security | ||
|
||
@Route(.modal) | ||
var localSecurity = makeLocalSecurity | ||
|
||
// MARK: - Observed Object | ||
|
||
@ObservedObject | ||
var viewModel: SettingsViewModel | ||
|
||
// MARK: - Initializer | ||
|
||
init(viewModel: SettingsViewModel) { | ||
self.viewModel = viewModel | ||
} | ||
|
||
// MARK: - User Security View | ||
|
||
func makeLocalSecurity() -> NavigationViewCoordinator<BasicNavigationViewCoordinator> { | ||
NavigationViewCoordinator( | ||
BasicNavigationViewCoordinator { | ||
UserLocalSecurityView() | ||
} | ||
) | ||
} | ||
|
||
@ViewBuilder | ||
func makeStart() -> some View { | ||
UserProfileSettingsView(viewModel: viewModel) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.