Separate NIP-05 and username/display name onto their own lines.
Closes: https://github.com/damus-io/damus/pull/1534 Reviewed-by: William Casarin <jb55@jb55.com> Signed-off-by: William Casarin <jb55@jb55.com>
This commit is contained in:
committed by
William Casarin
parent
b18a0c573e
commit
fb8c470e9d
@@ -80,23 +80,25 @@ struct ProfileName: View {
|
|||||||
}
|
}
|
||||||
|
|
||||||
var body: some View {
|
var body: some View {
|
||||||
HStack(spacing: 2) {
|
VStack(alignment: .leading, spacing: 2) {
|
||||||
Text(verbatim: "\(prefix)\(name_choice)")
|
HStack(spacing: 2) {
|
||||||
.font(.body)
|
Text(verbatim: "\(prefix)\(name_choice)")
|
||||||
.fontWeight(prefix == "@" ? .none : .bold)
|
.font(.body)
|
||||||
|
.fontWeight(prefix == "@" ? .none : .bold)
|
||||||
|
if let friend = friend_type, current_nip05 == nil {
|
||||||
|
FriendIcon(friend: friend)
|
||||||
|
}
|
||||||
|
if onlyzapper {
|
||||||
|
Image("zap-hashtag")
|
||||||
|
.frame(width: 14, height: 14)
|
||||||
|
}
|
||||||
|
if let supporter {
|
||||||
|
SupporterBadge(percent: supporter)
|
||||||
|
}
|
||||||
|
}
|
||||||
if let nip05 = current_nip05 {
|
if let nip05 = current_nip05 {
|
||||||
NIP05Badge(nip05: nip05, pubkey: pubkey, contacts: damus_state.contacts, show_domain: show_nip5_domain, profiles: damus_state.profiles)
|
NIP05Badge(nip05: nip05, pubkey: pubkey, contacts: damus_state.contacts, show_domain: show_nip5_domain, profiles: damus_state.profiles)
|
||||||
}
|
}
|
||||||
if let friend = friend_type, current_nip05 == nil {
|
|
||||||
FriendIcon(friend: friend)
|
|
||||||
}
|
|
||||||
if onlyzapper {
|
|
||||||
Image("zap-hashtag")
|
|
||||||
.frame(width: 14, height: 14)
|
|
||||||
}
|
|
||||||
if let supporter {
|
|
||||||
SupporterBadge(percent: supporter)
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
.onReceive(handle_notify(.profile_updated)) { update in
|
.onReceive(handle_notify(.profile_updated)) { update in
|
||||||
if update.pubkey != pubkey {
|
if update.pubkey != pubkey {
|
||||||
|
|||||||
Reference in New Issue
Block a user