stubs/inertia-vue-ts/app/javascript/Pages/Profile/Partials/UpdateProfileInformationForm.vue in kaze-0.5.0 vs stubs/inertia-vue-ts/app/javascript/Pages/Profile/Partials/UpdateProfileInformationForm.vue in kaze-0.6.0
- old
+ new
@@ -1,78 +1,88 @@
<script setup lang="ts">
-import InputError from '@/Components/InputError.vue';
-import InputLabel from '@/Components/InputLabel.vue';
-import PrimaryButton from '@/Components/PrimaryButton.vue';
-import TextInput from '@/Components/TextInput.vue';
-import { Link, useForm, usePage } from '@inertiajs/vue3';
-import { profile_update_path } from '@/routes';
+import InputError from '@/Components/InputError.vue'
+import InputLabel from '@/Components/InputLabel.vue'
+import PrimaryButton from '@/Components/PrimaryButton.vue'
+import TextInput from '@/Components/TextInput.vue'
+import { useForm, usePage } from '@inertiajs/vue3'
+import { profile_update_path } from '@/routes'
defineProps<{
- mustVerifyEmail?: Boolean;
- status?: String;
-}>();
+ mustVerifyEmail?: Boolean
+ status?: String
+}>()
-const user = usePage().props.auth.user;
+const user = usePage().props.auth.user
const form = useForm({
- name: user.name,
- email: user.email,
-});
+ name: user.name,
+ email: user.email,
+})
</script>
<template>
- <section>
- <header>
- <h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">Profile Information</h2>
+ <section>
+ <header>
+ <h2 class="text-lg font-medium text-gray-900 dark:text-gray-100">
+ Profile Information
+ </h2>
- <p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
- Update your account's profile information and email address.
- </p>
- </header>
+ <p class="mt-1 text-sm text-gray-600 dark:text-gray-400">
+ Update your account's profile information and email address.
+ </p>
+ </header>
- <form @submit.prevent="form.patch(profile_update_path())" class="mt-6 space-y-6">
- <div>
- <InputLabel for="name" value="Name" />
+ <form
+ @submit.prevent="form.patch(profile_update_path())"
+ class="mt-6 space-y-6"
+ >
+ <div>
+ <InputLabel for="name" value="Name" />
- <TextInput
- id="name"
- type="text"
- class="mt-1 block w-full"
- v-model="form.name"
- required
- autofocus
- autocomplete="name"
- />
+ <TextInput
+ id="name"
+ type="text"
+ class="mt-1 block w-full"
+ v-model="form.name"
+ required
+ autofocus
+ autocomplete="name"
+ />
- <InputError class="mt-2" :message="form.errors.name" />
- </div>
+ <InputError class="mt-2" :message="form.errors.name" />
+ </div>
- <div>
- <InputLabel for="email" value="Email" />
+ <div>
+ <InputLabel for="email" value="Email" />
- <TextInput
- id="email"
- type="email"
- class="mt-1 block w-full"
- v-model="form.email"
- required
- autocomplete="username"
- />
+ <TextInput
+ id="email"
+ type="email"
+ class="mt-1 block w-full"
+ v-model="form.email"
+ required
+ autocomplete="username"
+ />
- <InputError class="mt-2" :message="form.errors.email" />
- </div>
+ <InputError class="mt-2" :message="form.errors.email" />
+ </div>
- <div class="flex items-center gap-4">
- <PrimaryButton :disabled="form.processing">Save</PrimaryButton>
+ <div class="flex items-center gap-4">
+ <PrimaryButton :disabled="form.processing">Save</PrimaryButton>
- <Transition
- enter-active-class="transition ease-in-out"
- enter-from-class="opacity-0"
- leave-active-class="transition ease-in-out"
- leave-to-class="opacity-0"
- >
- <p v-if="form.recentlySuccessful" class="text-sm text-gray-600 dark:text-gray-400">Saved.</p>
- </Transition>
- </div>
- </form>
- </section>
+ <Transition
+ enter-active-class="transition ease-in-out"
+ enter-from-class="opacity-0"
+ leave-active-class="transition ease-in-out"
+ leave-to-class="opacity-0"
+ >
+ <p
+ v-if="form.recentlySuccessful"
+ class="text-sm text-gray-600 dark:text-gray-400"
+ >
+ Saved.
+ </p>
+ </Transition>
+ </div>
+ </form>
+ </section>
</template>