feat(#36): Notification rework with single and all comments mark as read

This commit is contained in:
2026-01-18 18:42:10 +01:00
parent 105baf7c86
commit db788c4ee3
31 changed files with 711 additions and 94 deletions

View File

@@ -94,6 +94,8 @@
<div class="space-y-3">
<UCheckbox v-model="emailOnFormCreated" :label="$t('settings.email.onFormCreated')" />
<UCheckbox v-model="emailOnFormSubmitted" :label="$t('settings.email.onFormSubmitted')" />
<UCheckbox v-model="emailOnFormUpdated" :label="$t('settings.email.onFormUpdated')" />
<UCheckbox v-model="emailOnCommentAdded" :label="$t('settings.email.onCommentAdded')" />
</div>
<UButton :label="$t('common.save')" color="primary" :loading="isSaving" @click="saveEmailPreferences" />
@@ -143,6 +145,8 @@ const colors = [
const emailAddress = ref('')
const emailOnFormCreated = ref(true)
const emailOnFormSubmitted = ref(true)
const emailOnFormUpdated = ref(true)
const emailOnCommentAdded = ref(true)
const isSaving = ref(false)
onMounted(async () => {
@@ -152,6 +156,8 @@ onMounted(async () => {
emailAddress.value = userData.email || ''
emailOnFormCreated.value = userData.emailOnFormCreated ?? true
emailOnFormSubmitted.value = userData.emailOnFormSubmitted ?? true
emailOnFormUpdated.value = userData.emailOnFormUpdated ?? true
emailOnCommentAdded.value = userData.emailOnCommentAdded ?? true
} catch (error) {
logger.error('Failed to load user email preferences:', error)
}
@@ -167,7 +173,9 @@ async function saveEmailPreferences() {
userStore.user.keycloakId,
emailAddress.value || null,
emailOnFormCreated.value,
emailOnFormSubmitted.value
emailOnFormSubmitted.value,
emailOnFormUpdated.value,
emailOnCommentAdded.value
)
toast.add({