1
0
mirror of https://github.com/lus/pasty.git synced 2023-08-10 21:13:09 +03:00

Show a notification on encryption toggle

This commit is contained in:
Lukas Schulte Pelkum 2021-09-09 18:20:00 +02:00
parent f931627c77
commit b11d4eb478
No known key found for this signature in database
GPG Key ID: 408DA7CA81DB885C
4 changed files with 4 additions and 1 deletions

View File

@ -303,6 +303,7 @@ html, body {
padding: 0; padding: 0;
} }
.container #notifications div { .container #notifications div {
margin: 0;
border-radius: 0; border-radius: 0;
width: 100vw; width: 100vw;
-webkit-box-sizing: border-box; -webkit-box-sizing: border-box;

File diff suppressed because one or more lines are too long

View File

@ -250,6 +250,7 @@ html, body {
.container #notifications { .container #notifications {
padding: 0; padding: 0;
& div { & div {
margin: 0;
border-radius: 0; border-radius: 0;
width: 100vw; width: 100vw;
box-sizing: border-box; box-sizing: border-box;

View File

@ -367,6 +367,7 @@ function setupButtonFunctionality() {
BUTTON_TOGGLE_ENCRYPTION_ELEMENT.addEventListener("click", () => { BUTTON_TOGGLE_ENCRYPTION_ELEMENT.addEventListener("click", () => {
const active = BUTTON_TOGGLE_ENCRYPTION_ELEMENT.classList.toggle("active"); const active = BUTTON_TOGGLE_ENCRYPTION_ELEMENT.classList.toggle("active");
localStorage.setItem("encryption", active); localStorage.setItem("encryption", active);
Notifications.success((active ? "Enabled" : "Disabled") + " automatic paste encryption.");
}); });
BUTTON_REPORT_ELEMENT.addEventListener("click", async () => { BUTTON_REPORT_ELEMENT.addEventListener("click", async () => {