Fix TOTP unlock loading presentation
This commit is contained in:
@@ -622,13 +622,6 @@ private final class ShellViewController: UITableViewController, MobileTabRoot {
|
|||||||
)
|
)
|
||||||
navigationItem.rightBarButtonItem?.accessibilityLabel = "Refresh remote status"
|
navigationItem.rightBarButtonItem?.accessibilityLabel = "Refresh remote status"
|
||||||
navigationItem.rightBarButtonItem?.isEnabled = !isHomeWorking
|
navigationItem.rightBarButtonItem?.isEnabled = !isHomeWorking
|
||||||
} else if page.state == .ready, shellTab == .preferences {
|
|
||||||
navigationItem.rightBarButtonItem = UIBarButtonItem(
|
|
||||||
title: "Update Token",
|
|
||||||
style: .plain,
|
|
||||||
target: self,
|
|
||||||
action: #selector(tokenUpdateRequested)
|
|
||||||
)
|
|
||||||
} else {
|
} else {
|
||||||
navigationItem.rightBarButtonItem = nil
|
navigationItem.rightBarButtonItem = nil
|
||||||
}
|
}
|
||||||
@@ -655,10 +648,6 @@ private final class ShellViewController: UITableViewController, MobileTabRoot {
|
|||||||
navigationController?.pushViewController(SetupChoiceViewController(), animated: true)
|
navigationController?.pushViewController(SetupChoiceViewController(), animated: true)
|
||||||
}
|
}
|
||||||
|
|
||||||
@objc private func tokenUpdateRequested() {
|
|
||||||
navigationController?.pushViewController(TokenUpdateViewController(), animated: true)
|
|
||||||
}
|
|
||||||
|
|
||||||
@objc private func statusRefreshRequested() {
|
@objc private func statusRefreshRequested() {
|
||||||
runHome(.fetch)
|
runHome(.fetch)
|
||||||
}
|
}
|
||||||
@@ -1055,12 +1044,6 @@ private final class PreferencesViewController: UITableViewController, MobileTabR
|
|||||||
super.init(style: .insetGrouped)
|
super.init(style: .insetGrouped)
|
||||||
title = page.title
|
title = page.title
|
||||||
navigationItem.largeTitleDisplayMode = .always
|
navigationItem.largeTitleDisplayMode = .always
|
||||||
navigationItem.rightBarButtonItem = UIBarButtonItem(
|
|
||||||
title: "Update Token",
|
|
||||||
style: .plain,
|
|
||||||
target: self,
|
|
||||||
action: #selector(tokenUpdateRequested)
|
|
||||||
)
|
|
||||||
NotificationCenter.default.addObserver(
|
NotificationCenter.default.addObserver(
|
||||||
self,
|
self,
|
||||||
selector: #selector(authenticationDidChange),
|
selector: #selector(authenticationDidChange),
|
||||||
@@ -1697,14 +1680,6 @@ private final class PreferencesViewController: UITableViewController, MobileTabR
|
|||||||
watchPaired: watchSnapshot.isPaired,
|
watchPaired: watchSnapshot.isPaired,
|
||||||
watchAppInstalled: watchSnapshot.isWatchAppInstalled
|
watchAppInstalled: watchSnapshot.isWatchAppInstalled
|
||||||
)
|
)
|
||||||
navigationItem.rightBarButtonItem = preferences?.syncConfigured == true
|
|
||||||
? UIBarButtonItem(
|
|
||||||
title: "Update Token",
|
|
||||||
style: .plain,
|
|
||||||
target: self,
|
|
||||||
action: #selector(tokenUpdateRequested)
|
|
||||||
)
|
|
||||||
: nil
|
|
||||||
if let appearance = preferences?.appearance {
|
if let appearance = preferences?.appearance {
|
||||||
tabBarController?.overrideUserInterfaceStyle = switch appearance {
|
tabBarController?.overrideUserInterfaceStyle = switch appearance {
|
||||||
case .system: .unspecified
|
case .system: .unspecified
|
||||||
@@ -2985,6 +2960,9 @@ private final class TotpListViewController: UITableViewController, MobileTabRoot
|
|||||||
var configuration = UIContentUnavailableConfiguration.loading()
|
var configuration = UIContentUnavailableConfiguration.loading()
|
||||||
configuration.text = title
|
configuration.text = title
|
||||||
configuration.secondaryText = "Reading OTP metadata in secure storage."
|
configuration.secondaryText = "Reading OTP metadata in secure storage."
|
||||||
|
var background = UIBackgroundConfiguration.clear()
|
||||||
|
background.backgroundColor = .systemGroupedBackground
|
||||||
|
configuration.background = background
|
||||||
contentUnavailableConfiguration = configuration
|
contentUnavailableConfiguration = configuration
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user