Show verified URLs in account lists (#1364)

* Show verified URLs in account lists

This allows the user to quickly assess which account of multiple is the official
one, especially when searching for a person with multiple search results.
Fixes #1361

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Replace the verified urls text with a checkmark

This makes it easy for the user to directly see why the urls are listed.

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

* Swiftformat

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>

---------

Signed-off-by: Paul Schuetz <pa.schuetz@web.de>
This commit is contained in:
Paul Schuetz 2023-04-08 13:31:43 +02:00 committed by GitHub
parent 67d5c9648f
commit 7e5c4ed92a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 26 additions and 0 deletions

View File

@ -58,6 +58,32 @@ public struct AccountsListRow: View {
.environment(\.openURL, OpenURLAction { url in
routerPath.handle(url: url)
})
let fields = viewModel.account.fields.filter { $0.verifiedAt != nil }
if !fields.isEmpty {
Capsule()
.frame(height: 1)
.foregroundStyle(.regularMaterial)
.padding(.vertical, 5)
.padding(.horizontal)
ForEach(fields) { field in
HStack {
Image(systemName: "checkmark.seal")
.foregroundColor(.green)
EmojiTextApp(field.value, emojis: viewModel.account.emojis)
.font(.scaledFootnote)
.emojiSize(Font.scaledFootnoteFont.emojiSize)
.emojiBaselineOffset(Font.scaledFootnoteFont.emojiBaselineOffset)
.environment(\.openURL, OpenURLAction { url in
routerPath.handle(url: url)
})
}
.padding(.top, 5)
}
}
if isFollowRequest {
FollowRequestButtons(account: viewModel.account,
requestUpdated: requestUpdated)