Device Manager: Verify session (#6832)

* Initial implementation
* Add verificationState to UserSessionInfo
* Listen for changes device changes in the service.
This commit is contained in:
Doug
2022-10-11 16:11:52 +01:00
committed by GitHub
parent 6c9a058b93
commit 6a0112aa95
33 changed files with 534 additions and 114 deletions
@@ -20,5 +20,18 @@ import SwiftUI
/// View data for DeviceAvatarView
struct DeviceAvatarViewData: Hashable {
let deviceType: DeviceType
let isVerified: Bool?
/// The current state of verification for the session.
let verificationState: UserSessionInfo.VerificationState
/// The name of the shield image to show for the device.
var verificationImageName: String {
switch verificationState {
case .verified:
return Asset.Images.userSessionVerified.name
case .unverified:
return Asset.Images.userSessionUnverified.name
case .unknown:
return Asset.Images.userSessionVerificationUnknown.name
}
}
}