feat: complete admin invite and user creation and recovery flows
This commit is contained in:
@@ -10,6 +10,10 @@ definePageMeta({
|
||||
|
||||
const to = useRoute().query.to as string | undefined;
|
||||
|
||||
// set by the recovery page after a new password was chosen: 'keys' when saved
|
||||
// API keys were deleted along the way, anything else when there were none
|
||||
const recovered = useRoute().query.recovered as string | undefined;
|
||||
|
||||
if (session.value !== null) {
|
||||
await navigateTo(to ?? '/');
|
||||
}
|
||||
@@ -236,6 +240,20 @@ const submitTwoFactor = async () => {
|
||||
</p>
|
||||
</div>
|
||||
|
||||
<div v-if="recovered !== undefined && step === 'credentials'" role="status"
|
||||
class="flex gap-2.5 mb-4 px-3.5 py-3 rounded-lg bg-green-600/12 border border-green-400/40 text-sm leading-normal">
|
||||
<span class="i-tabler-circle-check text-4.5 mt-0.5 flex-shrink-0 text-green-400" aria-hidden="true"></span>
|
||||
<span>
|
||||
<strong class="font-semibold">Your password is changed.</strong>
|
||||
<span class="text-[var(--text-secondary)]">
|
||||
Log in with the new one.
|
||||
<template v-if="recovered === 'keys'">
|
||||
Your saved API keys were deleted, add them again under Settings → AI Providers.
|
||||
</template>
|
||||
</span>
|
||||
</span>
|
||||
</div>
|
||||
|
||||
<div class="rounded-2xl">
|
||||
<form v-show="step === 'credentials'" class="flex flex-col gap-2" @submit.prevent="submit">
|
||||
<div class="flex flex-col gap-1.5">
|
||||
@@ -308,7 +326,14 @@ const submitTwoFactor = async () => {
|
||||
</form>
|
||||
</div>
|
||||
|
||||
<p v-if="instance?.registration === 'open' && step === 'credentials'" class="text-sm text-center mt-3 text-[var(--text-secondary)]">
|
||||
<p v-if="step === 'credentials'" class="text-sm text-center mt-3">
|
||||
<NuxtLink to="/auth/recover"
|
||||
class="text-[var(--text-secondary)] @hover:text-[var(--text-primary)] @hover:underline">
|
||||
Forgot your password?
|
||||
</NuxtLink>
|
||||
</p>
|
||||
|
||||
<p v-if="instance?.registration === 'open' && step === 'credentials'" class="text-sm text-center mt-1.5 text-[var(--text-secondary)]">
|
||||
New to Veridian?
|
||||
<NuxtLink :to="to ? `/auth/register?to=${to}` : '/auth/register'"
|
||||
class="text-[var(--color-accent)] font-medium @hover:underline">
|
||||
|
||||
Reference in New Issue
Block a user