mirror of
https://github.com/bitwarden/ios.git
synced 2025-12-11 23:33:36 -06:00
29 lines
990 B
Swift
29 lines
990 B
Swift
import Foundation
|
|
|
|
class BWStateViewModel: ObservableObject {
|
|
@Published var text: String
|
|
@Published var isLoading: Bool = false
|
|
|
|
init(_ state: BWState, _ defaultText: String?) {
|
|
switch state {
|
|
case .needLogin:
|
|
text = "LogInToBitwardenOnYourIPhoneToViewVerificationCodes"
|
|
// case .needUnlock:
|
|
// text = "UnlockBitwardenOnYourIPhoneToViewVerificationCodes"
|
|
case .needPremium:
|
|
text = "ToViewVerificationCodesUpgradeToPremium"
|
|
case .needSetup:
|
|
text = "SetUpBitwardenToViewItemsContainingVerificationCodes"
|
|
case .syncing:
|
|
text = "SyncingItemsContainingVerificationCodes"
|
|
isLoading = true
|
|
case .need2FAItem:
|
|
text = "Add2FactorAutenticationToAnItemToViewVerificationCodes"
|
|
case .needDeviceOwnerAuth:
|
|
text = "SetUpAppleWatchPasscodeInOrderToUseBitwarden"
|
|
default:
|
|
text = defaultText ?? ""
|
|
}
|
|
}
|
|
}
|