remade directory wathcer

This commit is contained in:
andrei-mihnea-cerbu
2025-02-04 21:37:48 +02:00
parent 0f37544668
commit 5a6fa296be
5 changed files with 62 additions and 72 deletions
+3 -2
View File
@@ -86,7 +86,8 @@ async function fetchUsersAndCreateCheckboxes() {
);
const usersInfo = await window.databaseAPI.getActiveUsers();
if (!usersInfo || usersInfo.length === 0) {
const filteredUsers = usersInfo.filter(user => user.id !== '');
if (!filteredUsers.length === 0) {
await window.uiAPI.showAlert('No active users found.');
clearInterval(fetchUsersInterval);
fetchUsersInterval = null;
@@ -109,7 +110,7 @@ async function fetchUsersAndCreateCheckboxes() {
}
const label = document.createElement('label');
label.innerHTML = `${user.user_info.name}`;
label.innerHTML = `${user.name}`;
label.insertBefore(checkbox, label.firstChild);
usersDiv.appendChild(label);