From 0719e456969e89264ca4ab163d4ec0365377790b Mon Sep 17 00:00:00 2001 From: maaa Date: Mon, 28 Aug 2023 20:18:14 +0200 Subject: [PATCH] fr --- static/css/style.css | 34 +++++++++++++++++++++++++++------- static/js/main.js | 18 +++++++++++++++++- static/svg/phonelink_lock.svg | 1 + templates/app.html | 18 ++++++++++++++++++ 4 files changed, 63 insertions(+), 8 deletions(-) create mode 100644 static/svg/phonelink_lock.svg diff --git a/static/css/style.css b/static/css/style.css index dfa7dc6..8cd2ce0 100644 --- a/static/css/style.css +++ b/static/css/style.css @@ -111,12 +111,12 @@ body { overflow-y: scroll; } -.notesBar button { - width: calc(100% - 7px - 7px - 3.5px); +.notesBar .noteButton { + width: calc(100% - 5px - 5px); height: 35px; line-height: 0px; padding: 10px; - margin: 7px; + margin: 5px; margin-bottom: 0; background-color: var(--note-button); color: var(--unselected-note-button-text-color); @@ -159,14 +159,19 @@ body { } .notesBar .newNote { + height: 41px; + line-height: 41px; + width: 100%; + text-align: left; background-color: rgba(0, 0, 0, 0); - transform: translateY(-35%); - padding-left: 0; border: none; + font-size: 16px; + + margin-bottom: 5px; } .notesBar .newNote img { - height: 200%; + height: 32px; padding-right: 5px; transform: translateY(30%); } @@ -246,12 +251,27 @@ body { border-width: 1px; border-radius: 8px; } - +.optionsDiv .mfacheckbox { + display: inline; + margin: 0; + margin-left: 5px; + margin-bottom: 12px; + padding: 0; + height: 17px; + width: 17px; +} .optionsDiv input:focus { outline: 0; border-color: var(--theme-color); } +.optionsDiv code { + padding: 7px; + font-size: 14px; + border-radius: 8px; + background-color: var(--session-color); +} + .optionsDiv progress { width: 100%; background-color: var(--session-color); diff --git a/static/js/main.js b/static/js/main.js index 95e8f9f..4d92753 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -36,13 +36,17 @@ let cancelErrorButton = document.getElementById("cancelErrorButton") let errorInput = document.getElementById("errorInput") let exitThing = document.getElementById("exitThing") let exitSessionsThing = document.getElementById("exitSessionsThing") +let exitMfaThing = document.getElementById("exitMfaThing") let sessionManagerButton = document.getElementById("sessionManagerButton") let sessionManagerDiv = document.getElementById("sessionManagerDiv") let sessionDiv = document.getElementById("sessionDiv") +let mfaDiv = document.getElementById("mfaDiv") +let mfaCheckbox = document.getElementById("mfaCheckbox") let deleteMyAccountButton = document.getElementById("deleteMyAccountButton") let storageThing = document.getElementById("storageThing") let storageProgressThing = document.getElementById("storageProgressThing") let usernameThing = document.getElementById("usernameThing") +let passwordThing = document.getElementById("passwordThing") let logOutButton = document.getElementById("logOutButton") let notesBar = document.getElementById("notesBar") let notesDiv = document.getElementById("notesDiv") @@ -194,7 +198,8 @@ function updateUserInfo() { } else { let responseData = await response.json() usernameBox.innerText = responseData["username"] - usernameThing.innerText = "logged in as " + responseData["username"] + usernameThing.innerText = "username: " + responseData["username"] + passwordThing.innerText = "password: *************" storageThing.innerText = "you've used " + formatBytes(responseData["storageused"]) + " out of " + formatBytes(responseData["storagemax"]) storageProgressThing.value = responseData["storageused"] storageProgressThing.max = responseData["storagemax"] @@ -317,6 +322,17 @@ exitSessionsThing.addEventListener("click", (event) => { optionsDiv.classList.remove("hidden") sessionManagerDiv.classList.add("hidden") }); +mfaCheckbox.addEventListener("change", (event) => { + if (mfaCheckbox.checked === true) { + mfaCheckbox.checked = false + optionsDiv.classList.add("hidden") + mfaDiv.classList.remove("hidden") + } +}) +exitMfaThing.addEventListener("click", (event) => { + optionsDiv.classList.remove("hidden") + mfaDiv.classList.add("hidden") +}); updateUserInfo() diff --git a/static/svg/phonelink_lock.svg b/static/svg/phonelink_lock.svg new file mode 100644 index 0000000..6c54fdf --- /dev/null +++ b/static/svg/phonelink_lock.svg @@ -0,0 +1 @@ + \ No newline at end of file diff --git a/templates/app.html b/templates/app.html index c5fdd83..b855390 100644 --- a/templates/app.html +++ b/templates/app.html @@ -31,6 +31,9 @@

your account

+

+

enable two-factor authentication:

+

storage


@@ -50,6 +53,21 @@
+