mirror of
https://github.com/BillyOutlast/drop.git
synced 2026-02-04 00:31:17 +01:00
fix: reduce password requirement & new task error ui
This commit is contained in:
@@ -70,7 +70,7 @@
|
||||
"register": {
|
||||
"confirmPasswordFormat": "Muss mit oben genanntem übereinstimmen",
|
||||
"emailFormat": "Muss im Format nutzer{'@'}beispiel.de sein",
|
||||
"passwordFormat": "Muss mindestens 14 Zeichen enthalten",
|
||||
"passwordFormat": "Muss mindestens 8 Zeichen enthalten",
|
||||
"subheader": "Gebe unten deine Daten ein, um dein Konto zu erstellen.",
|
||||
"title": "Erstelle dein Drop Konto",
|
||||
"usernameFormat": "Muss mindestens 5 Zeichen enthalten und aus Kleinbuchstaben bestehen"
|
||||
|
||||
@@ -56,7 +56,7 @@
|
||||
"register": {
|
||||
"confirmPasswordFormat": "Must be the same as above, savvy?",
|
||||
"emailFormat": "Must be in the fashion of a true scallywag {'@'} example.com",
|
||||
"passwordFormat": "Must be 14 or more marks, ye landlubber!",
|
||||
"passwordFormat": "Must be 8 or more marks, ye landlubber!",
|
||||
"subheader": "Fill in yer details below to make yer mark.",
|
||||
"title": "Forge yer Drop Mark",
|
||||
"usernameFormat": "Must be 5 or more marks, and all lowercase, argh!"
|
||||
|
||||
@@ -72,7 +72,7 @@
|
||||
"register": {
|
||||
"confirmPasswordFormat": "Must be the same as above",
|
||||
"emailFormat": "Must be in the format user{'@'}example.com",
|
||||
"passwordFormat": "Must be 14 or more characters",
|
||||
"passwordFormat": "Must be 8 or more characters",
|
||||
"subheader": "Fill in your details below to create your account.",
|
||||
"title": "Create your Drop account",
|
||||
"usernameFormat": "Must be 5 or more characters, and lowercase"
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
"register": {
|
||||
"confirmPasswordFormat": "Doit être pareil qu'au dessus",
|
||||
"emailFormat": "Doit être au format utilisateur{'@'}exemple.com",
|
||||
"passwordFormat": "Doit être au moins 14 caractères ou plus",
|
||||
"passwordFormat": "Doit être au moins 8 caractères ou plus",
|
||||
"subheader": "Remplissez vos coordonnées pour créer votre compte.",
|
||||
"title": "Créer votre compte Drop",
|
||||
"usernameFormat": "Doit être au moins 5 caractères et en minuscules"
|
||||
|
||||
@@ -70,7 +70,7 @@
|
||||
"register": {
|
||||
"confirmPasswordFormat": "Musi być takie samo jak powyżej",
|
||||
"emailFormat": "Musi być w formacie uzytkownik{'@'}example.com",
|
||||
"passwordFormat": "Musi mieć conajmniej 14 znaków",
|
||||
"passwordFormat": "Musi mieć conajmniej 8 znaków",
|
||||
"subheader": "Wpisz poniżej swoje dane, aby utworzyć swoje konto.",
|
||||
"title": "Stwórz swoje konto Drop",
|
||||
"usernameFormat": "Musi mieć co najmniej 5 znaków i małe litery"
|
||||
|
||||
@@ -11,39 +11,35 @@
|
||||
</i18n-t>
|
||||
</NuxtLink>
|
||||
|
||||
<div
|
||||
v-if="task && task.error"
|
||||
class="grow w-full flex items-center justify-center"
|
||||
>
|
||||
<div class="flex flex-col items-center">
|
||||
<ExclamationCircleIcon
|
||||
class="h-12 w-12 text-red-600"
|
||||
aria-hidden="true"
|
||||
/>
|
||||
<div class="mt-3 text-center sm:mt-5">
|
||||
<h1
|
||||
class="text-3xl font-semibold font-display leading-6 text-zinc-100"
|
||||
>
|
||||
{{ task.error.title }}
|
||||
</h1>
|
||||
<div class="mt-4">
|
||||
<p class="text-sm text-zinc-400 max-w-md">
|
||||
{{ task.error.description }}
|
||||
</p>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div v-else-if="task" class="flex flex-col w-full gap-y-4">
|
||||
<div v-if="task" class="flex flex-col w-full gap-y-4">
|
||||
<h1
|
||||
class="inline-flex items-center gap-x-3 text-3xl text-zinc-100 font-bold font-display"
|
||||
>
|
||||
<div>
|
||||
<CheckCircleIcon v-if="task.success" class="size-5 text-green-600" />
|
||||
<CheckCircleIcon v-if="task.success" class="size-8 text-green-600" />
|
||||
<XMarkIcon v-else-if="task.error" class="size-8 text-red-600" />
|
||||
<div v-else class="size-4 bg-blue-600 rounded-full animate-pulse" />
|
||||
</div>
|
||||
{{ task.name }}
|
||||
</h1>
|
||||
<div
|
||||
v-if="task.error"
|
||||
class="rounded-md bg-red-500/15 p-4 outline outline-red-500/25"
|
||||
>
|
||||
<div class="flex">
|
||||
<div class="shrink-0">
|
||||
<XCircleIcon class="size-5 text-red-400" aria-hidden="true" />
|
||||
</div>
|
||||
<div class="ml-3">
|
||||
<h3 class="text-sm font-medium text-red-200">
|
||||
{{ task.error.title }}
|
||||
</h3>
|
||||
<div class="mt-2 text-sm text-red-200/80">
|
||||
{{ task.error.description }}
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<ul class="flex flex-row items-center h-12 gap-x-3">
|
||||
<li
|
||||
v-for="[name, link] in task.actions.map((v) => v.split(':'))"
|
||||
@@ -95,8 +91,8 @@
|
||||
</template>
|
||||
|
||||
<script setup lang="ts">
|
||||
import { CheckCircleIcon } from "@heroicons/vue/16/solid";
|
||||
import { ExclamationCircleIcon } from "@heroicons/vue/24/solid";
|
||||
import { CheckCircleIcon } from "@heroicons/vue/24/solid";
|
||||
import { XMarkIcon, XCircleIcon } from "@heroicons/vue/24/outline";
|
||||
|
||||
const route = useRoute();
|
||||
const taskId = route.params.id.toString();
|
||||
|
||||
@@ -227,7 +227,7 @@ const validUsername = computed(
|
||||
!((usernameValidator(username.value) as unknown) instanceof type.errors),
|
||||
);
|
||||
|
||||
const passwordValidator = type("string >= 14");
|
||||
const passwordValidator = type("string >= 8");
|
||||
const validPassword = computed(
|
||||
() =>
|
||||
!((passwordValidator(password.value) as unknown) instanceof type.errors),
|
||||
|
||||
@@ -15,7 +15,7 @@ export const SharedRegisterValidator = type({
|
||||
|
||||
const CreateUserValidator = SharedRegisterValidator.and({
|
||||
invitation: "string",
|
||||
password: "string >= 14",
|
||||
password: "string >= 8",
|
||||
"displayName?": "string | undefined",
|
||||
}).configure(throwingArktype);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user