@@ -6,11 +6,12 @@ import { Button } from '@/shared/ui/button'
66import { useEnhancedToast } from ' @/shared/composables/useEnhancedToast'
77import type { ResetPreview } from ' ../types'
88import { Badge } from ' @/shared/ui/badge'
9+ import { Skeleton } from ' @/shared/ui/skeleton'
910
1011const queryClient = useQueryClient ()
1112const { showSuccess } = useEnhancedToast ()
1213
13- const { data : preview } = useQuery ({
14+ const { data : preview, isLoading } = useQuery ({
1415 queryKey: [' resetPreview' ],
1516 queryFn : () => resetDatabase (true ),
1617 select : data => (data as ResetPreview ).would_delete ,
@@ -35,24 +36,35 @@ const { mutate: handleReset, isPending: isResetting } = useMutation({
3536 <div class =" flex flex-wrap items-center gap-4" >
3637 <Button variant =" destructive" :disabled =" isResetting" @click =" handleReset" > Reset </Button >
3738 <div
38- class =" text-muted-foreground flex flex-wrap items-center gap-2 text-xs transition-opacity duration-300"
39+ v-if =" !isLoading"
40+ class =" text-muted-foreground flex flex-wrap items-center gap-2 font-mono text-xs transition-opacity duration-300"
3941 >
40- <Badge variant =" outline" class =" min-h-[1.5rem] min-w-[14ch] text-center font-mono " >
42+ <Badge variant =" outline" class =" min-h-[1.5rem] min-w-[14ch] text-center" >
4143 <Transition name =" fade-slide" mode =" out-in" >
4244 <span v-if =" preview" :key =" preview.events" >{{ preview.events }} events</span >
4345 </Transition >
4446 </Badge >
45- <Badge variant =" outline" class =" min-h-[1.5rem] min-w-[14ch] text-center font-mono" >
47+
48+ <Badge variant =" outline" class =" min-h-[1.5rem] min-w-[14ch] text-center" >
4649 <Transition name =" fade-slide" mode =" out-in" >
4750 <span v-if =" preview" :key =" preview.fields" >{{ preview.fields }} fields</span >
4851 </Transition >
4952 </Badge >
50- <Badge variant =" outline" class =" min-h-[1.5rem] min-w-[14ch] text-center font-mono" >
53+
54+ <Badge variant =" outline" class =" min-h-[1.5rem] min-w-[14ch] text-center" >
5155 <Transition name =" fade-slide" mode =" out-in" >
5256 <span v-if =" preview" :key =" preview.tags" >{{ preview.tags }} tags</span >
5357 </Transition >
5458 </Badge >
5559 </div >
60+ <div
61+ v-if =" isLoading"
62+ class =" text-muted-foreground flex flex-wrap items-center gap-2 font-mono text-xs transition-opacity duration-300"
63+ >
64+ <Skeleton class =" h-[1.5rem] w-[14ch] rounded-md" />
65+ <Skeleton class =" h-[1.5rem] w-[14ch] rounded-md" />
66+ <Skeleton class =" h-[1.5rem] w-[14ch] rounded-md" />
67+ </div >
5668 </div >
5769 </template >
5870 </SwitchboardSection >
0 commit comments