mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-05 04:12:25 +00:00
Improve npub rendering for profile updates
This commit is contained in:
1 parent
f5cb3c4997
commit
6908c6d7f3
2 files changed
+55
-21
No files matched your search
@@ -262,8 +262,18 @@ export class SimilarContentCard {
|
||||
this.authorNpubEl.removeAttribute("title");
|
||||
}
|
||||
|
||||
if (this.identity.pubkey) {
|
||||
this.authorNpubEl.dataset.pubkey = this.identity.pubkey;
|
||||
if (this.identity.npub) {
|
||||
this.authorNpubEl.dataset.npub = this.identity.npub;
|
||||
} else if (this.authorNpubEl.dataset?.npub) {
|
||||
delete this.authorNpubEl.dataset.npub;
|
||||
}
|
||||
|
||||
const resolvedPubkey =
|
||||
this.identity.pubkey ||
|
||||
(typeof this.video?.pubkey === "string" ? this.video.pubkey.trim() : "");
|
||||
|
||||
if (resolvedPubkey) {
|
||||
this.authorNpubEl.dataset.pubkey = resolvedPubkey;
|
||||
} else if (this.authorNpubEl.dataset?.pubkey) {
|
||||
delete this.authorNpubEl.dataset.pubkey;
|
||||
}
|
||||
|
||||
Reference in new issue
Block a user