From 97d0d25600b2c0d389f282df767b4091c5d9571b Mon Sep 17 00:00:00 2001 From: Arzumify Date: Wed, 7 Aug 2024 17:48:43 +0100 Subject: [PATCH] Fixed the font manipulator's text being off center, fixed the loading animation not duplicating correctly on chromium-based browsers, fixed the font manipulator not working correctly, fixed usernameBox hovering displaying the wrong color during dark mode, fixed the add and delete note buttons being larger than other icons --- app/index.html | 12 +++++++----- static/css/style.css | 4 ++-- static/js/main.js | 12 +++++++----- 3 files changed, 16 insertions(+), 12 deletions(-) diff --git a/app/index.html b/app/index.html index f3a161c..801e1b1 100644 --- a/app/index.html +++ b/app/index.html @@ -46,7 +46,7 @@
Font size
-
16px
+
16px
@@ -93,10 +93,12 @@ diff --git a/static/css/style.css b/static/css/style.css index eb272cf..d4359c6 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -253,7 +253,6 @@ body { .topBar .usernameBox { padding: 5px; cursor: pointer; - filter: invert(var(--invertdm)); height: 41px; width: 41px; line-height: 41px; @@ -271,6 +270,7 @@ body { } .topBar .usernameBox img { + filter: invert(var(--invertdm)); height: 22px; } .notesBar { @@ -374,7 +374,7 @@ body { } .notesBar .newNote img { - scale: 0.6; + scale: 0.5; filter: invert(var(--invertdm)); } diff --git a/static/js/main.js b/static/js/main.js index 8eb74d6..77657d0 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -2,7 +2,7 @@ let secretKey = localStorage.getItem("PRIVATE-secretKey") let password = localStorage.getItem("PRIVATE-cryptoKey") -let fontSize = localStorage.getItem("SETTING-fontsize") +let fontSize = Number(localStorage.getItem("SETTING-fontsize")) let remote = localStorage.getItem("SETTING-homeServer") if (secretKey === null || password === null) { @@ -313,11 +313,13 @@ document.addEventListener("DOMContentLoaded", async function () { updateFont() textPlusBox.addEventListener("click", () => { - localStorage.setItem("SETTING-fontsize", String(Number(fontSize) + Number(1))) + fontSize += 1 + localStorage.setItem("SETTING-fontsize", String(fontSize)) updateFont() }); textMinusBox.addEventListener("click", () => { - localStorage.setItem("SETTING-fontsize", String(Number(fontSize) - Number(1))) + fontSize -= 1 + localStorage.setItem("SETTING-fontsize", String(fontSize)) updateFont() }); @@ -514,12 +516,12 @@ document.addEventListener("DOMContentLoaded", async function () { } }) if (purgeNotes.status !== 200) { - fatalError(notes, passwordBackup) + await fatalError(notes, passwordBackup) } else { let responseStatus = await importNotes(notes) errorDiv.classList.add("hidden") if (responseStatus !== 200) { - fatalError(notes, passwordBackup) + await fatalError(notes, passwordBackup) } else { closeErrorButton.classList.remove("hidden") displayError("Password changed!")