fix banner view

This commit is contained in:
olcxja 2026-08-17 12:08:38 +02:00
commit a8c0ae8f18
4 changed files with 4 additions and 24 deletions

View file

@ -1891,17 +1891,7 @@ async function openProfile(accountId) {
let bannerUrl = `${url}/user/storage/public/getentry?id=${accountId}&e=larp.profile.banner`;
if (accountId === window.id && window.profileUpdateTimestamp) bannerUrl += `&t=${window.profileUpdateTimestamp}`;
let bannerHtml = `<img src="${bannerUrl}" class="profile-banner">`;
setTimeout(() => {
let bannerImg = document.querySelector("#profile-popup-inner .profile-banner");
if (bannerImg) {
bannerImg.addEventListener("error", function() {
let div = document.createElement("div");
div.className = "profile-banner";
this.parentNode.replaceChild(div, this);
});
}
}, 50);
let bannerHtml = `<img src="${bannerUrl}" class="profile-banner" onerror="this.outerHTML='<div class=\\'profile-banner\\'></div>'">`;
let bio = await fetchAsync(`${url}/user/storage/public/getentry?id=${accountId}&e=larp.profile.bio`);
if (bio.startsWith("error:")) bio = "";