Skip to content

Commit

Permalink
The code design issues have been resolved
Browse files Browse the repository at this point in the history
  • Loading branch information
Silabalkan committed Dec 6, 2024
1 parent 76bcc43 commit 3fac8f8
Show file tree
Hide file tree
Showing 7 changed files with 48 additions and 42 deletions.
26 changes: 21 additions & 5 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 3 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,6 @@
"@inertiajs/vue3": "^1.2.0",
"@tailwindcss/forms": "^0.5.9",
"@tailwindcss/typography": "^0.5.15",
"tailwindcss": "^3.4.16",
"laravel-vite-plugin": "^1.0.5",
"lodash": "^4.17.21",
"vue": "^3.5.10"
Expand All @@ -30,7 +29,9 @@
"eslint-plugin-tailwindcss": "^3.17.4",
"eslint-plugin-vue": "^9.28.0",
"postcss": "^8.4.31",
"typescript": "^5.7.2",
"prettier": "^3.4.2",
"tailwindcss": "^3.4.16",
"typescript": "^5.3.2",
"vite": "^5.4.8",
"vue-tsc": "^2.1.6"
}
Expand Down
20 changes: 7 additions & 13 deletions resources/js/Components/Dropdown.vue
Original file line number Diff line number Diff line change
Expand Up @@ -25,20 +25,17 @@ const closeOnEscape = (e) => {
onMounted(() => document.addEventListener('keydown', closeOnEscape))
onUnmounted(() => document.removeEventListener('keydown', closeOnEscape))
const widthClass = computed(() => {
return {
48: 'w-48',
}[props.width.toString()]
})
const widthClass = computed(() => ({
48: 'w-48',
}[props.width.toString()]))
const alignmentClasses = computed(() => {
if (props.align === 'left') {
return 'ltr:origin-top-left rtl:origin-top-right start-0'
} else if (props.align === 'right') {
return 'ltr:origin-top-right rtl:origin-top-left end-0'
} else {
return 'origin-top'
}
return 'origin-top'
})
const open = ref(false)
Expand All @@ -50,7 +47,6 @@ const open = ref(false)
<slot name="trigger" />
</div>

<!-- Full Screen Dropdown Overlay -->
<div
v-show="open"
class="fixed inset-0 z-40"
Expand All @@ -69,16 +65,14 @@ const open = ref(false)
v-show="open"
class="absolute z-50 mt-2 rounded-md shadow-lg"
:class="[widthClass, alignmentClasses]"
style="display: none"
@click="open = false"
@click.stop
>
<div
class="rounded-md ring-1 ring-black ring-opacity-[0.05]"
:class="contentClasses"
class="rounded-md ring-1 ring-black ring/5"
:class="contentClasses"
>
<slot name="content" />
</div>

</div>
</Transition>
</div>
Expand Down
23 changes: 10 additions & 13 deletions resources/js/Pages/Auth/VerifyEmail.vue
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,9 @@ const form = useForm({})
const submit = () => {
form.post(route('verification.send'))
}
const verificationLinkSent = computed(
() => props.status === 'verification-link-sent',
() => props.status === 'verification-link-sent',
)
</script>

Expand All @@ -30,28 +31,24 @@ const verificationLinkSent = computed(
didn't receive the email, we will gladly send you another.
</div>

<div
v-if="verificationLinkSent"
class="mb-4 text-sm font-medium text-green-600"
>
A new verification link has been sent to the email address you
provided during registration.
<div v-if="verificationLinkSent" class="mb-4 text-sm font-medium text-green-600">
A new verification link has been sent to the email address you provided during registration.
</div>

<form @submit.prevent="submit">
<div class="mt-4 flex items-center justify-between">
<PrimaryButton
:class="{ 'opacity-25': form.processing }"
:disabled="form.processing"
:class="{ 'opacity-25': form.processing }"
:disabled="form.processing"
>
Resend Verification Email
</PrimaryButton>

<Link
:href="route('logout')"
method="post"
as="button"
class="rounded-md text-sm text-gray-600 underline hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
:href="route('logout')"
method="post"
as="button"
class="rounded-md text-sm text-gray-600 underline hover:text-gray-900 focus:outline-none focus:ring-2 focus:ring-indigo-500 focus:ring-offset-2"
>
Log Out
</Link>
Expand Down
14 changes: 7 additions & 7 deletions resources/js/Pages/Profile/Edit.vue
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ defineProps({
<AuthenticatedLayout>
<template #header>
<h2
class="text-xl font-semibold leading-tight text-gray-800"
class="text-xl font-semibold leading-tight text-gray-800"
>
Profile
</h2>
Expand All @@ -31,23 +31,23 @@ defineProps({
<div class="py-12">
<div class="mx-auto max-w-7xl space-y-6 sm:px-6 lg:px-8">
<div
class="bg-white p-4 shadow sm:rounded-lg sm:p-8"
class="bg-white p-4 shadow sm:rounded-lg sm:p-8"
>
<UpdateProfileInformationForm
:must-verify-email="mustVerifyEmail"
:status="status"
class="max-w-xl"
:must-verify-email="mustVerifyEmail"
:status="status"
class="max-w-xl"
/>
</div>

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

<div
class="bg-white p-4 shadow sm:rounded-lg sm:p-8"
class="bg-white p-4 shadow sm:rounded-lg sm:p-8"
>
<DeleteUserForm class="max-w-xl" />
</div>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,3 @@ const form = useForm({
</form>
</section>
</template>

1 change: 0 additions & 1 deletion resources/js/app.ts
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
import '../css/app.css'
import './bootstrap'

import { createInertiaApp } from '@inertiajs/vue3'
import { resolvePageComponent } from 'laravel-vite-plugin/inertia-helpers'
import { createApp, h } from 'vue'
Expand Down

0 comments on commit 3fac8f8

Please sign in to comment.