forked from olcxjas-softworks/LarpixClient
fix banner view
This commit is contained in:
parent
51951bd6ef
commit
a8c0ae8f18
4 changed files with 4 additions and 24 deletions
|
|
@ -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 = "";
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue