From 1e513e688ccfdb7e1b419c31233459874f093355 Mon Sep 17 00:00:00 2001 From: Javier Cicchelli Date: Thu, 15 Dec 2022 02:29:59 +0100 Subject: [PATCH] Tweaked the UI in the ProfileView view for the Profile module. --- .../Profile/UI/Views/ProfileView.swift | 71 ++++++++++--------- 1 file changed, 37 insertions(+), 34 deletions(-) diff --git a/Modules/Sources/Profile/UI/Views/ProfileView.swift b/Modules/Sources/Profile/UI/Views/ProfileView.swift index 1536a35..e508eb7 100644 --- a/Modules/Sources/Profile/UI/Views/ProfileView.swift +++ b/Modules/Sources/Profile/UI/Views/ProfileView.swift @@ -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()) } }