File tree Expand file tree Collapse file tree 3 files changed +3
-25
lines changed
Expand file tree Collapse file tree 3 files changed +3
-25
lines changed Original file line number Diff line number Diff line change 11<template >
2- <Suspense >
3- <template #default >
4- <Component :is =" component" v-bind =" props" />
5- </template >
6- <template #fallback >
7- <div class =" p-4 flex gap-4" >
8- <div class =" flex-shrink-0 flex" >
9- <div class =" self-center w-16 h-16 overflow-hidden rounded-2xl border border-black/5 animate-pulse" >
10- <div class =" bg-fg-dimmed h-full w-full" />
11- </div >
12- </div >
13- <div >
14- <h3 class =" animate-pulse text-lg mt-1" >
15- <span class =" inline-block min-h-[1em] w-[110px] flex-auto cursor-wait bg-fg-dimmed align-middle opacity-50 rounded" />
16- </h3 >
17- <p class =" animate-pulse text-sm text-black/50" >
18- <span class =" inline-block min-h-[1em] w-[160px] flex-auto cursor-wait bg-fg-dimmed align-middle opacity-50 rounded" />
19- </p >
20- </div >
21- </div >
22- </template >
23- </Suspense >
2+ <Component :is =" component" v-bind =" props" />
243</template >
254
265<script setup lang="ts">
Original file line number Diff line number Diff line change 11<template >
22 <ServiceBase v-bind =" props" >
33 <template #description >
4- <template v-if =" data && data ? .time >= 0 " >
4+ <template v-if =" data && data .time >= 0 " >
55 {{ $t('service.ping.description') }} <span class =" border-b border-dashed" >{{ data.time }} {{ $t('service.ping.units') }}</span >
66 </template >
77 <template v-else >
@@ -16,7 +16,7 @@ import type { PingService } from '~/types/services'
1616
1717const props = defineProps <PingService >()
1818
19- const { data, refresh } = await useFetch <{ time : number }> (' /api/services/ping' , { query: { id: props .id } })
19+ const { data, refresh } = useFetch (' /api/services/ping' , { query: { id: props .id } })
2020const { pause } = useIntervalFn (refresh , props ?.options ?.interval || 10000 , { immediate: true })
2121
2222onBeforeUnmount (pause )
Original file line number Diff line number Diff line change 11// https://nuxt.com/docs/api/configuration/nuxt-config
22export default defineNuxtConfig ( {
3- ssr : false ,
43 modules : [
54 '@nuxtjs/tailwindcss' ,
65 '@nuxtjs/color-mode' ,
You can’t perform that action at this time.
0 commit comments