Avoid optional Fortify route imports
This commit is contained in:
@@ -8,10 +8,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 { fortifyRoutes } from '@/lib/fortify';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import SettingsLayout from '@/layouts/settings/Layout.vue';
|
||||
import { edit } from '@/routes/profile/index';
|
||||
import { send } from '@/routes/verification';
|
||||
import type { BreadcrumbItem } from '@/types';
|
||||
|
||||
type Props = {
|
||||
@@ -84,7 +84,8 @@ const user = computed(() => page.props.auth.user);
|
||||
<p class="text-muted-foreground -mt-4 text-sm">
|
||||
Your email address is unverified.
|
||||
<Link
|
||||
:href="send()"
|
||||
:href="fortifyRoutes.verification.send"
|
||||
method="post"
|
||||
as="button"
|
||||
class="text-foreground hover:decoration-current! underline decoration-neutral-300 underline-offset-4 transition-colors duration-300 ease-out dark:decoration-neutral-500"
|
||||
>
|
||||
|
||||
@@ -11,10 +11,10 @@ import TwoFactorSetupModal from '@/components/TwoFactorSetupModal.vue';
|
||||
import { Button } from '@/components/ui/button';
|
||||
import { Label } from '@/components/ui/label';
|
||||
import { useTwoFactorAuth } from '@/composables/useTwoFactorAuth';
|
||||
import { fortifyRoutes } from '@/lib/fortify';
|
||||
import AppLayout from '@/layouts/AppLayout.vue';
|
||||
import SettingsLayout from '@/layouts/settings/Layout.vue';
|
||||
import { edit } from '@/routes/security/index';
|
||||
import { disable, enable } from '@/routes/two-factor';
|
||||
import type { BreadcrumbItem } from '@/types';
|
||||
|
||||
type Props = {
|
||||
@@ -175,7 +175,8 @@ onUnmounted(() => clearTwoFactorAuthData());
|
||||
</Button>
|
||||
<Form
|
||||
v-else
|
||||
v-bind="enable.form()"
|
||||
:action="fortifyRoutes.twoFactor.enable"
|
||||
method="post"
|
||||
@success="showSetupModal = true"
|
||||
#default="{ processing }"
|
||||
>
|
||||
@@ -197,7 +198,11 @@ onUnmounted(() => clearTwoFactorAuthData());
|
||||
</p>
|
||||
|
||||
<div class="relative inline">
|
||||
<Form v-bind="disable.form()" #default="{ processing }">
|
||||
<Form
|
||||
:action="fortifyRoutes.twoFactor.disable"
|
||||
method="delete"
|
||||
#default="{ processing }"
|
||||
>
|
||||
<Button
|
||||
variant="destructive"
|
||||
type="submit"
|
||||
|
||||
Reference in New Issue
Block a user