]> git.giorgioravera.it Git - network-manager.git/commitdiff
Removed style inline
authorGiorgio Ravera <giorgio.ravera@gmail.com>
Thu, 6 Aug 2026 10:32:36 +0000 (12:32 +0200)
committerGiorgio Ravera <giorgio.ravera@gmail.com>
Thu, 6 Aug 2026 10:32:36 +0000 (12:32 +0200)
16 files changed:
backend/settings/config.py
frontend/aliases.html
frontend/css/layout.css
frontend/devices.html
frontend/hosts.html
frontend/js/aliases.js
frontend/js/common.js
frontend/js/devices.js
frontend/js/hosts.js
frontend/js/leases.js
frontend/js/logs.js
frontend/js/settings.js
frontend/leases.html
frontend/logs.html
frontend/modals.html
frontend/settings.html

index 49897ffc6a36a0e9428f087889b79cbb3b4902ed..303d10959dbb6714bbdce48f89252220daa4aebc 100644 (file)
@@ -4,7 +4,7 @@
 # APP
 # ---------------------------------------------------------
 APP_NAME = "network-manager"
-APP_VERSION = "0.0.2"
+APP_VERSION = "0.0.3"
 
 # ---------------------------------------------------------
 # Backup System
index 911160e7dd323c3160f41111af786608183ce77f..c694ce3ef36a234d118133e3eebf760a21cb3b2a 100644 (file)
     </div>
 
     <!-- Loader -->
-    <div id="loader" class="text-center my-3" style="display: none;">
+    <div id="loader" class="text-center my-3 d-none">
         <div class="spinner-border text-primary" role="status">
             <span class="visually-hidden" data-i18n="common.loading">Loading...</span>
         </div>
index cb61317022b631954b1329ef9aaf93e6cd331338..4dcfd4b90e8de83fdb4cc775870b7ae402d41a9a 100644 (file)
@@ -426,6 +426,19 @@ i.bi {
     cursor: pointer;
 }
 
+.modal-table-scroll {
+    max-height: 250px;
+    overflow-y: auto;
+}
+
+.backup-icon-column {
+    width: 40px;
+}
+
+.backup-actions-column {
+    width: 130px;
+}
+
 /* Sort arrows */
 .sort-arrow {
     display: inline-block;
index bbe6273c07257444bb295b9f57b2a3e4cd9af1a8..25d1999b8da32b920bc9af6da7e02bbc38fb2ec4 100644 (file)
     </div>
 
     <!-- Loader -->
-    <div id="loader" class="text-center my-3" style="display: none;">
+    <div id="loader" class="text-center my-3 d-none">
         <div class="spinner-border text-primary" role="status">
             <span class="visually-hidden" data-i18n="common.loading">Loading...</span>
         </div>
index 7e5696e2af531f9ffe31a3b69ec21d98d4fcce4d..1f180a591183da53d3782bd88392e19678528d3d 100644 (file)
     </div>
 
     <!-- Loader -->
-    <div id="loader" class="text-center my-3" style="display: none;">
+    <div id="loader" class="text-center my-3 d-none">
         <div class="spinner-border text-primary" role="status">
             <span class="visually-hidden" data-i18n="common.loading">Loading...</span>
         </div>
index ee1bcc557b8601f835ed84ec94aca11c0429159b..befaa51467fac9bd6c6ee151e1d74971274c85fb 100644 (file)
@@ -26,7 +26,7 @@ async function fetchAliases () {
 
     try {
         // Show loader
-        loader.style.display = "block";
+        loader.classList.remove("d-none");
 
         // Fetch aliases
         allAliases = await serviceGetAliases();
@@ -41,7 +41,8 @@ async function fetchAliases () {
         tableWrapper.classList.remove("d-none");
     }
     finally {
-        loader.style.display = "none";
+        // Hide loader
+        loader.classList.add("d-none");
     }
 }
 
@@ -72,7 +73,7 @@ function updateTable () {
         trEmpty.appendChild(tdEmpty);
         tbody.appendChild(trEmpty);
         // hide loader and show table
-        loader.style.display = "none";
+        loader.classList.add("d-none");
         tableWrapper.classList.remove("d-none");
         return;
     }
@@ -237,7 +238,7 @@ function updateTable () {
     }
 
     // hide loader and show table
-    loader.style.display = "none";
+    loader.classList.add("d-none");
     tableWrapper.classList.remove("d-none");
 
     // apply current search filter
index 97d5d34819ad303a8578452ab2f9bc15c9c3f26d..32acb05445c6fdaa880c099388ca4fda47445137 100644 (file)
@@ -396,9 +396,10 @@ export function showConfirmModal(message = "Are you sure?") {
         };
 
         const onConfirm = () => {
+            document.activeElement?.blur();
             cleanUp();
-            resolve(true);
             modal.hide();
+            resolve(true);
         };
 
         const onCancel = () => {
index c36c984bf63253c46d9e2c5954783917403f35c9..1fcd3f7c6c7bc32ffb944eb5c7759ac0644af03e 100644 (file)
@@ -26,7 +26,7 @@ async function fetchDevices () {
 
     try {
         // Show loader
-        loader.style.display = "block";
+        loader.classList.remove("d-none");
 
         // Fetch devices
         allDevices  = await serviceGetDevices();
@@ -41,7 +41,8 @@ async function fetchDevices () {
         tableWrapper.classList.remove("d-none");
     }
     finally {
-        loader.style.display = "none";
+        // Hide loader
+        loader.classList.add("d-none");
     }
 }
 
@@ -72,7 +73,7 @@ function updateTable () {
         trEmpty.appendChild(tdEmpty);
         tbody.appendChild(trEmpty);
         // hide loader and show table
-        loader.style.display = "none";
+        loader.classList.add("d-none");
         tableWrapper.classList.remove("d-none");
         return;
     }
@@ -296,7 +297,7 @@ function updateTable () {
     }
 
     // hide loader and show table
-    loader.style.display = "none";
+    loader.classList.add("d-none");
     tableWrapper.classList.remove("d-none");
 
     // apply current search filter
index 5dda214d47ef47480accd6ebe50e077ab28d89a0..345f372ffa4b8931d437504d70bc725a1d8f316b 100644 (file)
@@ -26,7 +26,7 @@ async function fetchHosts () {
 
     try {
         // Show loader
-        loader.style.display = "block";
+        loader.classList.remove("d-none");
 
         // Fetch hosts
         allHosts = await serviceGetHosts();
@@ -41,7 +41,8 @@ async function fetchHosts () {
         tableWrapper.classList.remove("d-none");
     }
     finally {
-        loader.style.display = "none";
+        // Hide loader
+        loader.classList.add("d-none");
     }
 }
 
@@ -72,7 +73,7 @@ function updateTable () {
         trEmpty.appendChild(tdEmpty);
         tbody.appendChild(trEmpty);
         // hide loader and show table
-        loader.style.display = "none";
+        loader.classList.add("d-none");
         tableWrapper.classList.remove("d-none");
         return;
     }
@@ -247,7 +248,7 @@ function updateTable () {
     }
 
     // hide loader and show table
-    loader.style.display = "none";
+    loader.classList.add("d-none");
     tableWrapper.classList.remove("d-none");
 
     // apply current search filter
index 8d3e5bc1616d217d928adb6af509d0daf95c6ec6..83f5bd61e73a8c1a552061cc5ae22dfc194564d3 100644 (file)
@@ -25,7 +25,7 @@ async function fetchLeases () {
 
     try {
         // Show loader
-        loader.style.display = "block";
+        loader.classList.remove("d-none");
 
         // Fetch leases
         allLeases = await serviceGetDHCPLeases();
@@ -40,7 +40,7 @@ async function fetchLeases () {
         tableWrapper.classList.remove("d-none");
     }
     finally {
-        loader.style.display = "none";
+        loader.classList.add("d-none");
     }
 }
 
@@ -71,7 +71,7 @@ function updateTable () {
         trEmpty.appendChild(tdEmpty);
         tbody.appendChild(trEmpty);
         // hide loader and show table
-        loader.style.display = "none";
+        loader.classList.add("d-none");
         tableWrapper.classList.remove("d-none");
         return;
     }
@@ -259,7 +259,7 @@ function updateTable () {
     }
 
     // hide loader and show table
-    loader.style.display = "none";
+    loader.classList.add("d-none");
     tableWrapper.classList.remove("d-none");
 
     // apply current search filter
index 0cad8e1eabcb89c4c8a468c653d18901dadf6458..89d2e45390faad347e8a70135be04ab78cff51ac 100644 (file)
@@ -131,7 +131,8 @@ async function loadLogs() {
     loading = true;
     const currentRequest = ++requestId;
 
-    loader.style.display = "block";
+    // Show loader
+    loader.classList.remove("d-none");
 
     try {
         const data = await serviceGetLogs(type);
@@ -145,7 +146,8 @@ async function loadLogs() {
     } catch (err) {
         logViewer.textContent = err.message || "Errore loading logs";
     } finally {
-        loader.style.display = "none";
+        // Hide loader
+        loader.classList.add("d-none");
         loading = false;
     }
 }
index 0fa8c44654c4b38d7466ae18735fff41873c92fb..aefb7ed56f7a7f1293e2d6017ac1290cc482c00f 100644 (file)
@@ -67,7 +67,7 @@ async function fetchConfigs () {
 
     try {
         // Show loader
-        loader.style.display = "block";
+        loader.classList.remove("d-none");
 
         // Fetch configs
         allConfigs = await serviceGetConfigs();
@@ -82,7 +82,8 @@ async function fetchConfigs () {
         tableWrapper.classList.remove("d-none");
     }
     finally {
-        loader.style.display = "none";
+        // Hide loader
+        loader.classList.add("d-none");
     }
 }
 
@@ -256,7 +257,7 @@ function updateTable (filter = null) {
         trEmpty.appendChild(tdEmpty);
         tbody.appendChild(trEmpty);
         // hide loader and show table
-        loader.style.display = "none";
+        loader.classList.add("d-none");
         tableWrapper.classList.remove("d-none");
         return;
     }
@@ -405,7 +406,7 @@ function updateTable (filter = null) {
     tbody.appendChild(frag);
 
     // hide loader and show table
-    loader.style.display = "none";
+    loader.classList.add("d-none");
     tableWrapper.classList.remove("d-none");
 }
 
index db2b2afb768fa9ef7636ca96c2f249be34d8f1ba..cbaee0b2140212d5f1305d0621e295b1c134c499 100644 (file)
     </div>
 
     <!-- Loader -->
-    <div id="loader" class="text-center my-3" style="display: none;">
+    <div id="loader" class="text-center my-3 d-none">
         <div class="spinner-border text-primary" role="status">
             <span class="visually-hidden" data-i18n="common.loading">Loading...</span>
         </div>
index 83c186b41a4ca3794d438b025e5ec3b0d96f1360..354fcd37d97b3d9c36b8d2d4238d150fe01a7ab0 100644 (file)
     <div id="logViewer" class="log-viewer mobile-scroll mb-0"></div>
 
     <!-- Loader -->
-    <div id="loader" class="text-center my-3" style="display: none;">
+    <div id="loader" class="text-center my-3 d-none">
         <div class="spinner-border text-primary" role="status">
             <span class="visually-hidden" data-i18n="common.loading">Loading...</span>
         </div>
index 6730470abfc1772fe5f03b75d3daecda828f3fa8..b1595b755fcea00a5b54f5139272f2a05df1d4fc 100644 (file)
         <div class="modal-body">
             <label class="form-label" data-i18n="backup.available">Available backups</label>
 
-            <div class="table-responsive" style="max-height: 250px; overflow-y: auto;">
+            <div class="table-responsive modal-table-scroll">
                 <table class="table table-hover table-sm align-middle">
                     <thead class="table-light sticky-top">
                         <tr>
-                            <th style="width: 40px;"></th>
+                            <th class="backup-icon-column"></th>
                             <th data-i18n="backup.name">Name</th>
                             <th data-i18n="backup.date">Date</th>
                             <th data-i18n="backup.size">Size</th>
-                            <th style="width: 130px;"
-                                class="text-center"
+                            <th class="backup-actions-column text-center"
                                 data-i18n="backup.actions">
                                 Actions
                             </th>
index 9c6d133b3cf32aaffb70a50549452524e08e822b..9afbe3af147167573a418fd6926f88144327fe7b 100644 (file)
     </div>
 
     <!-- Loader -->
-    <div id="loader" class="text-center my-3" style="display: none;">
+    <div id="loader" class="text-center my-3 d-none">
         <div class="spinner-border text-primary" role="status">
             <span class="visually-hidden" data-i18n="common.loading">Loading...</span>
         </div>