release
This commit is contained in:
@ -322,6 +322,7 @@ async function generateAccountPage(name, cookie, admin) {
|
||||
modifiedHTML = modifiedHTML.replaceAll("{{ url_gen }}", `https://selenite.cc/u/${userData.username}`);
|
||||
modifiedHTML = modifiedHTML.replaceAll("{{ online_time }}", dayjs(userData.last_login).fromNow());
|
||||
modifiedHTML = modifiedHTML.replaceAll("{{ css_edit }}", (userData.badges ? userData.badges.length : 0) > 0 ? '<img src="/img/edit.svg" id="edit" />' : "");
|
||||
modifiedHTML = modifiedHTML.replaceAll("{{ staff_buttons }}", await isAdmin(cookie) ? "<a href='/admin'>admin panel</a>" : "");
|
||||
if(songData) {
|
||||
modifiedHTML = modifiedHTML.replaceAll("{{ song_title }}", sanitizeHtml(songData.name, allowNone));
|
||||
modifiedHTML = modifiedHTML.replaceAll("{{ song_artist }}", sanitizeHtml(songData.artist, allowNone));
|
||||
@ -329,6 +330,8 @@ async function generateAccountPage(name, cookie, admin) {
|
||||
modifiedHTML = modifiedHTML.replaceAll("{{ is_music }}", "true");
|
||||
} else {
|
||||
modifiedHTML = modifiedHTML.replaceAll("{{ is_music }}", "false");
|
||||
modifiedHTML = modifiedHTML.replaceAll("{{ song_title }}", "no song selected...");
|
||||
modifiedHTML = modifiedHTML.replaceAll("{{ song_artist }}", "");
|
||||
}
|
||||
let badges_html = "";
|
||||
|
||||
|
||||
Reference in New Issue
Block a user