mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-11-06 12:52:26 +00:00
update
This commit is contained in:
1 parent
000127f88c
commit
071d78dd6c
194 files changed
+28793
-3944
No files matched your search
@@ -1,5 +1,6 @@
|
||||
import { normalizeDesignSystemContext } from "../../designSystem.js";
|
||||
import { formatShortNpub } from "../../utils/formatters.js";
|
||||
import { sanitizeProfileMediaUrl } from "../../utils/profileMedia.js";
|
||||
|
||||
const DEFAULT_PROFILE_AVATAR = "assets/svg/default-profile.svg";
|
||||
|
||||
@@ -213,15 +214,26 @@ export class SimilarContentCard {
|
||||
continue;
|
||||
}
|
||||
const trimmed = entry.trim();
|
||||
if (trimmed) {
|
||||
return trimmed;
|
||||
if (!trimmed) {
|
||||
continue;
|
||||
}
|
||||
const sanitized = sanitizeProfileMediaUrl(trimmed);
|
||||
if (sanitized) {
|
||||
return sanitized;
|
||||
}
|
||||
}
|
||||
|
||||
return "";
|
||||
const fallback =
|
||||
typeof baseline.picture === "string" && baseline.picture.trim()
|
||||
? sanitizeProfileMediaUrl(baseline.picture) || baseline.picture.trim()
|
||||
: "";
|
||||
|
||||
return fallback;
|
||||
})();
|
||||
|
||||
return { name, npub, shortNpub, pubkey, picture };
|
||||
const resolvedPicture = picture || DEFAULT_PROFILE_AVATAR;
|
||||
|
||||
return { name, npub, shortNpub, pubkey, picture: resolvedPicture };
|
||||
}
|
||||
|
||||
applyIdentityToElements() {
|
||||
|
||||
Reference in new issue
Block a user