Tweaked the UI in the ProfileView view for the Profile module.

This commit is contained in:
Javier Cicchelli 2022-12-15 02:29:59 +01:00
parent 6286086d2c
commit 1e513e688c

View File

@ -47,37 +47,40 @@ public struct ProfileView: View {
}
.listRowBackground(Color.clear)
ProfileSection(
header: "profile.sections.names.header.text",
items: [
.init(
key: "profile.sections.names.label.first_name.text",
value: stringAdapter(value: user?.profile.firstName)
),
.init(
key: "profile.sections.names.label.last_name.text",
value: stringAdapter(value: user?.profile.lastName)
)
]
)
ProfileSection(
header: "profile.sections.root_info.header.text",
items: [
.init(
key: "profile.sections.root_info.label.identifier.text",
value: stringAdapter(value: user?.rootFolder.id)
),
.init(
key: "profile.sections.root_info.label.name.text",
value: stringAdapter(value: user?.rootFolder.name)
),
.init(
key: "profile.sections.root_info.label.last_modified.text",
value: dateAdapter(value: user?.rootFolder.lastModifiedAt)
)
]
)
Group {
ProfileSection(
header: "profile.sections.names.header.text",
items: [
.init(
key: "profile.sections.names.label.first_name.text",
value: stringAdapter(value: user?.profile.firstName)
),
.init(
key: "profile.sections.names.label.last_name.text",
value: stringAdapter(value: user?.profile.lastName)
)
]
)
ProfileSection(
header: "profile.sections.root_info.header.text",
items: [
.init(
key: "profile.sections.root_info.label.identifier.text",
value: stringAdapter(value: user?.rootFolder.id)
),
.init(
key: "profile.sections.root_info.label.name.text",
value: stringAdapter(value: user?.rootFolder.name)
),
.init(
key: "profile.sections.root_info.label.last_modified.text",
value: dateAdapter(value: user?.rootFolder.lastModifiedAt)
)
]
)
}
.listRowBackground(Color.secondary.colorInvert())
Section {
Button {
@ -91,14 +94,14 @@ public struct ProfileView: View {
.foregroundColor(.primary)
.frame(maxWidth: .infinity)
}
.tint(.orange)
.tint(.red)
.controlSize(.large)
.buttonStyle(.borderedProminent)
.buttonBorderShape(.roundedRectangle(radius: 8))
.controlSize(.large)
}
.listRowBackground(Color.clear)
}
.background(Color.red)
.background(Color.primary.colorInvert())
}
}