mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 16:10:20 +00:00
corrected copies and layout for the security and privacy screen
This commit is contained in:
+15
-13
@@ -19,10 +19,10 @@ struct SecurityAndPrivacyScreen: View {
|
||||
}
|
||||
|
||||
if context.desiredSettings.accessType != .inviteOnly, context.viewState.canEditAddress {
|
||||
visibilitySection
|
||||
if let canonicalAlias = context.viewState.canonicalAlias {
|
||||
addressSection(canonicalAlias: canonicalAlias)
|
||||
} else {
|
||||
publishingSection
|
||||
addAddressSection
|
||||
}
|
||||
}
|
||||
@@ -119,26 +119,28 @@ struct SecurityAndPrivacyScreen: View {
|
||||
}
|
||||
}
|
||||
|
||||
private var visibilitySection: some View {
|
||||
Section {
|
||||
EmptyView()
|
||||
} header: {
|
||||
Text(L10n.screenSecurityAndPrivacyRoomVisibilitySectionHeader)
|
||||
.compoundListSectionHeader()
|
||||
} footer: {
|
||||
Text(L10n.screenSecurityAndPrivacyRoomVisibilitySectionFooter)
|
||||
.compoundListSectionFooter()
|
||||
}
|
||||
}
|
||||
|
||||
private func addressSection(canonicalAlias: String) -> some View {
|
||||
Section {
|
||||
ListRow(label: .plain(title: canonicalAlias,
|
||||
description: L10n.screenSecurityAndPrivacyRoomAddressDescription),
|
||||
ListRow(label: .plain(title: canonicalAlias),
|
||||
kind: .navigationLink { context.send(viewAction: .editAddress) })
|
||||
roomDirectoryVisibilityRow
|
||||
} header: {
|
||||
Text(L10n.screenSecurityAndPrivacyRoomAddressSectionHeader)
|
||||
.compoundListSectionHeader()
|
||||
}
|
||||
}
|
||||
|
||||
private var publishingSection: some View {
|
||||
Section {
|
||||
EmptyView()
|
||||
} header: {
|
||||
Text(L10n.screenSecurityAndPrivacyRoomPublishingSectionHeader)
|
||||
.compoundListSectionHeader()
|
||||
} footer: {
|
||||
Text(L10n.screenSecurityAndPrivacyRoomPublishingSectionFooter)
|
||||
Text(L10n.screenSecurityAndPrivacyRoomAddressSectionFooter)
|
||||
.compoundListSectionFooter()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user