Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions resources/js/components/TwoFactorSetupModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
import AlertError from '@/components/AlertError.vue';
import InputError from '@/components/InputError.vue';
import { Button } from '@/components/ui/button';
import { Spinner } from '@/components/ui/spinner';
import {
Dialog,
DialogContent,
Expand All @@ -18,7 +19,7 @@ import { useTwoFactorAuth } from '@/composables/useTwoFactorAuth';
import { confirm } from '@/routes/two-factor';
import { Form } from '@inertiajs/vue3';
import { useClipboard } from '@vueuse/core';
import { Check, Copy, Loader2, ScanLine } from 'lucide-vue-next';
import { Check, Copy, ScanLine } from 'lucide-vue-next';
import { computed, nextTick, ref, useTemplateRef, watch } from 'vue';

interface Props {
Expand Down Expand Up @@ -163,7 +164,7 @@ watch(
v-if="!qrCodeSvg"
class="absolute inset-0 z-10 flex aspect-square h-auto w-full animate-pulse items-center justify-center bg-background"
>
<Loader2 class="size-6 animate-spin" />
<Spinner class="size-6" />
</div>
<div
v-else
Expand Down Expand Up @@ -204,7 +205,7 @@ watch(
v-if="!manualSetupKey"
class="flex h-full w-full items-center justify-center bg-muted p-3"
>
<Loader2 class="size-4 animate-spin" />
<Spinner />
</div>
<template v-else>
<input
Expand Down
17 changes: 17 additions & 0 deletions resources/js/components/ui/spinner/Spinner.vue
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
<script setup lang="ts">
import type { HTMLAttributes } from "vue"
import { Loader2Icon } from "lucide-vue-next"
import { cn } from "@/lib/utils"
const props = defineProps<{
class?: HTMLAttributes["class"]
}>()
</script>

<template>
<Loader2Icon
role="status"
aria-label="Loading"
:class="cn('size-4 animate-spin', props.class)"
/>
</template>
1 change: 1 addition & 0 deletions resources/js/components/ui/spinner/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as Spinner } from "./Spinner.vue"
7 changes: 2 additions & 5 deletions resources/js/pages/auth/ConfirmPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import InputError from '@/components/InputError.vue';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Spinner } from '@/components/ui/spinner';
import AuthLayout from '@/layouts/AuthLayout.vue';
import { store } from '@/routes/password/confirm';
import { Form, Head } from '@inertiajs/vue3';
import { LoaderCircle } from 'lucide-vue-next';
</script>

<template>
Expand Down Expand Up @@ -43,10 +43,7 @@ import { LoaderCircle } from 'lucide-vue-next';
:disabled="processing"
data-test="confirm-password-button"
>
<LoaderCircle
v-if="processing"
class="h-4 w-4 animate-spin"
/>
<Spinner v-if="processing" />
Confirm Password
</Button>
</div>
Expand Down
7 changes: 2 additions & 5 deletions resources/js/pages/auth/ForgotPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import TextLink from '@/components/TextLink.vue';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Spinner } from '@/components/ui/spinner';
import AuthLayout from '@/layouts/AuthLayout.vue';
import { login } from '@/routes';
import { email } from '@/routes/password';
import { Form, Head } from '@inertiajs/vue3';
import { LoaderCircle } from 'lucide-vue-next';

defineProps<{
status?: string;
Expand Down Expand Up @@ -50,10 +50,7 @@ defineProps<{
:disabled="processing"
data-test="email-password-reset-link-button"
>
<LoaderCircle
v-if="processing"
class="h-4 w-4 animate-spin"
/>
<Spinner v-if="processing" />
Email password reset link
</Button>
</div>
Expand Down
7 changes: 2 additions & 5 deletions resources/js/pages/auth/Login.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,12 @@ import { Button } from '@/components/ui/button';
import { Checkbox } from '@/components/ui/checkbox';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Spinner } from '@/components/ui/spinner';
import AuthBase from '@/layouts/AuthLayout.vue';
import { register } from '@/routes';
import { store } from '@/routes/login';
import { request } from '@/routes/password';
import { Form, Head } from '@inertiajs/vue3';
import { LoaderCircle } from 'lucide-vue-next';

defineProps<{
status?: string;
Expand Down Expand Up @@ -93,10 +93,7 @@ defineProps<{
:disabled="processing"
data-test="login-button"
>
<LoaderCircle
v-if="processing"
class="h-4 w-4 animate-spin"
/>
<Spinner v-if="processing" />
Log in
</Button>
</div>
Expand Down
7 changes: 2 additions & 5 deletions resources/js/pages/auth/Register.vue
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@ import TextLink from '@/components/TextLink.vue';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Spinner } from '@/components/ui/spinner';
import AuthBase from '@/layouts/AuthLayout.vue';
import { login } from '@/routes';
import { store } from '@/routes/register';
import { Form, Head } from '@inertiajs/vue3';
import { LoaderCircle } from 'lucide-vue-next';
</script>

<template>
Expand Down Expand Up @@ -89,10 +89,7 @@ import { LoaderCircle } from 'lucide-vue-next';
:disabled="processing"
data-test="register-user-button"
>
<LoaderCircle
v-if="processing"
class="h-4 w-4 animate-spin"
/>
<Spinner v-if="processing" />
Create account
</Button>
</div>
Expand Down
7 changes: 2 additions & 5 deletions resources/js/pages/auth/ResetPassword.vue
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ import InputError from '@/components/InputError.vue';
import { Button } from '@/components/ui/button';
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';
import { Spinner } from '@/components/ui/spinner';
import AuthLayout from '@/layouts/AuthLayout.vue';
import { update } from '@/routes/password';
import { Form, Head } from '@inertiajs/vue3';
import { LoaderCircle } from 'lucide-vue-next';
import { ref } from 'vue';

const props = defineProps<{
Expand Down Expand Up @@ -80,10 +80,7 @@ const inputEmail = ref(props.email);
:disabled="processing"
data-test="reset-password-button"
>
<LoaderCircle
v-if="processing"
class="h-4 w-4 animate-spin"
/>
<Spinner v-if="processing" />
Reset password
</Button>
</div>
Expand Down
4 changes: 2 additions & 2 deletions resources/js/pages/auth/VerifyEmail.vue
Original file line number Diff line number Diff line change
@@ -1,11 +1,11 @@
<script setup lang="ts">
import TextLink from '@/components/TextLink.vue';
import { Button } from '@/components/ui/button';
import { Spinner } from '@/components/ui/spinner';
import AuthLayout from '@/layouts/AuthLayout.vue';
import { logout } from '@/routes';
import { send } from '@/routes/verification';
import { Form, Head } from '@inertiajs/vue3';
import { LoaderCircle } from 'lucide-vue-next';

defineProps<{
status?: string;
Expand Down Expand Up @@ -33,7 +33,7 @@ defineProps<{
v-slot="{ processing }"
>
<Button :disabled="processing" variant="secondary">
<LoaderCircle v-if="processing" class="h-4 w-4 animate-spin" />
<Spinner v-if="processing" />
Resend verification email
</Button>

Expand Down