From e369d2f4de2111453358edd014c4ea7a66e58fa5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Bruno=20Ryb=C3=A1rsky?= Date: Tue, 6 Feb 2024 21:09:33 +0100 Subject: [PATCH] Make first one silent --- assets/script.js | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/assets/script.js b/assets/script.js index a162963..fee1bf8 100644 --- a/assets/script.js +++ b/assets/script.js @@ -167,8 +167,8 @@ async function onPageLoad(){ await populateUserInfoFields(UserInfo); } if(document.getElementById("admin-settings")){ - await listActivationCodes(); - await listUsers(); + await listActivationCodes(true); + await listUsers(true); } } if(currentSite === "home" && currentPage === "account") { @@ -367,12 +367,12 @@ async function addActivationCodes() { }); } -async function listUsers() { +async function listUsers(silent=false) { const data = { action: "list_users", }; - doAction('/account', data, "User list retrieved Successfully!", "User list retrieval failed.").then((result) => { + doAction('/account', data, "User list retrieved Successfully!", "User list retrieval failed.", silent).then((result) => { if (result && result.Status === "Success") { displayList(result.Users, "userListTable", deleteUser); @@ -380,12 +380,12 @@ async function listUsers() { }); } -async function listActivationCodes() { +async function listActivationCodes(silent=false) { const data = { action: "list_activation_codes", }; - doAction('/account', data, "Activation code list retrieved Successfully!", "Activation code list retrieval failed.").then((result) => { + doAction('/account', data, "Activation code list retrieved Successfully!", "Activation code list retrieval failed.", silent).then((result) => { displayList(result.ActivationCodes, "codeListTable", deleteActivationCode); }); }