This commit is contained in:
maaa 2023-08-10 00:43:28 +02:00
parent 45ee19c60e
commit 6a480af7ff
6 changed files with 53 additions and 10 deletions

View File

@ -192,8 +192,10 @@ body {
} }
.optionsDiv button { .optionsDiv button {
width: 100%;
padding: 10px; padding: 10px;
margin-right: 5px; margin-right: 5px;
margin-bottom: 7px;
padding-left: 15px; padding-left: 15px;
padding-right: 15px; padding-right: 15px;
color: white; color: white;
@ -203,6 +205,15 @@ body {
border-radius: 8px; border-radius: 8px;
} }
.optionsDiv .normalButton {
width: auto;
margin-bottom: 0px;
}
.optionsDiv .lastButton {
margin-bottom: 0px;
}
.optionsDiv input { .optionsDiv input {
width: calc(100% - 12px); width: calc(100% - 12px);
height: 25px; height: 25px;
@ -248,6 +259,20 @@ body {
border-radius: 100%; border-radius: 100%;
} }
.optionsDiv img {
height: 18px;
padding-right: 5px;
filter: invert(100%)
}
.optionsDiv .section {
width: 100%;
height: 1px;
background-color: #d8d8d8;
margin-top: 2px;
margin-bottom: 10px;
}
/* Sign up/log in div */ /* Sign up/log in div */
.inoutdiv { .inoutdiv {

View File

@ -119,6 +119,17 @@ function displayPrompt(message, callback) {
callback(errorInput.value) callback(errorInput.value)
callback = undefined callback = undefined
}); });
errorInput.addEventListener("keyup", (event) => {
if (event.key == "Enter") {
callback(errorInput.value)
callback = undefined
errorDiv.classList.add("hidden")
optionsCoverDiv.classList.add("hidden")
errorInput.classList.add("hidden")
cancelErrorButton.classList.add("hidden")
}
});
cancelErrorButton.addEventListener("click", (event) => { cancelErrorButton.addEventListener("click", (event) => {
callback = undefined callback = undefined
errorDiv.classList.add("hidden") errorDiv.classList.add("hidden")
@ -131,6 +142,8 @@ function displayPrompt(message, callback) {
optionsCoverDiv.classList.remove("hidden") optionsCoverDiv.classList.remove("hidden")
errorInput.classList.remove("hidden") errorInput.classList.remove("hidden")
cancelErrorButton.classList.remove("hidden") cancelErrorButton.classList.remove("hidden")
errorInput.focus()
} }
closeErrorButton.addEventListener("click", (event) => { closeErrorButton.addEventListener("click", (event) => {
@ -236,8 +249,6 @@ function selectNote(nameithink) {
noteBox.value = originalText noteBox.value = originalText
noteBox.addEventListener("input", (event) => { noteBox.addEventListener("input", (event) => {
const text = noteBox.value;
clearTimeout(timer); clearTimeout(timer);
timer = setTimeout(() => { timer = setTimeout(() => {
let encryptedText = CryptoJS.AES.encrypt(noteBox.value, password).toString(); let encryptedText = CryptoJS.AES.encrypt(noteBox.value, password).toString();

View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="m361-299 119-121 120 121 47-48-119-121 119-121-47-48-120 121-119-121-48 48 120 121-120 121 48 48ZM261-120q-24 0-42-18t-18-42v-570h-41v-60h188v-30h264v30h188v60h-41v570q0 24-18 42t-42 18H261Zm438-630H261v570h438v-570Zm-438 0v570-570Z"/></svg>

After

Width:  |  Height:  |  Size: 338 B

1
static/svg/download.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M480-313 287-506l43-43 120 120v-371h60v371l120-120 43 43-193 193ZM220-160q-24 0-42-18t-18-42v-143h60v143h520v-143h60v143q0 24-18 42t-42 18H220Z"/></svg>

After

Width:  |  Height:  |  Size: 249 B

1
static/svg/logout.svg Normal file
View File

@ -0,0 +1 @@
<svg xmlns="http://www.w3.org/2000/svg" height="48" viewBox="0 -960 960 960" width="48"><path d="M180-120q-24 0-42-18t-18-42v-600q0-24 18-42t42-18h299v60H180v600h299v60H180Zm486-185-43-43 102-102H360v-60h363L621-612l43-43 176 176-174 174Z"/></svg>

After

Width:  |  Height:  |  Size: 247 B

View File

@ -14,8 +14,8 @@
<body> <body>
<div class="topBar"> <div class="topBar">
<p class="logo" id="burgerButton">burgernotes</p> <p tabindex="0" class="logo" id="burgerButton">burgernotes</p>
<p id="usernameBox" class="usernameBox"></p> <p tabindex="0" id="usernameBox" class="usernameBox"></p>
</div> </div>
<div id="notesBar" class="notesBar"> <div id="notesBar" class="notesBar">
@ -33,19 +33,23 @@
<div id="optionsCoverDiv" class="optionsCoverDiv hidden"> <div id="optionsCoverDiv" class="optionsCoverDiv hidden">
<div id="optionsDiv" class="optionsDiv hidden"> <div id="optionsDiv" class="optionsDiv hidden">
<button class="exit" id="exitThing">X</button> <button class="exit" id="exitThing">X</button>
<h3>manage your account</h3> <h3>your account</h3>
<p id="usernameThing"></p> <p id="usernameThing"></p>
<div class="section"></div>
<p>storage</p>
<progress id="storageProgressThing" value="0" max="100"></progress><br> <progress id="storageProgressThing" value="0" max="100"></progress><br>
<p id="storageThing"></p> <p id="storageThing"></p>
<button id="logOutButton">log out</button> <div class="section"></div>
<button id="deleteMyAccountButton">delete my account</button> <p>account managment</p>
<button id="exportNotesButton">export notes</button> <button id="deleteMyAccountButton"><img src="/static/svg/delete_forever.svg">delete my account</button>
<button id="exportNotesButton"><img src="/static/svg/download.svg">export notes</button>
<button class="lastButton" id="logOutButton"><img src="/static/svg/logout.svg">log out</button>
</div> </div>
<div id="errorDiv" class="optionsDiv hidden"> <div id="errorDiv" class="optionsDiv hidden">
<p id="errorMessageThing"></p> <p id="errorMessageThing"></p>
<input class="hidden" id="errorInput" type="text" placeholder="e.g. shopping list"><br></input> <input class="hidden" id="errorInput" type="text" placeholder="e.g. shopping list"><br></input>
<button id="closeErrorButton">OK</button> <button class="normalButton" id="closeErrorButton">OK</button>
<button class="hidden" id="cancelErrorButton">Cancel</button> <button class="normalButton hidden" id="cancelErrorButton">Cancel</button>
</div> </div>
</div> </div>