forked from olcxjas-softworks/LarpixClient
improved ui and added missing blahs
This commit is contained in:
parent
f957a081f3
commit
5c91c341a0
12 changed files with 168 additions and 44 deletions
|
|
@ -109,8 +109,6 @@
|
|||
//if fails continue loading encryption may be broken
|
||||
console.error(e);
|
||||
}
|
||||
await delay(600); //because we need to wair for animations
|
||||
await refreshDms();
|
||||
} else {
|
||||
showBlahNotification("error:auth.failed.redirect.to.login");
|
||||
await delay(2000);
|
||||
|
|
@ -126,14 +124,19 @@
|
|||
}
|
||||
}
|
||||
|
||||
async function refreshDms() {
|
||||
async function refreshDms(waittime = 0) {
|
||||
try {
|
||||
showAction("action.dm.fetch", "dmrefresh");
|
||||
await delay(waittime);
|
||||
if (window.cachedDms && typeof renderDms === 'function') {
|
||||
await renderDms(window.cachedDms);
|
||||
}
|
||||
let res = await fetchEncrypted("user/dm/list");
|
||||
clearAction("dmrefresh");
|
||||
window.cachedDms = res;
|
||||
if (typeof renderDms === 'function') {
|
||||
await renderDms(res);
|
||||
}
|
||||
clearAction("dmrefresh");
|
||||
}
|
||||
catch (e) {
|
||||
clearAction("dmrefresh");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue