Avoid optional Fortify route imports
This commit is contained in:
@@ -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