mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
@@ -27,9 +27,7 @@ struct SettingsScreen: View {
|
||||
Form {
|
||||
userSection
|
||||
|
||||
if context.viewState.showSessionVerificationSection {
|
||||
sessionVerificationSection
|
||||
}
|
||||
accountSecuritySection
|
||||
|
||||
mainSection
|
||||
|
||||
@@ -86,11 +84,22 @@ struct SettingsScreen: View {
|
||||
}
|
||||
}
|
||||
|
||||
private var sessionVerificationSection: some View {
|
||||
Section {
|
||||
ListRow(label: .default(title: L10n.actionCompleteVerification,
|
||||
systemIcon: .checkmarkShield),
|
||||
kind: .button { context.send(viewAction: .sessionVerification) })
|
||||
@ViewBuilder
|
||||
private var accountSecuritySection: some View {
|
||||
if !context.viewState.isSessionVerified || context.viewState.chatBackupEnabled {
|
||||
Section {
|
||||
if !context.viewState.isSessionVerified {
|
||||
ListRow(label: .default(title: L10n.actionCompleteVerification,
|
||||
systemIcon: .checkmarkShield),
|
||||
kind: .button { context.send(viewAction: .sessionVerification) })
|
||||
} else if context.viewState.chatBackupEnabled {
|
||||
ListRow(label: .default(title: L10n.commonChatBackup,
|
||||
icon: Image(asset: Asset.Images.secureBackupIcon)),
|
||||
details: context.viewState.showSecureBackupBadge ? .icon(secureBackupBadge) : nil,
|
||||
kind: .navigationLink { context.send(viewAction: .secureBackup) })
|
||||
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.secureBackup)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -222,6 +231,13 @@ struct SettingsScreen: View {
|
||||
.accessibilityIdentifier(A11yIdentifiers.settingsScreen.done)
|
||||
}
|
||||
}
|
||||
|
||||
@ViewBuilder
|
||||
private var secureBackupBadge: some View {
|
||||
if context.viewState.showSecureBackupBadge {
|
||||
BadgeView(size: 10)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private extension TimelineStyle {
|
||||
|
||||
Reference in New Issue
Block a user