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
4 changes: 2 additions & 2 deletions resources/js/components/DeleteUser.vue
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<script setup lang="ts">
import ProfileController from '@/actions/App/Http/Controllers/Settings/ProfileController';
import { Form } from '@inertiajs/vue3';
import { ref } from 'vue';
import { useTemplateRef } from 'vue';

// Components
import HeadingSmall from '@/components/HeadingSmall.vue';
Expand All @@ -20,7 +20,7 @@ import {
import { Input } from '@/components/ui/input';
import { Label } from '@/components/ui/label';

const passwordInput = ref<InstanceType<typeof Input> | null>(null);
const passwordInput = useTemplateRef('passwordInput');
</script>

<template>
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/TwoFactorRecoveryCodes.vue
Original file line number Diff line number Diff line change
Expand Up @@ -12,11 +12,11 @@ import { useTwoFactorAuth } from '@/composables/useTwoFactorAuth';
import { regenerateRecoveryCodes } from '@/routes/two-factor';
import { Form } from '@inertiajs/vue3';
import { Eye, EyeOff, LockKeyhole, RefreshCw } from 'lucide-vue-next';
import { nextTick, onMounted, ref } from 'vue';
import { nextTick, onMounted, ref, useTemplateRef } from 'vue';

const { recoveryCodesList, fetchRecoveryCodes, errors } = useTwoFactorAuth();
const isRecoveryCodesVisible = ref<boolean>(false);
const recoveryCodeSectionRef = ref<HTMLDivElement | null>(null);
const recoveryCodeSectionRef = useTemplateRef('recoveryCodeSectionRef');

const toggleRecoveryCodesVisibility = async () => {
if (!isRecoveryCodesVisible.value && !recoveryCodesList.value.length) {
Expand Down
4 changes: 2 additions & 2 deletions resources/js/components/TwoFactorSetupModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ 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 { computed, nextTick, ref, watch } from 'vue';
import { computed, nextTick, ref, useTemplateRef, watch } from 'vue';

interface Props {
requiresConfirmation: boolean;
Expand All @@ -37,7 +37,7 @@ const showVerificationStep = ref(false);
const code = ref<number[]>([]);
const codeValue = computed<string>(() => code.value.join(''));

const pinInputContainerRef = ref<HTMLElement | null>(null);
const pinInputContainerRef = useTemplateRef('pinInputContainerRef');

const modalConfig = computed<{
title: string;
Expand Down
6 changes: 0 additions & 6 deletions resources/js/pages/settings/Password.vue
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ import AppLayout from '@/layouts/AppLayout.vue';
import SettingsLayout from '@/layouts/settings/Layout.vue';
import { edit } from '@/routes/user-password';
import { Form, Head } from '@inertiajs/vue3';
import { ref } from 'vue';

import HeadingSmall from '@/components/HeadingSmall.vue';
import { Button } from '@/components/ui/button';
Expand All @@ -19,9 +18,6 @@ const breadcrumbItems: BreadcrumbItem[] = [
href: edit().url,
},
];

const passwordInput = ref<HTMLInputElement | null>(null);
const currentPasswordInput = ref<HTMLInputElement | null>(null);
</script>

<template>
Expand Down Expand Up @@ -53,7 +49,6 @@ const currentPasswordInput = ref<HTMLInputElement | null>(null);
<Label for="current_password">Current password</Label>
<Input
id="current_password"
ref="currentPasswordInput"
name="current_password"
type="password"
class="mt-1 block w-full"
Expand All @@ -67,7 +62,6 @@ const currentPasswordInput = ref<HTMLInputElement | null>(null);
<Label for="password">New password</Label>
<Input
id="password"
ref="passwordInput"
name="password"
type="password"
class="mt-1 block w-full"
Expand Down