From 2c70864ef591ec9d49f6bf9abd25218a5bbb1036 Mon Sep 17 00:00:00 2001 From: arzumify Date: Fri, 23 Feb 2024 11:32:47 +0000 Subject: [PATCH 1/2] Update APIDOCS.md --- APIDOCS.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/APIDOCS.md b/APIDOCS.md index a355708..bd12d4c 100644 --- a/APIDOCS.md +++ b/APIDOCS.md @@ -9,7 +9,7 @@ POST - /api/signup - provide "username" and "password". POST - /api/login - provide "username" and "password". -To prevent the server from knowing the encryption key, password you provide in the request must be hashed with the argon2 algorithm. +To prevent the server from knowing the encryption key, the password you provide in the request must be hashed with the argon2 algorithm. Parallelism should be 1 Iterations should be 256 @@ -20,7 +20,7 @@ The output should be in the encoded format, not the hashed format The salt should be the SHA-512 of the password. -Password must be at least 14 characters, username must be under 20 characters and alphanumeric. +Password should be at least 8 characters, username must be under 20 characters and alphanumeric. If username is taken, error code 422 will return. From 048170330ef23cbcb47a65d801db1a4eedb2e4ef Mon Sep 17 00:00:00 2001 From: arzumify Date: Fri, 23 Feb 2024 11:36:12 +0000 Subject: [PATCH 2/2] Update static/js/main.js --- static/js/main.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/static/js/main.js b/static/js/main.js index 998388c..48633bb 100644 --- a/static/js/main.js +++ b/static/js/main.js @@ -57,7 +57,7 @@ let selectedNote = 0 let timer let waitTime = 400 -if (/Android|iPhone/i.test(navigator.userAgent)) { +if (/Android|iPhone|iPad|iPod/i.test(navigator.userAgent)) { noteBox.style.width = "10px"; notesBar.style.width = "calc(100% - 10px)" noteBox.readOnly = true @@ -302,7 +302,7 @@ sessionManagerButton.addEventListener("click", (event) => { if (ua.includes("NT") || ua.includes("Linux")) { sessionImage.src = "/static/svg/device_computer.svg" } - if (ua.includes("iPhone" || ua.includes("Android"))) { + if (ua.includes("iPhone" || ua.includes("Android") || ua.include ("iPad") || ua.include ("iPod"))) { sessionImage.src = "/static/svg/device_smartphone.svg" } @@ -614,6 +614,6 @@ removeBox.addEventListener("click", (event) => { } }); -if (isFirstTimeVisitor() && /iPhone|iPad|iPod/i.test(navigator.userAgent)) { +if (isFirstTimeVisitor() && /Android|iPhone|iPad|iPod/i.test(navigator.userAgent)) { displayError("To use PageBurger:\n Swipe Right on a note to open it\n Swipe left in the text boxes to return to notes\n Click on a note to highlight it") }