@finema/finework-layer 0.2.18 → 0.2.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.husky/pre-commit +1 -1
- package/.playground/app/pages/layout-admin/[id]/index.vue +145 -145
- package/.playground/app/pages/layout-admin.vue +130 -130
- package/.playground/app/pages/submenu/layout-admin.vue +210 -210
- package/.vscode/extensions.json +26 -26
- package/CHANGELOG.md +167 -159
- package/app/app.config.ts +35 -35
- package/app/app.vue +10 -10
- package/app/components/Button/ActionIcon.vue +29 -29
- package/app/components/Button/Back.vue +22 -22
- package/app/components/InfoItemList.vue +202 -202
- package/app/components/Layout/Admin/Sidebar.vue +304 -304
- package/app/components/Layout/Admin/index.vue +213 -213
- package/app/components/Layout/Apps.vue +45 -45
- package/app/components/Layout/User/index.vue +99 -99
- package/app/components/StatusBox.vue +56 -56
- package/app/composables/useAuth.ts +2 -2
- package/app/composables/useRequestOptions.ts +50 -50
- package/app/error.vue +218 -218
- package/app/middleware/auth.ts +45 -0
- package/app/middleware/common.ts +12 -0
- package/app/middleware/guest.ts +7 -0
- package/app/middleware/permissions.ts +29 -0
- package/bun.lock +2730 -2730
- package/index.d.ts +16 -16
- package/nuxt.config.ts +41 -41
- package/package.json +1 -1
|
@@ -1,219 +1,219 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<div class="relative flex min-h-screen flex-1">
|
|
3
|
-
<div
|
|
4
|
-
:class="[
|
|
5
|
-
`
|
|
6
|
-
fixed inset-0 z-30 hidden w-auto
|
|
7
|
-
lg:block
|
|
8
|
-
`,
|
|
9
|
-
{
|
|
10
|
-
'max-w-[88px]': isCollapsed,
|
|
11
|
-
'max-w-[260px]': !isCollapsed,
|
|
12
|
-
},
|
|
13
|
-
]"
|
|
14
|
-
>
|
|
15
|
-
<Sidebar
|
|
16
|
-
:label="label"
|
|
17
|
-
:is-collapsed="isCollapsed"
|
|
18
|
-
:items="sidebarItems"
|
|
19
|
-
:is-group="isSidebarGroup"
|
|
20
|
-
@toggle-collapsed="isCollapsed = !isCollapsed"
|
|
21
|
-
/>
|
|
22
|
-
</div>
|
|
23
|
-
<div
|
|
24
|
-
:class="[
|
|
25
|
-
'w-full bg-gray-50',
|
|
26
|
-
{
|
|
27
|
-
'lg:pl-[88px]': isCollapsed,
|
|
28
|
-
'lg:pl-[260px]': !isCollapsed,
|
|
29
|
-
},
|
|
30
|
-
]"
|
|
31
|
-
>
|
|
32
|
-
<nav
|
|
33
|
-
class="fixed top-0 left-0 z-20 flex min-h-[64px] w-screen items-center justify-between gap-4 bg-white px-5 lg:min-h-[72px] lg:justify-end"
|
|
34
|
-
style="box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.04)"
|
|
35
|
-
>
|
|
36
|
-
<div class="flex items-center gap-4">
|
|
37
|
-
<Slideover
|
|
38
|
-
v-model:open="isShowSidebarMobile"
|
|
39
|
-
:ui="{
|
|
40
|
-
content: 'w-[80%] max-w-[260px] lg:hidden',
|
|
41
|
-
overlay: 'lg:hidden',
|
|
42
|
-
}"
|
|
43
|
-
side="left"
|
|
44
|
-
>
|
|
45
|
-
<svg
|
|
46
|
-
class="cursor-pointer lg:hidden"
|
|
47
|
-
width="19"
|
|
48
|
-
height="18"
|
|
49
|
-
viewBox="0 0 19 18"
|
|
50
|
-
fill="none"
|
|
51
|
-
xmlns="http://www.w3.org/2000/svg"
|
|
52
|
-
transform="scale(-1, 1)"
|
|
53
|
-
@click="isShowSidebarMobile = true"
|
|
54
|
-
>
|
|
55
|
-
<path
|
|
56
|
-
d="M10 18L10 16L19 16L19 18L10 18ZM6 2L6 -2.62268e-07L19 -8.30516e-07L19 2L6 2ZM-3.49691e-07 10L-4.37114e-07 8L19 8L19 10L-3.49691e-07 10Z"
|
|
57
|
-
fill="#4B5563"
|
|
58
|
-
/>
|
|
59
|
-
</svg>
|
|
60
|
-
|
|
61
|
-
<template #content>
|
|
62
|
-
<Sidebar
|
|
63
|
-
:label="label"
|
|
64
|
-
:is-collapsed="false"
|
|
65
|
-
:is-mobile="true"
|
|
66
|
-
:items="sidebarItems"
|
|
67
|
-
:is-group="isSidebarGroup"
|
|
68
|
-
@toggle-collapsed="isShowSidebarMobile = false"
|
|
69
|
-
/>
|
|
70
|
-
</template>
|
|
71
|
-
</Slideover>
|
|
72
|
-
<NuxtLink :to="routes.home.to">
|
|
73
|
-
<img
|
|
74
|
-
src="/logo-mini.png"
|
|
75
|
-
alt="logo_mini_color"
|
|
76
|
-
class="w-[126px] min-w-[126px] lg:hidden lg:w-[172px] lg:min-w-[172px]"
|
|
77
|
-
/>
|
|
78
|
-
</NuxtLink>
|
|
79
|
-
<Apps class="lg:hidden" />
|
|
80
|
-
</div>
|
|
81
|
-
|
|
82
|
-
<div class="flex items-center justify-center gap-4">
|
|
83
|
-
<DropdownMenu
|
|
84
|
-
size="xl"
|
|
85
|
-
:items="userMenuItems"
|
|
86
|
-
:content="{
|
|
87
|
-
align: 'end',
|
|
88
|
-
side: 'bottom',
|
|
89
|
-
}"
|
|
90
|
-
:ui="{
|
|
91
|
-
content: 'w-48',
|
|
92
|
-
}"
|
|
93
|
-
>
|
|
94
|
-
<div class="relative flex cursor-pointer items-center gap-2">
|
|
95
|
-
<div class="hidden flex-col justify-end text-right lg:flex">
|
|
96
|
-
<p class="font-bold">
|
|
97
|
-
{{ auth.me.value?.display_name || auth.me.value?.full_name }}
|
|
98
|
-
</p>
|
|
99
|
-
<p class="text-muted text-sm">
|
|
100
|
-
{{ auth.me.value?.email || "" }}
|
|
101
|
-
</p>
|
|
102
|
-
</div>
|
|
103
|
-
<Avatar
|
|
104
|
-
class="border-muted size-[40px] border text-2xl"
|
|
105
|
-
icon="ri:user-line"
|
|
106
|
-
:src="auth.me.value?.avatar_url || ''"
|
|
107
|
-
/>
|
|
1
|
+
<template>
|
|
2
|
+
<div class="relative flex min-h-screen flex-1">
|
|
3
|
+
<div
|
|
4
|
+
:class="[
|
|
5
|
+
`
|
|
6
|
+
fixed inset-0 z-30 hidden w-auto
|
|
7
|
+
lg:block
|
|
8
|
+
`,
|
|
9
|
+
{
|
|
10
|
+
'max-w-[88px]': isCollapsed,
|
|
11
|
+
'max-w-[260px]': !isCollapsed,
|
|
12
|
+
},
|
|
13
|
+
]"
|
|
14
|
+
>
|
|
15
|
+
<Sidebar
|
|
16
|
+
:label="label"
|
|
17
|
+
:is-collapsed="isCollapsed"
|
|
18
|
+
:items="sidebarItems"
|
|
19
|
+
:is-group="isSidebarGroup"
|
|
20
|
+
@toggle-collapsed="isCollapsed = !isCollapsed"
|
|
21
|
+
/>
|
|
22
|
+
</div>
|
|
23
|
+
<div
|
|
24
|
+
:class="[
|
|
25
|
+
'w-full bg-gray-50',
|
|
26
|
+
{
|
|
27
|
+
'lg:pl-[88px]': isCollapsed,
|
|
28
|
+
'lg:pl-[260px]': !isCollapsed,
|
|
29
|
+
},
|
|
30
|
+
]"
|
|
31
|
+
>
|
|
32
|
+
<nav
|
|
33
|
+
class="fixed top-0 left-0 z-20 flex min-h-[64px] w-screen items-center justify-between gap-4 bg-white px-5 lg:min-h-[72px] lg:justify-end"
|
|
34
|
+
style="box-shadow: 0px 4px 4px 0px rgba(0, 0, 0, 0.04)"
|
|
35
|
+
>
|
|
36
|
+
<div class="flex items-center gap-4">
|
|
37
|
+
<Slideover
|
|
38
|
+
v-model:open="isShowSidebarMobile"
|
|
39
|
+
:ui="{
|
|
40
|
+
content: 'w-[80%] max-w-[260px] lg:hidden',
|
|
41
|
+
overlay: 'lg:hidden',
|
|
42
|
+
}"
|
|
43
|
+
side="left"
|
|
44
|
+
>
|
|
45
|
+
<svg
|
|
46
|
+
class="cursor-pointer lg:hidden"
|
|
47
|
+
width="19"
|
|
48
|
+
height="18"
|
|
49
|
+
viewBox="0 0 19 18"
|
|
50
|
+
fill="none"
|
|
51
|
+
xmlns="http://www.w3.org/2000/svg"
|
|
52
|
+
transform="scale(-1, 1)"
|
|
53
|
+
@click="isShowSidebarMobile = true"
|
|
54
|
+
>
|
|
55
|
+
<path
|
|
56
|
+
d="M10 18L10 16L19 16L19 18L10 18ZM6 2L6 -2.62268e-07L19 -8.30516e-07L19 2L6 2ZM-3.49691e-07 10L-4.37114e-07 8L19 8L19 10L-3.49691e-07 10Z"
|
|
57
|
+
fill="#4B5563"
|
|
58
|
+
/>
|
|
59
|
+
</svg>
|
|
60
|
+
|
|
61
|
+
<template #content>
|
|
62
|
+
<Sidebar
|
|
63
|
+
:label="label"
|
|
64
|
+
:is-collapsed="false"
|
|
65
|
+
:is-mobile="true"
|
|
66
|
+
:items="sidebarItems"
|
|
67
|
+
:is-group="isSidebarGroup"
|
|
68
|
+
@toggle-collapsed="isShowSidebarMobile = false"
|
|
69
|
+
/>
|
|
70
|
+
</template>
|
|
71
|
+
</Slideover>
|
|
72
|
+
<NuxtLink :to="routes.home.to">
|
|
73
|
+
<img
|
|
74
|
+
src="/logo-mini.png"
|
|
75
|
+
alt="logo_mini_color"
|
|
76
|
+
class="w-[126px] min-w-[126px] lg:hidden lg:w-[172px] lg:min-w-[172px]"
|
|
77
|
+
/>
|
|
78
|
+
</NuxtLink>
|
|
79
|
+
<Apps class="lg:hidden" />
|
|
80
|
+
</div>
|
|
81
|
+
|
|
82
|
+
<div class="flex items-center justify-center gap-4">
|
|
83
|
+
<DropdownMenu
|
|
84
|
+
size="xl"
|
|
85
|
+
:items="userMenuItems"
|
|
86
|
+
:content="{
|
|
87
|
+
align: 'end',
|
|
88
|
+
side: 'bottom',
|
|
89
|
+
}"
|
|
90
|
+
:ui="{
|
|
91
|
+
content: 'w-48',
|
|
92
|
+
}"
|
|
93
|
+
>
|
|
94
|
+
<div class="relative flex cursor-pointer items-center gap-2">
|
|
95
|
+
<div class="hidden flex-col justify-end text-right lg:flex">
|
|
96
|
+
<p class="font-bold">
|
|
97
|
+
{{ auth.me.value?.display_name || auth.me.value?.full_name }}
|
|
98
|
+
</p>
|
|
99
|
+
<p class="text-muted text-sm">
|
|
100
|
+
{{ auth.me.value?.email || "" }}
|
|
101
|
+
</p>
|
|
102
|
+
</div>
|
|
103
|
+
<Avatar
|
|
104
|
+
class="border-muted size-[40px] border text-2xl"
|
|
105
|
+
icon="ri:user-line"
|
|
106
|
+
:src="auth.me.value?.avatar_url || ''"
|
|
107
|
+
/>
|
|
108
108
|
<Icon
|
|
109
109
|
name="i-ph:caret-down-light"
|
|
110
110
|
class="size-5"
|
|
111
|
-
/>
|
|
112
|
-
</div>
|
|
113
|
-
</DropdownMenu>
|
|
114
|
-
</div>
|
|
115
|
-
</nav>
|
|
116
|
-
<div class="w-full bg-gray-50 pt-[64px] lg:pt-[72px]">
|
|
117
|
-
<main
|
|
118
|
-
:class="[
|
|
119
|
-
'mx-auto min-h-full flex-1 px-6 py-10 lg:px-8',
|
|
120
|
-
fullScreen ? 'w-full' : 'max-w-7xl 2xl:max-w-[70%]',
|
|
121
|
-
]"
|
|
122
|
-
>
|
|
123
|
-
<Breadcrumb
|
|
124
|
-
v-if="
|
|
125
|
-
!app.pageMeta.isHideBreadcrumbs && breadcrumbsItems.length > 1
|
|
126
|
-
"
|
|
127
|
-
:items="breadcrumbsItems"
|
|
128
|
-
class="mb-6"
|
|
129
|
-
:ui="{
|
|
130
|
-
item: 'max-w-2/3',
|
|
131
|
-
list: 'w-full',
|
|
132
|
-
}"
|
|
133
|
-
/>
|
|
134
|
-
<div
|
|
135
|
-
v-if="app.pageMeta.title"
|
|
136
|
-
class="mb-4 flex flex-col justify-between gap-1 md:mb-6 md:gap-4 lg:flex-row lg:items-start"
|
|
137
|
-
>
|
|
138
|
-
<div class="flex flex-1 flex-col">
|
|
139
|
-
<h1
|
|
140
|
-
class="text-3xl font-bold wrap-break-word lg:max-w-2/3"
|
|
141
|
-
:title="app.pageMeta.title"
|
|
142
|
-
>
|
|
143
|
-
{{ app.pageMeta.title }}
|
|
144
|
-
<span id="page-title-extra" />
|
|
145
|
-
</h1>
|
|
146
|
-
|
|
147
|
-
<div id="page-subtitle" />
|
|
111
|
+
/>
|
|
112
|
+
</div>
|
|
113
|
+
</DropdownMenu>
|
|
114
|
+
</div>
|
|
115
|
+
</nav>
|
|
116
|
+
<div class="w-full bg-gray-50 pt-[64px] lg:pt-[72px]">
|
|
117
|
+
<main
|
|
118
|
+
:class="[
|
|
119
|
+
'mx-auto min-h-full flex-1 px-6 py-10 lg:px-8',
|
|
120
|
+
fullScreen ? 'w-full' : 'max-w-7xl 2xl:max-w-[70%]',
|
|
121
|
+
]"
|
|
122
|
+
>
|
|
123
|
+
<Breadcrumb
|
|
124
|
+
v-if="
|
|
125
|
+
!app.pageMeta.isHideBreadcrumbs && breadcrumbsItems.length > 1
|
|
126
|
+
"
|
|
127
|
+
:items="breadcrumbsItems"
|
|
128
|
+
class="mb-6"
|
|
129
|
+
:ui="{
|
|
130
|
+
item: 'max-w-2/3',
|
|
131
|
+
list: 'w-full',
|
|
132
|
+
}"
|
|
133
|
+
/>
|
|
134
|
+
<div
|
|
135
|
+
v-if="app.pageMeta.title"
|
|
136
|
+
class="mb-4 flex flex-col justify-between gap-1 md:mb-6 md:gap-4 lg:flex-row lg:items-start"
|
|
137
|
+
>
|
|
138
|
+
<div class="flex flex-1 flex-col">
|
|
139
|
+
<h1
|
|
140
|
+
class="text-3xl font-bold wrap-break-word lg:max-w-2/3"
|
|
141
|
+
:title="app.pageMeta.title"
|
|
142
|
+
>
|
|
143
|
+
{{ app.pageMeta.title }}
|
|
144
|
+
<span id="page-title-extra" />
|
|
145
|
+
</h1>
|
|
146
|
+
|
|
147
|
+
<div id="page-subtitle" />
|
|
148
148
|
<p
|
|
149
149
|
v-if="app.pageMeta.sub_title"
|
|
150
150
|
class="text-[#475467]"
|
|
151
|
-
>
|
|
152
|
-
{{ app.pageMeta.sub_title }}
|
|
153
|
-
</p>
|
|
154
|
-
</div>
|
|
155
|
-
<div id="page-header" />
|
|
156
|
-
</div>
|
|
157
|
-
<slot />
|
|
158
|
-
</main>
|
|
159
|
-
</div>
|
|
160
|
-
</div>
|
|
161
|
-
</div>
|
|
162
|
-
</template>
|
|
163
|
-
|
|
164
|
-
<script lang="ts" setup>
|
|
165
|
-
import type { DropdownMenuItem, NavigationMenuItem } from '@nuxt/ui'
|
|
166
|
-
import { computed } from 'vue'
|
|
167
|
-
import Sidebar from './Sidebar.vue'
|
|
168
|
-
import Apps from '../Apps.vue'
|
|
169
|
-
|
|
170
|
-
defineProps<{
|
|
171
|
-
label: string
|
|
172
|
-
sidebarItems: NavigationMenuItem[]
|
|
173
|
-
isSidebarGroup?: boolean
|
|
174
|
-
fullScreen?: boolean
|
|
175
|
-
}>()
|
|
176
|
-
|
|
177
|
-
const app = useApp()
|
|
178
|
-
const isShowSidebarMobile = ref(false)
|
|
179
|
-
const auth = useAuth()
|
|
180
|
-
// Cookie to store user preference for desktop
|
|
181
|
-
const isCollapsed = useCookie<boolean>('app.admin.sidebar.isCollapsed', {
|
|
182
|
-
default: () => false,
|
|
183
|
-
path: '/',
|
|
184
|
-
})
|
|
185
|
-
|
|
186
|
-
const userMenuItems: DropdownMenuItem[] = [
|
|
187
|
-
{
|
|
188
|
-
label: 'View profile',
|
|
189
|
-
icon: 'i-lucide-user',
|
|
190
|
-
to: routes.account.profile.to,
|
|
191
|
-
},
|
|
192
|
-
|
|
193
|
-
{
|
|
194
|
-
label: routes.logout.label,
|
|
195
|
-
icon: 'i-lucide-log-out',
|
|
196
|
-
to: routes.logout.to,
|
|
197
|
-
external: true,
|
|
198
|
-
},
|
|
199
|
-
]
|
|
200
|
-
|
|
201
|
-
const breadcrumbsItems = computed(() => {
|
|
202
|
-
const list = app.pageMeta.breadcrumbs || []
|
|
203
|
-
if (!list.length) return []
|
|
204
|
-
|
|
205
|
-
const [first, ...rest] = list
|
|
206
|
-
const home = {
|
|
207
|
-
label: '',
|
|
208
|
-
icon: 'ph:house-line',
|
|
209
|
-
to: first?.to,
|
|
210
|
-
}
|
|
211
|
-
|
|
212
|
-
const extra = rest.map((item: any) => ({
|
|
213
|
-
...item,
|
|
214
|
-
icon: '',
|
|
215
|
-
}))
|
|
216
|
-
|
|
217
|
-
return [home, ...extra]
|
|
218
|
-
})
|
|
219
|
-
</script>
|
|
151
|
+
>
|
|
152
|
+
{{ app.pageMeta.sub_title }}
|
|
153
|
+
</p>
|
|
154
|
+
</div>
|
|
155
|
+
<div id="page-header" />
|
|
156
|
+
</div>
|
|
157
|
+
<slot />
|
|
158
|
+
</main>
|
|
159
|
+
</div>
|
|
160
|
+
</div>
|
|
161
|
+
</div>
|
|
162
|
+
</template>
|
|
163
|
+
|
|
164
|
+
<script lang="ts" setup>
|
|
165
|
+
import type { DropdownMenuItem, NavigationMenuItem } from '@nuxt/ui'
|
|
166
|
+
import { computed } from 'vue'
|
|
167
|
+
import Sidebar from './Sidebar.vue'
|
|
168
|
+
import Apps from '../Apps.vue'
|
|
169
|
+
|
|
170
|
+
defineProps<{
|
|
171
|
+
label: string
|
|
172
|
+
sidebarItems: NavigationMenuItem[]
|
|
173
|
+
isSidebarGroup?: boolean
|
|
174
|
+
fullScreen?: boolean
|
|
175
|
+
}>()
|
|
176
|
+
|
|
177
|
+
const app = useApp()
|
|
178
|
+
const isShowSidebarMobile = ref(false)
|
|
179
|
+
const auth = useAuth()
|
|
180
|
+
// Cookie to store user preference for desktop
|
|
181
|
+
const isCollapsed = useCookie<boolean>('app.admin.sidebar.isCollapsed', {
|
|
182
|
+
default: () => false,
|
|
183
|
+
path: '/',
|
|
184
|
+
})
|
|
185
|
+
|
|
186
|
+
const userMenuItems: DropdownMenuItem[] = [
|
|
187
|
+
{
|
|
188
|
+
label: 'View profile',
|
|
189
|
+
icon: 'i-lucide-user',
|
|
190
|
+
to: routes.account.profile.to,
|
|
191
|
+
},
|
|
192
|
+
|
|
193
|
+
{
|
|
194
|
+
label: routes.logout.label,
|
|
195
|
+
icon: 'i-lucide-log-out',
|
|
196
|
+
to: routes.logout.to,
|
|
197
|
+
external: true,
|
|
198
|
+
},
|
|
199
|
+
]
|
|
200
|
+
|
|
201
|
+
const breadcrumbsItems = computed(() => {
|
|
202
|
+
const list = app.pageMeta.breadcrumbs || []
|
|
203
|
+
if (!list.length) return []
|
|
204
|
+
|
|
205
|
+
const [first, ...rest] = list
|
|
206
|
+
const home = {
|
|
207
|
+
label: '',
|
|
208
|
+
icon: 'ph:house-line',
|
|
209
|
+
to: first?.to,
|
|
210
|
+
}
|
|
211
|
+
|
|
212
|
+
const extra = rest.map((item: any) => ({
|
|
213
|
+
...item,
|
|
214
|
+
icon: '',
|
|
215
|
+
}))
|
|
216
|
+
|
|
217
|
+
return [home, ...extra]
|
|
218
|
+
})
|
|
219
|
+
</script>
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
<template>
|
|
2
|
-
<Popover
|
|
3
|
-
:content="{
|
|
4
|
-
align: 'center',
|
|
5
|
-
side: 'bottom',
|
|
6
|
-
sideOffset: 8,
|
|
7
|
-
}"
|
|
8
|
-
>
|
|
9
|
-
<Button
|
|
10
|
-
icon="mingcute:dot-grid-line"
|
|
11
|
-
variant="ghost"
|
|
12
|
-
class="text-gray-500"
|
|
13
|
-
/>
|
|
14
|
-
|
|
15
|
-
<template #content>
|
|
16
|
-
<Card class="w-[300px]">
|
|
17
|
-
<div
|
|
18
|
-
class="grid grid-cols-3 gap-6"
|
|
19
|
-
>
|
|
20
|
-
<Button
|
|
21
|
-
v-for="item in auth.menusNavbar.value"
|
|
22
|
-
:key="item.to"
|
|
23
|
-
class="flex flex-col items-center p-0 text-center"
|
|
24
|
-
variant="link"
|
|
25
|
-
:to="item.to"
|
|
26
|
-
>
|
|
27
|
-
<div class="flex h-[42px] items-center justify-center">
|
|
28
|
-
<img
|
|
29
|
-
:src="item.icon"
|
|
30
|
-
class="h-auto w-[32px]"
|
|
31
|
-
/>
|
|
32
|
-
</div>
|
|
33
|
-
<span class="text-sm font-medium text-gray-700">
|
|
34
|
-
{{ item.label }}
|
|
35
|
-
</span>
|
|
36
|
-
</Button>
|
|
37
|
-
</div>
|
|
38
|
-
</Card>
|
|
39
|
-
</template>
|
|
40
|
-
</Popover>
|
|
41
|
-
</template>
|
|
42
|
-
|
|
43
|
-
<script lang="ts" setup>
|
|
44
|
-
const auth = useAuth()
|
|
45
|
-
</script>
|
|
1
|
+
<template>
|
|
2
|
+
<Popover
|
|
3
|
+
:content="{
|
|
4
|
+
align: 'center',
|
|
5
|
+
side: 'bottom',
|
|
6
|
+
sideOffset: 8,
|
|
7
|
+
}"
|
|
8
|
+
>
|
|
9
|
+
<Button
|
|
10
|
+
icon="mingcute:dot-grid-line"
|
|
11
|
+
variant="ghost"
|
|
12
|
+
class="text-gray-500"
|
|
13
|
+
/>
|
|
14
|
+
|
|
15
|
+
<template #content>
|
|
16
|
+
<Card class="w-[300px]">
|
|
17
|
+
<div
|
|
18
|
+
class="grid grid-cols-3 gap-6"
|
|
19
|
+
>
|
|
20
|
+
<Button
|
|
21
|
+
v-for="item in auth.menusNavbar.value"
|
|
22
|
+
:key="item.to"
|
|
23
|
+
class="flex flex-col items-center p-0 text-center"
|
|
24
|
+
variant="link"
|
|
25
|
+
:to="item.to"
|
|
26
|
+
>
|
|
27
|
+
<div class="flex h-[42px] items-center justify-center">
|
|
28
|
+
<img
|
|
29
|
+
:src="item.icon"
|
|
30
|
+
class="h-auto w-[32px]"
|
|
31
|
+
/>
|
|
32
|
+
</div>
|
|
33
|
+
<span class="text-sm font-medium text-gray-700">
|
|
34
|
+
{{ item.label }}
|
|
35
|
+
</span>
|
|
36
|
+
</Button>
|
|
37
|
+
</div>
|
|
38
|
+
</Card>
|
|
39
|
+
</template>
|
|
40
|
+
</Popover>
|
|
41
|
+
</template>
|
|
42
|
+
|
|
43
|
+
<script lang="ts" setup>
|
|
44
|
+
const auth = useAuth()
|
|
45
|
+
</script>
|