wip
This commit is contained in:
@@ -45,7 +45,6 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import {Inertia} from "@inertiajs/inertia";
|
||||
import Button from "@/components/Button.vue";
|
||||
import Input from "@/components/Input.vue";
|
||||
import FormInput from "@/components/forms/FormInput.vue";
|
||||
@@ -71,25 +70,25 @@ export default {
|
||||
|
||||
methods: {
|
||||
enable2FA() {
|
||||
Inertia.put(this.route('profile.security.two-factor-authentication.create'));
|
||||
this.$inertia.put(this.route('profile.security.two-factor-authentication.create'));
|
||||
},
|
||||
|
||||
confirm2FA() {
|
||||
Inertia.patch(this.route('profile.security.two-factor-authentication.confirm'), this.form, {
|
||||
this.$inertia.patch(this.route('profile.security.two-factor-authentication.confirm'), this.form, {
|
||||
onStart: () => this.sending = true,
|
||||
onFinish: () => this.sending = false,
|
||||
});
|
||||
},
|
||||
|
||||
regenerateRecoveryCodes() {
|
||||
Inertia.patch(this.route('profile.security.two-factor-authentication.regenerate-recovery-codes'), {}, {
|
||||
this.$inertia.patch(this.route('profile.security.two-factor-authentication.regenerate-recovery-codes'), {}, {
|
||||
onStart: () => this.sending = true,
|
||||
onFinish: () => this.sending = false,
|
||||
});
|
||||
},
|
||||
|
||||
disable2FA() {
|
||||
Inertia.delete(this.route('profile.security.two-factor-authentication.destroy'), {}, {
|
||||
this.$inertia.delete(this.route('profile.security.two-factor-authentication.destroy'), {}, {
|
||||
onStart: () => this.sending = true,
|
||||
onFinish: () => this.sending = false,
|
||||
});
|
||||
|
||||
4
resources/js/app.js
vendored
4
resources/js/app.js
vendored
@@ -1,4 +1,4 @@
|
||||
import {createInertiaApp, Head, InertiaLink} from '@inertiajs/inertia-vue3'
|
||||
import { createInertiaApp, Head, Link } from "@inertiajs/vue3";
|
||||
import {resolvePageComponent} from "laravel-vite-plugin/inertia-helpers";
|
||||
import Vue, {createApp, h} from 'vue';
|
||||
import Store from '@/store';
|
||||
@@ -27,7 +27,7 @@ createInertiaApp({
|
||||
.use(PortalVue)
|
||||
.mixin({methods: {route: window.route}})
|
||||
.mixin(mixins)
|
||||
.component('InertiaLink', InertiaLink)
|
||||
.component('InertiaLink', Link)
|
||||
.component('Head', Head)
|
||||
.mount(el);
|
||||
},
|
||||
|
||||
@@ -1,14 +1,14 @@
|
||||
<template>
|
||||
<div class="text-medium-emphasis">
|
||||
<div v-if="componentIsInertiaLink">
|
||||
<inertia-link
|
||||
<Link
|
||||
:as="componentIs"
|
||||
:href="to"
|
||||
:method="method"
|
||||
class="flex items-center w-full h-10 px-6 whitespace-nowrap text-small focus:bg-primary focus:text-on-primary hover:text-high-emphasis focus:outline-none"
|
||||
>
|
||||
<slot></slot>
|
||||
</inertia-link>
|
||||
</Link>
|
||||
</div>
|
||||
<div v-else>
|
||||
<a :href="to" class="flex items-center w-full h-10 px-6 whitespace-nowrap text-small focus:bg-primary focus:text-on-primary hover:text-high-emphasis focus:outline-none">
|
||||
@@ -19,7 +19,12 @@
|
||||
</template>
|
||||
|
||||
<script>
|
||||
import { Link } from '@inertiajs/vue3';
|
||||
|
||||
export default {
|
||||
components: {
|
||||
Link
|
||||
},
|
||||
props: {
|
||||
to: {
|
||||
type: String,
|
||||
|
||||
Reference in New Issue
Block a user