mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-03 15:26:40 +00:00
Various small UI tweaks for the new user details edit screen
This commit is contained in:
@@ -2,6 +2,8 @@
|
||||
"a11y_hide_password" = "Hide password";
|
||||
"a11y_notifications_mentions_only" = "Mentions only";
|
||||
"a11y_notifications_muted" = "Muted";
|
||||
"a11y_poll" = "Poll";
|
||||
"a11y_poll_end" = "Ended poll";
|
||||
"a11y_send_files" = "Send files";
|
||||
"a11y_show_password" = "Show password";
|
||||
"a11y_user_menu" = "User menu";
|
||||
@@ -274,6 +276,7 @@
|
||||
"screen_edit_profile_display_name_placeholder" = "Your display name";
|
||||
"screen_edit_profile_error" = "An unknown error was encountered and the information couldn't be changed.";
|
||||
"screen_edit_profile_error_title" = "Unable to update profile";
|
||||
"screen_edit_profile_title" = "Edit profile";
|
||||
"screen_edit_profile_updating_details" = "Updating profile…";
|
||||
"screen_invites_decline_chat_message" = "Are you sure you want to decline the invitation to join %1$@?";
|
||||
"screen_invites_decline_chat_title" = "Decline invite";
|
||||
|
||||
@@ -16,6 +16,10 @@ public enum L10n {
|
||||
public static var a11yNotificationsMentionsOnly: String { return L10n.tr("Localizable", "a11y_notifications_mentions_only") }
|
||||
/// Muted
|
||||
public static var a11yNotificationsMuted: String { return L10n.tr("Localizable", "a11y_notifications_muted") }
|
||||
/// Poll
|
||||
public static var a11yPoll: String { return L10n.tr("Localizable", "a11y_poll") }
|
||||
/// Ended poll
|
||||
public static var a11yPollEnd: String { return L10n.tr("Localizable", "a11y_poll_end") }
|
||||
/// Send files
|
||||
public static var a11ySendFiles: String { return L10n.tr("Localizable", "a11y_send_files") }
|
||||
/// Show password
|
||||
@@ -692,6 +696,8 @@ public enum L10n {
|
||||
public static var screenEditProfileError: String { return L10n.tr("Localizable", "screen_edit_profile_error") }
|
||||
/// Unable to update profile
|
||||
public static var screenEditProfileErrorTitle: String { return L10n.tr("Localizable", "screen_edit_profile_error_title") }
|
||||
/// Edit profile
|
||||
public static var screenEditProfileTitle: String { return L10n.tr("Localizable", "screen_edit_profile_title") }
|
||||
/// Updating profile…
|
||||
public static var screenEditProfileUpdatingDetails: String { return L10n.tr("Localizable", "screen_edit_profile_updating_details") }
|
||||
/// Are you sure you want to decline the invitation to join %1$@?
|
||||
|
||||
@@ -50,6 +50,7 @@ enum UserAvatarSizeOnScreen {
|
||||
case memberDetails
|
||||
case inviteUsers
|
||||
case readReceipt
|
||||
case editUserDetails
|
||||
|
||||
var value: CGFloat {
|
||||
switch self {
|
||||
@@ -60,7 +61,7 @@ enum UserAvatarSizeOnScreen {
|
||||
case .home:
|
||||
return 32
|
||||
case .settings:
|
||||
return 60
|
||||
return 52
|
||||
case .roomDetails:
|
||||
return 44
|
||||
case .startChat:
|
||||
@@ -69,6 +70,8 @@ enum UserAvatarSizeOnScreen {
|
||||
return 70
|
||||
case .inviteUsers:
|
||||
return 56
|
||||
case .editUserDetails:
|
||||
return 96
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
+12
-2
@@ -23,11 +23,21 @@ struct UserDetailsEditScreen: View {
|
||||
|
||||
var body: some View {
|
||||
Form {
|
||||
avatar
|
||||
Section {
|
||||
avatar
|
||||
} footer: {
|
||||
Text(context.viewState.userID)
|
||||
.frame(maxWidth: .infinity)
|
||||
.font(.compound.bodyLG)
|
||||
.foregroundColor(.compound.textPrimary)
|
||||
.padding(.bottom, 16)
|
||||
}
|
||||
|
||||
nameSection
|
||||
}
|
||||
.compoundList()
|
||||
.scrollDismissesKeyboard(.immediately)
|
||||
.navigationTitle(L10n.screenEditProfileTitle)
|
||||
.navigationBarTitleDisplayMode(.inline)
|
||||
.toolbar { toolbar }
|
||||
}
|
||||
@@ -53,7 +63,7 @@ struct UserDetailsEditScreen: View {
|
||||
url: context.viewState.selectedAvatarURL,
|
||||
name: context.viewState.currentDisplayName,
|
||||
contentID: context.viewState.userID,
|
||||
avatarSize: .user(on: .memberDetails),
|
||||
avatarSize: .user(on: .editUserDetails),
|
||||
imageProvider: context.imageProvider)
|
||||
.overlay(alignment: .bottomTrailing) {
|
||||
avatarOverlayIcon
|
||||
|
||||
Reference in New Issue
Block a user