diff --git a/js/admin.js b/js/admin.js index 10bcdd84..99546419 100644 --- a/js/admin.js +++ b/js/admin.js @@ -212,7 +212,6 @@ export const admin = (() => { } if (!session.isAdmin() || (JSON.parse(atob((session.getToken() ?? '.').split('.')[1])).exp ?? 0) < ((new Date()).getTime() / 1000)) { - comment.renderLoading(); (new bootstrap.Modal('#loginModal')).show(); return; } diff --git a/js/comment.js b/js/comment.js index ac26ad91..26577a4a 100644 --- a/js/comment.js +++ b/js/comment.js @@ -124,6 +124,12 @@ export const comment = (() => { document.getElementById(`inner-${id}`).remove(); document.getElementById(`content-${id}`).innerHTML = card.convertMarkdownToHTML(util.escapeHtml(form.value)); + const formPresence = document.getElementById('form-presence'); + if (presence) { + formPresence.value = isPresent ? "1" : "2"; + storage('information').set('presence', isPresent); + } + if (!presence || !badge) { return; } @@ -428,6 +434,5 @@ export const comment = (() => { update, comment, showOrHide, - renderLoading: card.renderLoading, } })(); \ No newline at end of file diff --git a/js/guest.js b/js/guest.js index 3e1f7430..9aa040ca 100644 --- a/js/guest.js +++ b/js/guest.js @@ -109,7 +109,6 @@ export const guest = (() => { }; const init = () => { - if (session.isAdmin()) { storage('user').clear(); storage('owns').clear();