PHP Classes

File: resources/js/pages/Auth/Register.vue

Recommend this page to a friend!
  Packages of Niko Peikrishvili   Ticker   resources/js/pages/Auth/Register.vue   Download  
File: resources/js/pages/Auth/Register.vue
Role: Auxiliary data
Content type: text/plain
Description: Auxiliary data
Class: Ticker
Application to track and manage to do tasks
Author: By
Last change:
Date: 2 months ago
Size: 6,481 bytes
 

Contents

Class file image Download
<script setup> import { Head, useForm } from '@inertiajs/vue3'; import { Button } from '@/components/ui/button'; import { Input } from '@/components/ui/input'; const form = useForm({ name: '', email: '', password: '', password_confirmation: '', }); const submit = () => { form.post('/register', { onFinish: () => form.reset('password', 'password_confirmation'), }); }; </script> <template> <Head title="???????????" /> <div class="min-h-screen flex items-center justify-center bg-gray-100 dark:bg-gray-900 p-4"> <div class="w-full max-w-md"> <!-- Logo/Header --> <div class="text-center mb-8"> <div class="inline-flex items-center justify-center w-16 h-16 rounded-xl bg-primary text-primary-foreground mb-4"> <svg class="w-8 h-8" fill="none" stroke="currentColor" viewBox="0 0 24 24"> <path stroke-linecap="round" stroke-linejoin="round" stroke-width="2" d="M9 5H7a2 2 0 00-2 2v12a2 2 0 002 2h10a2 2 0 002-2V7a2 2 0 00-2-2h-2M9 5a2 2 0 002 2h2a2 2 0 002-2M9 5a2 2 0 012-2h2a2 2 0 012 2m-6 9l2 2 4-4" /> </svg> </div> <h1 class="text-2xl font-bold text-gray-900 dark:text-white">Ticker</h1> <p class="text-gray-500 dark:text-gray-400 mt-1">???????????</p> </div> <!-- Form Card --> <div class="bg-white dark:bg-gray-800 rounded-xl shadow-lg border border-gray-200 dark:border-gray-700 p-8"> <form @submit.prevent="submit" class="space-y-6"> <!-- Name --> <div> <label for="name" class="block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2"> ?????? </label> <Input id="name" type="text" v-model="form.name" class="w-full" :class="{ 'border-red-500': form.errors.name }" autofocus autocomplete="name" /> <p v-if="form.errors.name" class="mt-1 text-sm text-red-500"> {{ form.errors.name }} </p> </div> <!-- Email --> <div> <label for="email" class="block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2"> ??-????? </label> <Input id="email" type="email" v-model="form.email" class="w-full" :class="{ 'border-red-500': form.errors.email }" placeholder="your@email.com" autocomplete="username" /> <p v-if="form.errors.email" class="mt-1 text-sm text-red-500"> {{ form.errors.email }} </p> </div> <!-- Password --> <div> <label for="password" class="block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2"> ?????? </label> <Input id="password" type="password" v-model="form.password" class="w-full" :class="{ 'border-red-500': form.errors.password }" autocomplete="new-password" /> <p v-if="form.errors.password" class="mt-1 text-sm text-red-500"> {{ form.errors.password }} </p> </div> <!-- Password Confirmation --> <div> <label for="password_confirmation" class="block text-sm font-medium text-gray-700 dark:text-gray-200 mb-2"> ??????? ??????????? </label> <Input id="password_confirmation" type="password" v-model="form.password_confirmation" class="w-full" :class="{ 'border-red-500': form.errors.password_confirmation }" autocomplete="new-password" /> <p v-if="form.errors.password_confirmation" class="mt-1 text-sm text-red-500"> {{ form.errors.password_confirmation }} </p> </div> <!-- Submit Button --> <Button type="submit" class="w-full" :disabled="form.processing" > <svg v-if="form.processing" class="animate-spin -ml-1 mr-2 h-4 w-4" fill="none" viewBox="0 0 24 24"> <circle class="opacity-25" cx="12" cy="12" r="10" stroke="currentColor" stroke-width="4"></circle> <path class="opacity-75" fill="currentColor" d="M4 12a8 8 0 018-8V0C5.373 0 0 5.373 0 12h4zm2 5.291A7.962 7.962 0 014 12H0c0 3.042 1.135 5.824 3 7.938l3-2.647z"></path> </svg> ??????????? </Button> </form> <!-- Login Link --> <div class="mt-6 text-center"> <p class="text-sm text-gray-500 dark:text-gray-400"> ???? ????? ????????? <a href="/login" class="text-primary hover:underline font-medium"> ?????? </a> </p> </div> </div> </div> </div> </template>