You've already forked AstralRinth
forked from didirus/AstralRinth
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:
@@ -40,7 +40,11 @@
|
||||
</template>
|
||||
</p>
|
||||
|
||||
<button v-if="auth.user" class="btn btn-primary continue-btn" @click="resendVerifyEmail">
|
||||
<button
|
||||
v-if="auth.user"
|
||||
class="btn btn-primary continue-btn"
|
||||
@click="handleResendEmailVerification"
|
||||
>
|
||||
{{ formatMessage(failedVerificationMessages.action) }} <RightArrowIcon />
|
||||
</button>
|
||||
|
||||
@@ -53,7 +57,9 @@
|
||||
</template>
|
||||
<script setup>
|
||||
import { RightArrowIcon, SettingsIcon } from '@modrinth/assets'
|
||||
import { injectNotificationManager } from '@modrinth/ui'
|
||||
|
||||
const { addNotification } = injectNotificationManager()
|
||||
const { formatMessage } = useVIntl()
|
||||
|
||||
const messages = defineMessages({
|
||||
@@ -149,4 +155,21 @@ if (route.query.flow) {
|
||||
success.value = false
|
||||
}
|
||||
}
|
||||
|
||||
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',
|
||||
})
|
||||
}
|
||||
}
|
||||
</script>
|
||||
|
||||
Reference in New Issue
Block a user