[feat] User notifications backend (#3280)

Co-authored-by: Arc <33088785+arcbtc@users.noreply.github.com>
Co-authored-by: dni  <office@dnilabs.com>
This commit is contained in:
Vlad Stan
2025-07-17 16:11:40 +02:00
committed by GitHub
co-authored by Arc dni ⚡
parent a36ab2d408
commit dce2bfb440
15 changed files with 306 additions and 207 deletions
+1 -1
View File
File diff suppressed because one or more lines are too long
+6 -1
View File
@@ -230,6 +230,9 @@ window.localisation.en = {
notifications_nostr_private_key: 'Nostr Private Key',
notifications_nostr_private_key_desc:
'Private key (hex or nsec) to sign the messages sent to Nostr',
notifications_nostr_identifier: 'Nostr Identifier',
notifications_nostr_identifier_desc:
'Nip5 identifier to send notifications to',
notifications_nostr_identifiers: 'Nostr Identifiers',
notifications_nostr_identifiers_desc:
'List of identifiers to send notifications to',
@@ -646,5 +649,7 @@ window.localisation.en = {
'Signing secret for the webhook. Messages will be signed with this secret.',
callback_success_url: 'Callback Success URL',
callback_success_url_hint:
'The user will be redirected to this URL after the payment is successful'
'The user will be redirected to this URL after the payment is successful',
connected: 'Connected',
not_connected: 'Not Connected'
}
-26
View File
@@ -399,32 +399,6 @@ window.AccountPageLogic = {
} finally {
this.apiAcl.password = ''
}
},
addNostrNotificationIdentifier() {
const emailRegex = /^[^\s@]+@[^\s@]+\.[^\s@]+$/
if (!emailRegex.test(this.notifications.nostr.identifier)) {
Quasar.Notify.create({
type: 'warning',
message: 'Invalid email format.'
})
return
}
const identifier = this.user.extra.nostr_notification_identifiers.find(
i => i === this.notifications.nostr.identifier
)
if (identifier) {
return
}
this.user.extra.nostr_notification_identifiers.push(
this.notifications.nostr.identifier
)
this.notifications.nostr.identifier = ''
},
removeNostrNotificationIdentifier(identifier) {
this.user.extra.nostr_notification_identifiers =
this.user.extra.nostr_notification_identifiers.filter(
i => i !== identifier
)
}
},