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:
Doug
2026-04-17 11:52:46 +01:00
committed by GitHub
parent c40454bbd3
commit eef4a2497a
46 changed files with 482 additions and 142 deletions
@@ -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),