Feat: email notifications (#3007)

* Feat: email notifications / email db backup

Because not using a simple smtp connection is silly

* Added form

* broken, and annoying bug

Why wont the input display?!?!?

* make

* Encourage protonmail use, because its great.

* feat: small UI polishing

* chore: make bundle

---------

Co-authored-by: Vlad Stan <stan.v.vlad@gmail.com>
This commit is contained in:
Arc
2025-03-03 12:59:08 +00:00
committed by GitHub
co-authored by Vlad Stan
parent fe9b62e8a8
commit 991e0db50b
6 changed files with 242 additions and 3 deletions
+19
View File
@@ -53,8 +53,10 @@ window.AdminPageLogic = {
chartReady: false,
formAddAdmin: '',
formAddUser: '',
hideInputToggle: true,
formAddExtensionsManifest: '',
nostrNotificationIdentifier: '',
emailNotificationAddress: '',
formAllowedIPs: '',
formCallbackUrlRule: '',
formBlockedIPs: '',
@@ -270,6 +272,23 @@ window.AdminPageLogic = {
m => m !== identifer
)
},
addEmailNotificationAddress() {
const email = this.emailNotificationAddress.trim()
const emails = this.formData.lnbits_email_notifications_to_emails
if (email && email.length && !emails.includes(email)) {
this.formData.lnbits_email_notifications_to_emails = [...emails, email]
this.emailNotificationAddress = ''
}
},
removeEmailNotificationAddress(email) {
const emails = this.formData.lnbits_email_notifications_to_emails
this.formData.lnbits_email_notifications_to_emails = emails.filter(
m => m !== email
)
},
hideInputsToggle() {
this.hideInputToggle = !this.hideInputToggle
},
async toggleServerLog() {
this.serverlogEnabled = !this.serverlogEnabled
if (this.serverlogEnabled) {