Start invitation; notification; add profile avatar in me

This commit is contained in:
2024-01-15 16:29:18 +01:00
parent 11392c22c4
commit cdb4dab47a
9 changed files with 300 additions and 35 deletions

View File

@ -1,4 +1,28 @@
function manage_popup(client) {
// timer in milliseconds
function sleep(ms) {
return new Promise(resolve => setTimeout(resolve, ms));
}
export {manage_popup}
async function create_popup(text = undefined, timer = undefined) {
if (text == undefined)
text = "notice undefined";
let popup = document.getElementById("popup");
popup.textContent = "Notice: " + text;
popup.style.opacity = 0.95;
popup.onclick = async () => {
popup.style.opacity = 0;
return ;
}
if (timer == undefined)
timer = 5000;
await sleep(timer);
popup.style.opacity = 0;
//popup.style.visibility = "hidden"
}
export {create_popup}