Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
  • Loading branch information
SethSharp committed Jun 10, 2024
2 parents 4736cf1 + 14b8813 commit 9ac876a
Show file tree
Hide file tree
Showing 13 changed files with 48 additions and 45 deletions.
12 changes: 6 additions & 6 deletions resources/js/Components/Blogs/CreateEditForm.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import {ref} from 'vue'
import {useForm} from '@inertiajs/vue3'
import { ref } from 'vue'
import { useForm } from '@inertiajs/vue3'
import Form from '@/Components/Form/Form.vue'
import Editor from '@/Components/Editor/Editor.vue'
import Select from '@/Components/Inputs/Select.vue'
Expand Down Expand Up @@ -88,11 +88,11 @@ window.addEventListener('beforeunload', confirmLeave)
:current-image="blog.cover"
label="Cover Image"
/>
<InputError :message="form.errors.cover_image"/>
<InputError :message="form.errors.cover_image" />
</FormElement>

<FormElement>
<Checkbox v-model="form.is_draft" label="Is Draft" :error="form.errors.is_draft"/>
<Checkbox v-model="form.is_draft" label="Is Draft" :error="form.errors.is_draft" />
</FormElement>

<FormGrid>
Expand Down Expand Up @@ -164,8 +164,8 @@ window.addEventListener('beforeunload', confirmLeave)
</FormElement>

<FormElement>
<Editor v-model="form.content" :blog="blog"/>
<InputError :message="form.errors.content"/>
<Editor v-model="form.content" :blog="blog" />
<InputError :message="form.errors.content" />
</FormElement>

<PrimaryButton as="submit" @click.prevent="submit">
Expand Down
18 changes: 10 additions & 8 deletions resources/js/Components/Inputs/TextArea.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import {onMounted, ref} from 'vue'
import { onMounted, ref } from 'vue'
import InputLabel from '@/Components/Inputs/InputLabel.vue'
import InputError from '@/Components/Inputs/InputError.vue'
Expand All @@ -15,8 +15,8 @@ defineProps({
},
showCharacterCount: {
type: Boolean,
default: true
}
default: true,
},
})
const model = defineModel({
Expand All @@ -32,12 +32,12 @@ onMounted(() => {
}
})
defineExpose({focus: () => input.value.focus()})
defineExpose({ focus: () => input.value.focus() })
</script>

<template>
<div>
<InputLabel :value="label"/>
<InputLabel :value="label" />

<textarea
type="text"
Expand All @@ -46,9 +46,11 @@ defineExpose({focus: () => input.value.focus()})
ref="input"
/>

<div v-if="showCharacterCount" class="text-gray-400 text-xs"> Characters: {{ model.length }}</div>
<div class="text-gray-500 text-sm"> {{ description }}</div>
<div v-if="showCharacterCount" class="text-gray-400 text-xs">
Characters: {{ model.length }}
</div>
<div class="text-gray-500 text-sm">{{ description }}</div>

<InputError :message="error"/>
<InputError :message="error" />
</div>
</template>
18 changes: 10 additions & 8 deletions resources/js/Components/Inputs/TextInput.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import {onMounted, ref} from 'vue'
import { onMounted, ref } from 'vue'
import InputLabel from '@/Components/Inputs/InputLabel.vue'
import InputError from '@/Components/Inputs/InputError.vue'
Expand All @@ -25,8 +25,8 @@ defineProps({
},
showCharacterCount: {
type: Boolean,
default: true
}
default: true,
},
})
const model = defineModel({
Expand All @@ -42,12 +42,12 @@ onMounted(() => {
}
})
defineExpose({focus: () => input.value.focus()})
defineExpose({ focus: () => input.value.focus() })
</script>

<template>
<div>
<InputLabel :for-input="id" :value="label"/>
<InputLabel :for-input="id" :value="label" />

<input
:id="id"
Expand All @@ -59,9 +59,11 @@ defineExpose({focus: () => input.value.focus()})
class="w-full !border-gray-300 focus:border-indigo-500 focus:ring-indigo-500 rounded-md shadow-sm"
/>

<div v-if="showCharacterCount" class="text-gray-400 text-xs"> Characters: {{ model.length }}</div>
<div class="text-gray-500 text-sm"> {{ description }}</div>
<div v-if="showCharacterCount" class="text-gray-400 text-xs">
Characters: {{ model.length }}
</div>
<div class="text-gray-500 text-sm">{{ description }}</div>

<InputError :message="error"/>
<InputError :message="error" />
</div>
</template>
4 changes: 2 additions & 2 deletions resources/js/Pages/Auth/ConfirmPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import InputError from '@/Components/Inputs/InputError.vue'
import InputLabel from '@/Components/Inputs/InputLabel.vue'
import PrimaryButton from '@/Components/Buttons/PrimaryButton.vue'
import TextInput from '@/Components/Inputs/TextInput.vue'
import {Head, useForm} from '@inertiajs/vue3'
import { Head, useForm } from '@inertiajs/vue3'
import FormElement from '@/Components/Form/FormElement.vue'
const form = useForm({
Expand All @@ -20,7 +20,7 @@ const submit = () => {

<template>
<GuestLayout>
<Head title="Confirm Password"/>
<Head title="Confirm Password" />

<div class="mb-4 text-sm text-gray-600">
This is a secure area of the application. Please confirm your password before
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Pages/Auth/ForgotPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import InputError from '@/Components/Inputs/InputError.vue'
import InputLabel from '@/Components/Inputs/InputLabel.vue'
import PrimaryButton from '@/Components/Buttons/PrimaryButton.vue'
import TextInput from '@/Components/Inputs/TextInput.vue'
import {Head, useForm} from '@inertiajs/vue3'
import { Head, useForm } from '@inertiajs/vue3'
defineProps({
status: {
Expand All @@ -23,7 +23,7 @@ const submit = () => {

<template>
<GuestLayout>
<Head title="Forgot Password"/>
<Head title="Forgot Password" />

<div class="mb-4 text-sm text-gray-600">
Forgot your password? No problem. Just let us know your email address and we will email
Expand Down
6 changes: 3 additions & 3 deletions resources/js/Pages/Auth/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import InputError from '@/Components/Inputs/InputError.vue'
import InputLabel from '@/Components/Inputs/InputLabel.vue'
import PrimaryButton from '@/Components/Buttons/PrimaryButton.vue'
import TextInput from '@/Components/Inputs/TextInput.vue'
import {Head, Link, useForm} from '@inertiajs/vue3'
import { Head, Link, useForm } from '@inertiajs/vue3'
import FormElement from '@/Components/Form/FormElement.vue'
defineProps({
Expand All @@ -32,7 +32,7 @@ const submit = () => {

<template>
<GuestLayout>
<Head title="Log in"/>
<Head title="Log in" />

<div v-if="status" class="mb-4 font-medium text-sm text-green-600">
{{ status }}
Expand Down Expand Up @@ -66,7 +66,7 @@ const submit = () => {
</FormElement>

<FormElement>
<Checkbox label="Remember Me" v-model="form.remember"/>
<Checkbox label="Remember Me" v-model="form.remember" />
</FormElement>

<div class="flex items-center justify-end mt-4">
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Pages/Auth/Register.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import InputError from '@/Components/Inputs/InputError.vue'
import InputLabel from '@/Components/Inputs/InputLabel.vue'
import PrimaryButton from '@/Components/Buttons/PrimaryButton.vue'
import TextInput from '@/Components/Inputs/TextInput.vue'
import {Head, Link, useForm} from '@inertiajs/vue3'
import { Head, Link, useForm } from '@inertiajs/vue3'
import FormElement from '@/Components/Form/FormElement.vue'
const form = useForm({
Expand All @@ -23,7 +23,7 @@ const submit = () => {

<template>
<GuestLayout>
<Head title="Register"/>
<Head title="Register" />

<form @submit.prevent="submit">
<FormElement>
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Pages/Auth/ResetPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import InputError from '@/Components/Inputs/InputError.vue'
import InputLabel from '@/Components/Inputs/InputLabel.vue'
import PrimaryButton from '@/Components/Buttons/PrimaryButton.vue'
import TextInput from '@/Components/Inputs/TextInput.vue'
import {Head, useForm} from '@inertiajs/vue3'
import { Head, useForm } from '@inertiajs/vue3'
import FormElement from '@/Components/Form/FormElement.vue'
const props = defineProps({
Expand Down Expand Up @@ -34,7 +34,7 @@ const submit = () => {

<template>
<GuestLayout>
<Head title="Reset Password"/>
<Head title="Reset Password" />

<form @submit.prevent="submit">
<FormElement>
Expand Down
5 changes: 2 additions & 3 deletions resources/js/Pages/Dashboard/Blogs/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,7 @@ defineProps({
blog: {
type: Object,
required: false,
default: () => {
},
default: () => {},
},
collections: {
type: Array,
Expand All @@ -24,6 +23,6 @@ defineProps({

<template>
<AuthenticatedLayout title="Edit Blog">
<CreateEditForm :blog="blog" :tags="tags" :collections="collections"/>
<CreateEditForm :blog="blog" :tags="tags" :collections="collections" />
</AuthenticatedLayout>
</template>
8 changes: 4 additions & 4 deletions resources/js/Pages/Profile/Edit.vue
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
<script setup>
import {Head, Link} from '@inertiajs/vue3'
import { Head, Link } from '@inertiajs/vue3'
import ProfileLayout from '@/Layouts/ProfileLayout.vue'
import DeleteUserForm from './Partials/DeleteUserForm.vue'
import UpdatePasswordForm from './Partials/UpdatePasswordForm.vue'
Expand All @@ -16,7 +16,7 @@ defineProps({
</script>

<template>
<Head title="Profile"/>
<Head title="Profile" />

<ProfileLayout>
<div class="py-12">
Expand All @@ -30,11 +30,11 @@ defineProps({
</div>

<div class="p-4 sm:p-8 bg-white shadow sm:rounded-lg">
<UpdatePasswordForm class="max-w-xl"/>
<UpdatePasswordForm class="max-w-xl" />
</div>

<div class="p-4 sm:p-8 bg-white shadow sm:rounded-lg">
<DeleteUserForm class="max-w-xl"/>
<DeleteUserForm class="max-w-xl" />
</div>

<Link
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Pages/Profile/Partials/DeleteUserForm.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import {nextTick, ref} from 'vue'
import {useForm} from '@inertiajs/vue3'
import { nextTick, ref } from 'vue'
import { useForm } from '@inertiajs/vue3'
import Modal from '@/Components/Modal.vue'
import TextInput from '@/Components/Inputs/TextInput.vue'
import FormElement from '@/Components/Form/FormElement.vue'
Expand Down
4 changes: 2 additions & 2 deletions resources/js/Pages/Profile/Partials/UpdatePasswordForm.vue
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<script setup>
import {ref} from 'vue'
import {useForm} from '@inertiajs/vue3'
import { ref } from 'vue'
import { useForm } from '@inertiajs/vue3'
import TextInput from '@/Components/Inputs/TextInput.vue'
import FormElement from '@/Components/Form/FormElement.vue'
import PrimaryButton from '@/Components/Buttons/PrimaryButton.vue'
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
:show-character-count="false"
<script setup>
import {Link, useForm, usePage} from '@inertiajs/vue3'
import { Link, useForm, usePage } from '@inertiajs/vue3'
import TextInput from '@/Components/Inputs/TextInput.vue'
import FormElement from '@/Components/Form/FormElement.vue'
import PrimaryButton from '@/Components/Buttons/PrimaryButton.vue'
Expand Down

0 comments on commit 9ac876a

Please sign in to comment.