diff --git a/public/app.js b/public/app.js index 136be29..f579e25 100644 --- a/public/app.js +++ b/public/app.js @@ -49,8 +49,8 @@ async function handleAddLink(e) { addButton.disabled = true; const btnText = addButton.querySelector('.btn-text'); const btnLoader = addButton.querySelector('.btn-loader'); - btnText.style.display = 'none'; - btnLoader.style.display = 'inline'; + if (btnText) btnText.style.display = 'none'; + if (btnLoader) btnLoader.style.display = 'flex'; try { const response = await fetch(API_BASE, { @@ -80,8 +80,8 @@ async function handleAddLink(e) { } finally { // Re-enable form addButton.disabled = false; - btnText.style.display = 'inline'; - btnLoader.style.display = 'none'; + if (btnText) btnText.style.display = 'inline'; + if (btnLoader) btnLoader.style.display = 'none'; } } diff --git a/public/index.html b/public/index.html index 8f73232..5e67557 100644 --- a/public/index.html +++ b/public/index.html @@ -7,36 +7,56 @@ -
-
-

🔗 LinkDing

-

Collect and organize your favorite links

-
- -
-