mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 12:07:55 +00:00
Design review for first public TestFlight (#492)
* 430 - Design review for first public TestFlight
This commit is contained in:
@@ -31,15 +31,18 @@ struct SettingsScreen: View {
|
||||
Form {
|
||||
userSection
|
||||
.listRowBackground(rowBackgroundColor)
|
||||
|
||||
analyticsSection
|
||||
|
||||
simplifiedSection
|
||||
.listRowBackground(rowBackgroundColor)
|
||||
|
||||
userInterfaceSection
|
||||
.listRowBackground(rowBackgroundColor)
|
||||
// analyticsSection
|
||||
// .listRowBackground(rowBackgroundColor)
|
||||
|
||||
logoutSection
|
||||
.listRowBackground(rowBackgroundColor)
|
||||
// userInterfaceSection
|
||||
// .listRowBackground(rowBackgroundColor)
|
||||
|
||||
// logoutSection
|
||||
// .listRowBackground(rowBackgroundColor)
|
||||
}
|
||||
.introspectTableView { tableView in
|
||||
tableView.backgroundColor = .clear
|
||||
@@ -59,7 +62,7 @@ struct SettingsScreen: View {
|
||||
}
|
||||
|
||||
private var backgroundColor: Color {
|
||||
.element.systemGray6
|
||||
.element.system
|
||||
}
|
||||
|
||||
private var rowBackgroundColor: Color {
|
||||
@@ -78,14 +81,40 @@ struct SettingsScreen: View {
|
||||
VStack(alignment: .leading, spacing: 4) {
|
||||
Text(context.viewState.userDisplayName ?? "")
|
||||
.font(.title3)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
Text(context.viewState.userID)
|
||||
.font(.subheadline)
|
||||
.foregroundColor(.element.primaryContent)
|
||||
}
|
||||
}
|
||||
.listRowInsets(listRowInsets)
|
||||
}
|
||||
}
|
||||
|
||||
private var simplifiedSection: some View {
|
||||
Section {
|
||||
SettingsDefaultRow(title: ElementL10n.sendBugReport,
|
||||
image: Image(systemName: "questionmark.circle")) {
|
||||
context.send(viewAction: .reportBug)
|
||||
}
|
||||
.accessibilityIdentifier("reportBugButton")
|
||||
|
||||
SettingsDefaultRow(title: ElementL10n.actionSignOut,
|
||||
image: Image(systemName: "rectangle.portrait.and.arrow.right")) {
|
||||
showingLogoutConfirmation = true
|
||||
}
|
||||
.accessibilityIdentifier("logoutButton")
|
||||
.alert(ElementL10n.actionSignOut,
|
||||
isPresented: $showingLogoutConfirmation) {
|
||||
Button(ElementL10n.actionSignOut,
|
||||
role: .destructive,
|
||||
action: logout)
|
||||
} message: {
|
||||
Text(ElementL10n.actionSignOutConfirmationSimple)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private var analyticsSection: some View {
|
||||
Section {
|
||||
Button { context.send(viewAction: .reportBug) } label: {
|
||||
@@ -157,13 +186,8 @@ struct SettingsScreen: View {
|
||||
}
|
||||
|
||||
private var closeButton: some View {
|
||||
Button(action: close) {
|
||||
Image(systemName: "xmark")
|
||||
.font(.title3.bold())
|
||||
.foregroundColor(.element.secondaryContent)
|
||||
.padding(4)
|
||||
}
|
||||
.accessibilityIdentifier("closeButton")
|
||||
Button(ElementL10n.actionCancel, action: close)
|
||||
.accessibilityIdentifier("closeButton")
|
||||
}
|
||||
|
||||
private func close() {
|
||||
|
||||
Reference in New Issue
Block a user