mirror of
https://github.com/Comfy-Org/ComfyUI_frontend.git
synced 2026-05-03 12:42:01 +00:00
## Summary Adds the [tailwind lint plugin](https://github.com/francoismassart/eslint-plugin-tailwindcss/?tab=readme-ov-file#eslint-plugin-tailwindcss) and fixes the currently fixable rules ([v4 is still in beta](https://github.com/francoismassart/eslint-plugin-tailwindcss/?tab=readme-ov-file#about-tailwind-css-4-support)). ## Changes - **What**: Enforces things like consistent class order, and eventually can prohibit extra classes that could be utilities instead - **Dependencies**: The plugin and its types ┆Issue is synchronized with this [Notion page](https://www.notion.so/PR-5984-Lint-Add-tailwind-linter-2866d73d365081d89db0d998232533bb) by [Unito](https://www.unito.io) --------- Co-authored-by: GitHub Action <action@github.com>
87 lines
2.2 KiB
Vue
87 lines
2.2 KiB
Vue
<template>
|
|
<Form
|
|
class="flex flex-col gap-6"
|
|
:resolver="zodResolver(signUpSchema)"
|
|
@submit="onSubmit"
|
|
>
|
|
<!-- Email Field -->
|
|
<FormField v-slot="$field" name="email" class="flex flex-col gap-2">
|
|
<label
|
|
class="mb-2 text-base font-medium opacity-80"
|
|
for="comfy-org-sign-up-email"
|
|
>
|
|
{{ t('auth.signup.emailLabel') }}
|
|
</label>
|
|
<InputText
|
|
pt:root:id="comfy-org-sign-up-email"
|
|
pt:root:autocomplete="email"
|
|
class="h-10"
|
|
type="text"
|
|
:placeholder="t('auth.signup.emailPlaceholder')"
|
|
:invalid="$field.invalid"
|
|
/>
|
|
<small v-if="$field.error" class="text-red-500">{{
|
|
$field.error.message
|
|
}}</small>
|
|
</FormField>
|
|
|
|
<PasswordFields />
|
|
|
|
<!-- Personal Data Consent Checkbox -->
|
|
<FormField
|
|
v-slot="$field"
|
|
name="personalDataConsent"
|
|
class="flex items-center gap-2"
|
|
>
|
|
<Checkbox
|
|
input-id="comfy-org-sign-up-personal-data-consent"
|
|
:binary="true"
|
|
:invalid="$field.invalid"
|
|
/>
|
|
<label
|
|
for="comfy-org-sign-up-personal-data-consent"
|
|
class="text-base font-medium opacity-80"
|
|
>
|
|
{{ t('auth.signup.personalDataConsentLabel') }}
|
|
</label>
|
|
<small v-if="$field.error" class="-mt-4 text-red-500">{{
|
|
$field.error.message
|
|
}}</small>
|
|
</FormField>
|
|
|
|
<!-- Submit Button -->
|
|
<Button
|
|
type="submit"
|
|
:label="t('auth.signup.signUpButton')"
|
|
class="mt-4 h-10 font-medium"
|
|
/>
|
|
</Form>
|
|
</template>
|
|
|
|
<script setup lang="ts">
|
|
import type { FormSubmitEvent } from '@primevue/forms'
|
|
import { Form, FormField } from '@primevue/forms'
|
|
import { zodResolver } from '@primevue/forms/resolvers/zod'
|
|
import Button from 'primevue/button'
|
|
import Checkbox from 'primevue/checkbox'
|
|
import InputText from 'primevue/inputtext'
|
|
import { useI18n } from 'vue-i18n'
|
|
|
|
import { signUpSchema } from '@/schemas/signInSchema'
|
|
import type { SignUpData } from '@/schemas/signInSchema'
|
|
|
|
import PasswordFields from './PasswordFields.vue'
|
|
|
|
const { t } = useI18n()
|
|
|
|
const emit = defineEmits<{
|
|
submit: [values: SignUpData]
|
|
}>()
|
|
|
|
const onSubmit = (event: FormSubmitEvent) => {
|
|
if (event.valid) {
|
|
emit('submit', event.values as SignUpData)
|
|
}
|
|
}
|
|
</script>
|