mirror of
https://github.com/bitwarden/mobile.git
synced 2024-09-27 03:52:57 +02:00
27 lines
851 B
Swift
27 lines
851 B
Swift
|
import Foundation
|
||
|
|
||
|
class BWStateViewModel : ObservableObject{
|
||
|
@Published var text:String
|
||
|
@Published var isLoading:Bool = false
|
||
|
|
||
|
init(_ state: BWState){
|
||
|
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"
|
||
|
default:
|
||
|
text = ""
|
||
|
}
|
||
|
}
|
||
|
}
|