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
4 changed files with 4 additions and 1 deletions

View File

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