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:
parent
67d5c9648f
commit
7e5c4ed92a
|
@ -58,6 +58,32 @@ public struct AccountsListRow: View {
|
||||||
.environment(\.openURL, OpenURLAction { url in
|
.environment(\.openURL, OpenURLAction { url in
|
||||||
routerPath.handle(url: url)
|
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 {
|
if isFollowRequest {
|
||||||
FollowRequestButtons(account: viewModel.account,
|
FollowRequestButtons(account: viewModel.account,
|
||||||
requestUpdated: requestUpdated)
|
requestUpdated: requestUpdated)
|
||||||
|
|
Loading…
Reference in New Issue