Skip to content

Commit 645bb60

Browse files
committed
feat: auth form styling
1 parent f0498d5 commit 645bb60

4 files changed

Lines changed: 15 additions & 7 deletions

File tree

resources/js/components/cards/SessionCard.vue

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ const agent = computed(() => {
3535
{{ session.ip_address }},
3636

3737
<span v-if="session.is_current" class="font-semibold text-green-500 animate-pulse ms-1">
38-
<span class="session-state-indicator recent rounded bg-green-500 size-2 inline-block animate-pulse"></span>
38+
<span class="recent rounded bg-green-500 size-2 inline-block animate-pulse"></span>
3939
This device
4040
</span>
4141
<span v-else>Last active {{ session.last_active }}</span>
@@ -45,7 +45,7 @@ const agent = computed(() => {
4545
</template>
4646

4747
<style lang="css" scoped>
48-
.session-state-indicator.recent {
49-
box-shadow: 0 0 10px rgba(108, 198, 68, 0.5);
48+
.recent {
49+
box-shadow: 0 0 4px rgba(108, 198, 68, 0.5);
5050
}
5151
</style>
Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,14 @@
1+
<script setup lang="ts">
2+
defineProps<{ footerClass?: string }>();
3+
</script>
14
<template>
25
<form class="flex flex-col gap-4">
36
<slot></slot>
47

5-
<slot name="footer"></slot>
8+
<template v-if="$slots.footer">
9+
<footer :class="[`mt-4`, footerClass]">
10+
<slot name="footer"></slot>
11+
</footer>
12+
</template>
613
</form>
714
</template>

resources/js/components/forms/RecoveryForm.vue

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,14 +39,13 @@ const handleSubmit = async () => {
3939
</script>
4040
<template>
4141
<BaseForm @submit.prevent="handleSubmit">
42-
{{ form.processing }}
4342
<FormItem v-for="(field, index) in fields" :key="index">
4443
<FormInputLabel :field="field" />
4544
<FormInput v-model="form.fields[field.name]" :field="field" class="!mt-0" />
4645
<FormErrorList :errors="form.errors" :field-name="field.name" />
4746
</FormItem>
4847

49-
<ButtonForm variant="auth" type="button" @click="handleSubmit" :disabled="form.processing" class="!justify-center !capitalize">Email password reset link</ButtonForm>
48+
<ButtonForm variant="auth" type="button" @click="handleSubmit" :disabled="form.processing" class="!justify-center !capitalize w-full">Email password reset link</ButtonForm>
5049
</BaseForm>
5150
<span class="mx-auto text-gray-600 dark:text-gray-400">
5251
Or, return to

resources/js/components/forms/ResetPassword.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,8 @@ const handleSubmit = async () => {
7777
<FormErrorList :errors="form.errors" :field-name="field.name" />
7878
</FormItem>
7979

80-
<ButtonForm variant="auth" type="button" @click="handleSubmit" :disabled="form.processing" class="!justify-center !capitalize">Reset Password</ButtonForm>
80+
<template #footer>
81+
<ButtonForm variant="auth" type="button" @click="handleSubmit" :disabled="form.processing" class="!justify-center !capitalize w-full">Reset Password</ButtonForm>
82+
</template>
8183
</BaseForm>
8284
</template>

0 commit comments

Comments
 (0)