User fields
This commit is contained in:
parent
61a4eac635
commit
2c0523639b
|
@ -191,6 +191,11 @@ struct ProfileView: View {
|
||||||
.multilineTextAlignment(.leading)
|
.multilineTextAlignment(.leading)
|
||||||
.padding(.vertical, 5)
|
.padding(.vertical, 5)
|
||||||
|
|
||||||
|
if account.fields.count > 0 {
|
||||||
|
fields
|
||||||
|
.padding(.vertical)
|
||||||
|
}
|
||||||
|
|
||||||
let followCount = (account.followersCount ?? 0 - (initialFollowing ? 1 : 0)) + (isFollowing ? 1 : 0)
|
let followCount = (account.followersCount ?? 0 - (initialFollowing ? 1 : 0)) + (isFollowing ? 1 : 0)
|
||||||
Text("account.followers-\(followCount)")
|
Text("account.followers-\(followCount)")
|
||||||
.foregroundStyle(Color.gray)
|
.foregroundStyle(Color.gray)
|
||||||
|
@ -262,11 +267,34 @@ struct ProfileView: View {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// var fields: some View {
|
var fields: some View {
|
||||||
// VStack(alignment: .leading) {
|
VStack(alignment: .leading, spacing: 7.5) {
|
||||||
//
|
ForEach(account.fields) { field in
|
||||||
// }
|
HStack {
|
||||||
// }
|
if field.verifiedAt == nil {
|
||||||
|
Text(field.name)
|
||||||
|
.lineLimit(1)
|
||||||
|
} else {
|
||||||
|
Label(field.name, systemImage: "checkmark.seal.fill")
|
||||||
|
.lineLimit(1)
|
||||||
|
}
|
||||||
|
|
||||||
|
Spacer()
|
||||||
|
|
||||||
|
TextEmoji(field.value, emojis: account.emojis)
|
||||||
|
}
|
||||||
|
.onTapGesture {
|
||||||
|
if let url = URL(string: field.value.asRawText), UIApplication.shared.canOpenURL(url) {
|
||||||
|
HapticManager.playHaptics(haptics: Haptic.success)
|
||||||
|
UIApplication.shared.open(url)
|
||||||
|
} else {
|
||||||
|
HapticManager.playHaptics(haptics: Haptic.error)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
.foregroundStyle(field.verifiedAt == nil ? Color.gray : Color.green)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
var statusesList: some View {
|
var statusesList: some View {
|
||||||
LazyVStack {
|
LazyVStack {
|
||||||
|
|
Loading…
Reference in New Issue