mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-02 21:33:26 +00:00
Add support for homeserver capabilities to disable the UserDetailsEditScreen UI. (#5421)
Add support for homeserver capabilities to disable editing your user profile. Also updates editable avatar size/formatting to match the latest Figma at the same time.
This commit is contained in:
@@ -114,11 +114,10 @@ struct CreateRoomScreen: View {
|
||||
.resizable()
|
||||
.aspectRatio(contentMode: .fill)
|
||||
.scaledFrame(size: 70, relativeTo: .title)
|
||||
.clipShape(context.viewState.isSpace ? AnyShape(RoundedRectangle(cornerRadius: 16)) : AnyShape(Circle()))
|
||||
.avatarShape(context.viewState.isSpace ? .roundedRect : .circle, size: 70)
|
||||
.overlay(alignment: .bottomTrailing) {
|
||||
editAvatarBadge
|
||||
.scaledOffset(x: 12, y: 4, relativeTo: .title)
|
||||
.accessibilityHidden(true)
|
||||
EditAvatarBadge()
|
||||
.scaledOffset(x: 8, y: 0, relativeTo: .title)
|
||||
}
|
||||
} else {
|
||||
CompoundIcon(\.takePhoto, size: .medium, relativeTo: .title)
|
||||
@@ -153,23 +152,6 @@ struct CreateRoomScreen: View {
|
||||
}
|
||||
}
|
||||
|
||||
private var editAvatarBadge: some View {
|
||||
CompoundIcon(\.edit, size: .small, relativeTo: .body)
|
||||
.foregroundStyle(.compound.iconPrimary)
|
||||
.scaledPadding(5, relativeTo: .title)
|
||||
.background {
|
||||
Circle()
|
||||
.fill(Color.compound.bgCanvasDefault)
|
||||
.overlay {
|
||||
Circle()
|
||||
.inset(by: 0.5)
|
||||
.stroke(.compound.borderInteractiveSecondary, lineWidth: 1)
|
||||
}
|
||||
}
|
||||
.scaledPadding(3.5, relativeTo: .title)
|
||||
.background(.compound.bgSubtleSecondaryLevel0, in: Circle())
|
||||
}
|
||||
|
||||
private var topicSection: some View {
|
||||
Section {
|
||||
ListRow(label: .plain(title: L10n.screenCreateRoomTopicPlaceholder),
|
||||
|
||||
Reference in New Issue
Block a user