From 7550d197b4a017486af67c17dfc06e9b726b6b92 Mon Sep 17 00:00:00 2001 From: SinTan1729 Date: Sat, 3 Jun 2023 18:49:59 -0500 Subject: [PATCH] new: Show loading and no links text --- actix/resources/index.html | 1 + actix/resources/static/script.js | 5 +++++ 2 files changed, 6 insertions(+) diff --git a/actix/resources/index.html b/actix/resources/index.html index f390590..6e1fbb3 100644 --- a/actix/resources/index.html +++ b/actix/resources/index.html @@ -44,6 +44,7 @@ +

Loading links table...


diff --git a/actix/resources/static/script.js b/actix/resources/static/script.js index 24b99a6..01e75e7 100644 --- a/actix/resources/static/script.js +++ b/actix/resources/static/script.js @@ -34,10 +34,15 @@ const refreshData = async () => { const displayData = async (data) => { let site = await getSiteUrl(); table_box = document.querySelector(".pure-table"); + loading_text = document.getElementsByName("loading-text")[0]; + if (data.length == 0) { table_box.style.visibility = "hidden"; + loading_text.style.display = "block"; + loading_text.innerHTML = "No active links."; } else { + loading_text.style.display = "none"; const table = document.querySelector("#url-table"); if (!window.isSecureContext) { const shortUrlHeader = document.getElementById("short-url-header");
Active links