fix: DI nonsense (#4174)

* fix: DI nonsense

* fix: lint

* fix: client try di issue

* fix: injects outside of context

* fix: use .catch

* refactor: convert projects.vue to composition API.

* fix: moderation checklist notif pos change watcher

* fix: lint issues
This commit is contained in:
Cal H.
2025-08-15 19:02:55 +01:00
committed by GitHub
parent 9b5f172170
commit 4ad6daa45c
32 changed files with 318 additions and 323 deletions

View File

@@ -50,7 +50,7 @@
</span>
</template>
<template #actions>
<button v-if="auth?.user?.email" class="btn" @click="resendVerifyEmail">
<button v-if="auth?.user?.email" class="btn" @click="handleResendEmailVerification">
{{ formatMessage(verifyEmailBannerMessages.action) }}
</button>
<nuxt-link v-else class="btn" to="/settings/account">
@@ -854,6 +854,23 @@ const footerMessages = defineMessages({
},
})
async function handleResendEmailVerification() {
try {
await resendVerifyEmail()
addNotification({
title: 'Email sent',
text: `An email with a link to verify your account has been sent to ${auth.value.user.email}.`,
type: 'success',
})
} catch (err) {
addNotification({
title: 'An error occurred',
text: err.data.description,
type: 'error',
})
}
}
useHead({
link: [
{