@@ -3,9 +3,9 @@ import InputError from '@/components/InputError.vue';
33import { Button } from ' @/components/ui/button' ;
44import { Dialog , DialogContent , DialogDescription , DialogHeader , DialogTitle } from ' @/components/ui/dialog' ;
55import { PinInput , PinInputGroup , PinInputSlot } from ' @/components/ui/pin-input' ;
6- import { useClipboard } from ' @/composables/useClipboard' ;
76import { useTwoFactorAuth } from ' @/composables/useTwoFactorAuth' ;
87import { Form } from ' @inertiajs/vue3' ;
8+ import { useClipboard } from ' @vueuse/core' ;
99import { Check , Copy , Loader2 , ScanLine } from ' lucide-vue-next' ;
1010import { computed , nextTick , ref , watch } from ' vue' ;
1111
@@ -22,7 +22,7 @@ interface Emits {
2222const props = defineProps <Props >();
2323const emit = defineEmits <Emits >();
2424
25- const { recentlyCopied, copyToClipboard } = useClipboard ();
25+ const { copy, copied } = useClipboard ();
2626const { qrCodeSvg, manualSetupKey, fetchSetupData } = useTwoFactorAuth ();
2727
2828const showVerificationStep = ref (false );
@@ -133,11 +133,8 @@ watch(
133133 </div >
134134 <template v-else >
135135 <input type =" text" readonly :value =" manualSetupKey" class =" h-full w-full bg-background p-3 text-foreground" />
136- <button
137- @click =" copyToClipboard(manualSetupKey || '')"
138- class =" relative block h-auto border-l border-border px-3 hover:bg-muted"
139- >
140- <Check v-if =" recentlyCopied" class =" w-4 text-green-500" />
136+ <button @click =" copy(manualSetupKey || '')" class =" relative block h-auto border-l border-border px-3 hover:bg-muted" >
137+ <Check v-if =" copied" class =" w-4 text-green-500" />
141138 <Copy v-else class =" w-4" />
142139 </button >
143140 </template >
0 commit comments