wip(freight): migration 0017 + model/column-list groundwork for add-freight-templates
This commit is contained in:
@@ -45,9 +45,8 @@ async function submit(): Promise<void> {
|
||||
session.setAuth(auth);
|
||||
await router.push("/");
|
||||
} catch (error) {
|
||||
errorKey.value = error instanceof ApiError && error.status === 409
|
||||
? "auth.emailTaken"
|
||||
: "auth.requestFailed";
|
||||
errorKey.value =
|
||||
error instanceof ApiError && error.status === 409 ? "auth.emailTaken" : "auth.requestFailed";
|
||||
} finally {
|
||||
submitting.value = false;
|
||||
}
|
||||
@@ -55,37 +54,61 @@ async function submit(): Promise<void> {
|
||||
</script>
|
||||
|
||||
<template>
|
||||
<section class="min-h-screen bg-bg px-5 py-10 font-sans text-text">
|
||||
<section class="bg-bg text-text min-h-screen px-5 py-10 font-sans">
|
||||
<VCard class="mx-auto my-10 max-w-[420px] p-6 sm:p-10">
|
||||
<div class="mb-6 flex items-baseline gap-4 border-b border-border pb-3.5">
|
||||
<div class="border-border mb-6 flex items-baseline gap-4 border-b pb-3.5">
|
||||
<h1 class="m-0 text-xl font-semibold">{{ t("auth.registerTab") }}</h1>
|
||||
<NuxtLink class="text-sm text-primary hover:text-primary-hover" to="/login">{{ t("auth.loginTab") }}</NuxtLink>
|
||||
<NuxtLink class="text-primary hover:text-primary-hover text-sm" to="/login">{{
|
||||
t("auth.loginTab")
|
||||
}}</NuxtLink>
|
||||
</div>
|
||||
<form @submit.prevent="submit">
|
||||
<VField :label="t('common.displayName')">
|
||||
<VInput v-model.trim="displayName" type="text" autocomplete="name" :placeholder="t('auth.displayNamePlaceholder')" />
|
||||
<VInput
|
||||
v-model.trim="displayName"
|
||||
type="text"
|
||||
autocomplete="name"
|
||||
:placeholder="t('auth.displayNamePlaceholder')"
|
||||
/>
|
||||
</VField>
|
||||
<VField :label="t('common.email')">
|
||||
<VInput v-model.trim="email" type="email" autocomplete="email" :placeholder="t('auth.emailPlaceholder')" />
|
||||
<VInput
|
||||
v-model.trim="email"
|
||||
type="email"
|
||||
autocomplete="email"
|
||||
:placeholder="t('auth.emailPlaceholder')"
|
||||
/>
|
||||
</VField>
|
||||
<VField :label="t('common.password')">
|
||||
<VInput v-model="password" type="password" autocomplete="new-password" :placeholder="t('auth.passwordPlaceholder')" />
|
||||
<VInput
|
||||
v-model="password"
|
||||
type="password"
|
||||
autocomplete="new-password"
|
||||
:placeholder="t('auth.passwordPlaceholder')"
|
||||
/>
|
||||
</VField>
|
||||
<VField :label="t('auth.confirmPassword')">
|
||||
<VInput v-model="confirmPassword" type="password" autocomplete="new-password" :placeholder="t('auth.confirmPasswordPlaceholder')" />
|
||||
<VInput
|
||||
v-model="confirmPassword"
|
||||
type="password"
|
||||
autocomplete="new-password"
|
||||
:placeholder="t('auth.confirmPasswordPlaceholder')"
|
||||
/>
|
||||
</VField>
|
||||
<p v-if="errorKey" class="-mt-1 mb-3 text-xs text-danger">{{ t(errorKey) }}</p>
|
||||
<p v-if="errorKey" class="text-danger -mt-1 mb-3 text-xs">{{ t(errorKey) }}</p>
|
||||
<VBtn class="mt-1 w-full" variant="primary" type="submit" :disabled="submitting">
|
||||
{{ t("auth.registerAction") }}
|
||||
</VBtn>
|
||||
</form>
|
||||
<div class="mt-4 flex flex-wrap items-center gap-2 text-xs text-muted">
|
||||
<div class="text-muted mt-4 flex flex-wrap items-center gap-2 text-xs">
|
||||
<span>{{ t("auth.haveAccount") }}</span>
|
||||
<NuxtLink class="text-primary hover:text-primary-hover" to="/login">{{ t("auth.loginNow") }}</NuxtLink>
|
||||
<NuxtLink class="text-primary hover:text-primary-hover" to="/forgot-password">{{ t("auth.forgotPassword") }}</NuxtLink>
|
||||
<NuxtLink class="text-primary hover:text-primary-hover" to="/login">{{
|
||||
t("auth.loginNow")
|
||||
}}</NuxtLink>
|
||||
<NuxtLink class="text-primary hover:text-primary-hover" to="/forgot-password">{{
|
||||
t("auth.forgotPassword")
|
||||
}}</NuxtLink>
|
||||
</div>
|
||||
</VCard>
|
||||
</section>
|
||||
</template>
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user