@finema/finework-layer 0.2.40 → 0.2.42
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/CHANGELOG.md +12 -0
- package/app/components/Layout/Admin/index.vue +38 -112
- package/package.json +1 -1
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,17 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
+
## [0.2.42](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.41...0.2.42) (2025-10-31)
|
|
4
|
+
|
|
5
|
+
### Bug Fixes
|
|
6
|
+
|
|
7
|
+
* layout ([120936a](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/120936a020d8a86a8a912c62734ee754e699f380))
|
|
8
|
+
|
|
9
|
+
## [0.2.41](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.40...0.2.41) (2025-10-31)
|
|
10
|
+
|
|
11
|
+
### Bug Fixes
|
|
12
|
+
|
|
13
|
+
* close filter when change path ([1155826](https://gitlab.finema.co/finema/finework/finework-frontend-layer/commit/115582692e93d88b1c9c59a6ee1b0322233c8aff))
|
|
14
|
+
|
|
3
15
|
## [0.2.40](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.39...0.2.40) (2025-10-31)
|
|
4
16
|
|
|
5
17
|
## [0.2.39](https://gitlab.finema.co/finema/finework/finework-frontend-layer/compare/0.2.38...0.2.39) (2025-10-31)
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
<template>
|
|
2
|
-
<div class="relative flex min-h-screen flex-1
|
|
2
|
+
<div class="relative flex min-h-screen flex-1">
|
|
3
3
|
<div
|
|
4
4
|
:class="[
|
|
5
5
|
`
|
|
@@ -113,96 +113,49 @@
|
|
|
113
113
|
</DropdownMenu>
|
|
114
114
|
</div>
|
|
115
115
|
</nav>
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
|
|
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 2xl:max-w-[90%]' : 'max-w-7xl 2xl:max-w-[70%]',
|
|
121
|
+
]"
|
|
121
122
|
>
|
|
122
|
-
<
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
:items="breadcrumbsItems"
|
|
133
|
-
class="mb-6"
|
|
134
|
-
:ui="{
|
|
135
|
-
item: 'max-w-2/3',
|
|
136
|
-
list: 'w-full',
|
|
137
|
-
}"
|
|
138
|
-
/>
|
|
139
|
-
<div
|
|
140
|
-
v-if="app.pageMeta.title"
|
|
141
|
-
class="mb-4 flex flex-col justify-between gap-1 md:mb-6 md:gap-4 lg:flex-row lg:items-start"
|
|
142
|
-
>
|
|
143
|
-
<div class="flex flex-1 flex-col">
|
|
144
|
-
<h1
|
|
145
|
-
class="text-3xl font-bold wrap-break-word lg:max-w-2/3"
|
|
146
|
-
:title="app.pageMeta.title"
|
|
147
|
-
>
|
|
148
|
-
{{ app.pageMeta.title }}
|
|
149
|
-
<span id="page-title-extra" />
|
|
150
|
-
</h1>
|
|
151
|
-
|
|
152
|
-
<div id="page-subtitle" />
|
|
153
|
-
<p
|
|
154
|
-
v-if="app.pageMeta.sub_title"
|
|
155
|
-
class="text-[#475467]"
|
|
156
|
-
>
|
|
157
|
-
{{ app.pageMeta.sub_title }}
|
|
158
|
-
</p>
|
|
159
|
-
</div>
|
|
160
|
-
<div id="page-header" />
|
|
161
|
-
</div>
|
|
162
|
-
<slot />
|
|
163
|
-
</main>
|
|
164
|
-
</div>
|
|
165
|
-
<DefineTemplate>
|
|
166
|
-
<Button
|
|
167
|
-
icon="i-heroicons-x-mark"
|
|
168
|
-
variant="ghost"
|
|
169
|
-
color="neutral"
|
|
170
|
-
class="mb-3 ml-auto flex p-0 md:mt-3"
|
|
171
|
-
@click="showFilter = false"
|
|
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
|
+
}"
|
|
172
133
|
/>
|
|
173
|
-
<div id="page-filters" />
|
|
174
|
-
</DefineTemplate>
|
|
175
|
-
<!-- แผง Filter (push ข้างๆ) Desktop -->
|
|
176
|
-
<div
|
|
177
|
-
v-if="!isMobile"
|
|
178
|
-
v-show="showFilter"
|
|
179
|
-
class="fixed top-0 right-0 hidden h-screen w-80 transform flex-col border-l border-gray-200 bg-white shadow-lg transition-transform duration-300 ease-in-out md:flex!"
|
|
180
|
-
:class="showFilter ? 'translate-x-0' : 'translate-x-full'"
|
|
181
|
-
>
|
|
182
|
-
<div class="flex-1 overflow-y-auto px-4 pt-[64px]! lg:pt-[72px]!">
|
|
183
|
-
<ReuseTemplate />
|
|
184
|
-
</div>
|
|
185
|
-
</div>
|
|
186
|
-
<!-- mobile -->
|
|
187
|
-
<Transition
|
|
188
|
-
v-else
|
|
189
|
-
name="slide-up"
|
|
190
|
-
>
|
|
191
134
|
<div
|
|
192
|
-
v-
|
|
193
|
-
class="
|
|
194
|
-
@click.self="showFilter = false"
|
|
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"
|
|
195
137
|
>
|
|
196
|
-
<div
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
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
|
+
<p
|
|
149
|
+
v-if="app.pageMeta.sub_title"
|
|
150
|
+
class="text-[#475467]"
|
|
151
|
+
>
|
|
152
|
+
{{ app.pageMeta.sub_title }}
|
|
153
|
+
</p>
|
|
203
154
|
</div>
|
|
155
|
+
<div id="page-header" />
|
|
204
156
|
</div>
|
|
205
|
-
|
|
157
|
+
<slot />
|
|
158
|
+
</main>
|
|
206
159
|
</div>
|
|
207
160
|
</div>
|
|
208
161
|
</div>
|
|
@@ -213,7 +166,6 @@ import type { DropdownMenuItem, NavigationMenuItem } from '@nuxt/ui'
|
|
|
213
166
|
import { computed } from 'vue'
|
|
214
167
|
import Sidebar from './Sidebar.vue'
|
|
215
168
|
import Apps from '../Apps.vue'
|
|
216
|
-
import { createReusableTemplate, useBreakpoints } from '@vueuse/core'
|
|
217
169
|
|
|
218
170
|
defineProps<{
|
|
219
171
|
label: string
|
|
@@ -222,17 +174,9 @@ defineProps<{
|
|
|
222
174
|
fullScreen?: boolean
|
|
223
175
|
}>()
|
|
224
176
|
|
|
225
|
-
const [DefineTemplate, ReuseTemplate] = createReusableTemplate()
|
|
226
177
|
const app = useApp()
|
|
227
178
|
const isShowSidebarMobile = ref(false)
|
|
228
|
-
const showFilter = useState('pageFilterOpen', () => false)
|
|
229
179
|
const auth = useAuth()
|
|
230
|
-
const breakpoints = useBreakpoints({
|
|
231
|
-
mobile: 0,
|
|
232
|
-
desktop: 768,
|
|
233
|
-
})
|
|
234
|
-
|
|
235
|
-
const isMobile = breakpoints.smaller('desktop')
|
|
236
180
|
// Cookie to store user preference for desktop
|
|
237
181
|
const isCollapsed = useCookie<boolean>('app.admin.sidebar.isCollapsed', {
|
|
238
182
|
default: () => false,
|
|
@@ -272,22 +216,4 @@ const breadcrumbsItems = computed(() => {
|
|
|
272
216
|
|
|
273
217
|
return [home, ...extra]
|
|
274
218
|
})
|
|
275
|
-
|
|
276
|
-
watch(isMobile, (newVal, oldVal) => {
|
|
277
|
-
if (newVal !== oldVal) {
|
|
278
|
-
window.location.reload()
|
|
279
|
-
}
|
|
280
|
-
})
|
|
281
219
|
</script>
|
|
282
|
-
|
|
283
|
-
<style scoped>
|
|
284
|
-
.slide-enter-active,
|
|
285
|
-
.slide-leave-active {
|
|
286
|
-
transition: all 0.3s ease;
|
|
287
|
-
}
|
|
288
|
-
.slide-enter-from,
|
|
289
|
-
.slide-leave-to {
|
|
290
|
-
transform: translateX(100%);
|
|
291
|
-
opacity: 0;
|
|
292
|
-
}
|
|
293
|
-
</style>
|