File tree 3 files changed +36
-24
lines changed
3 files changed +36
-24
lines changed Original file line number Diff line number Diff line change
1
+ <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 =" animate-pulse" >
9
+ <div class =" w-16 h-16 bg-gray-200 rounded-2xl" />
10
+ </div >
11
+ <div >
12
+ <h3 class =" animate-pulse text-lg mt-1" >
13
+ <span class =" inline-block min-h-[1em] w-[110px] flex-auto cursor-wait bg-gray-200 align-middle opacity-50 rounded" />
14
+ </h3 >
15
+ <p class =" animate-pulse text-sm text-black/50" >
16
+ <span class =" inline-block min-h-[1em] w-[160px] flex-auto cursor-wait bg-gray-200 align-middle opacity-50 rounded" />
17
+ </p >
18
+ </div >
19
+ </div >
20
+ </template >
21
+ </Suspense >
22
+ </template >
23
+
24
+ <script setup lang="ts">
25
+ import { capitalize } from ' vue'
26
+ import type { BaseService } from ' ~/types'
27
+
28
+ const props = defineProps <BaseService >()
29
+
30
+ const type = capitalize (props .type || ' base' )
31
+ const component = defineAsyncComponent (() => import (` ~/components/service/${type }.vue ` ))
32
+ </script >
Original file line number Diff line number Diff line change 1
1
<template >
2
2
<div class =" p-4 flex gap-4" >
3
3
<div class =" flex-shrink-0 flex" >
4
- <a :href =" link" :title =" title" class =" self-center" >
4
+ <a :href =" link" :title =" title" class =" self-center w-16 h-16 overflow-hidden " >
5
5
<slot name =" icon" >
6
- <ServiceIcon v-bind = " icon " / >
6
+ <img src = " http://localhost:8090/icons/authelia.png " :alt = " title " class = " block bg-contain h-full w-full rounded-2xl border border-black/5 " >
7
7
</slot >
8
8
</a >
9
9
</div >
22
22
</template >
23
23
24
24
<script setup lang="ts">
25
- export interface Props {
26
- title: string
27
- description: string
28
- link: string
29
- icon: {
30
- type: ' solid' | ' gradient'
31
- value: string
32
- }
33
- }
25
+ import type { BaseService } from ' ~/types'
34
26
35
- defineProps <Props >()
27
+ defineProps <BaseService >()
36
28
</script >
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments