Lock the Link New Device flow to portrait and improve Cancel/Try Again handling. (#5094)

* Lock the LinkNewDeviceScreen to portrait.

* Add cancel buttons to the QR Code errors and handle cancel/startOver correctly.

* Use the shared QRCodeErrorView in the LinkNewDeviceScreen.

* Clarify the different QR Error/ErrorStates a bit more.

* Update snapshots.
This commit is contained in:
Doug
2026-02-12 11:21:24 +00:00
committed by GitHub
parent 6b93bbf558
commit 92a5fb395c
75 changed files with 303 additions and 193 deletions
@@ -14,7 +14,12 @@ enum LinkNewDeviceScreenViewModelAction {
}
struct LinkNewDeviceScreenViewState: BindableState {
enum Mode: Equatable { case loading, readyToLink(isGeneratingCode: Bool), notSupported }
enum Mode: Equatable {
case loading
case readyToLink(isGeneratingCode: Bool)
case error(QRCodeLoginState.ErrorState)
}
var mode: Mode = .loading
let showLinkDesktopComputerButton: Bool
@@ -23,5 +28,6 @@ struct LinkNewDeviceScreenViewState: BindableState {
enum LinkNewDeviceScreenViewAction {
case linkMobileDevice
case linkDesktopComputer
case errorAction(QRCodeErrorView.Action)
case dismiss
}