ketekny-ui-kit 1.0.68 → 1.0.70
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/package.json +1 -1
- package/src/layout/twoColLayout.vue +204 -139
package/package.json
CHANGED
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
type="button"
|
|
8
8
|
:aria-label="expandLabel"
|
|
9
9
|
v-tooltip.right="expandLabel"
|
|
10
|
-
class="fixed
|
|
10
|
+
class="fixed top-0 z-[70] hidden h-10 w-10 items-center justify-center rounded-r-full border-white/15 bg-[#121b2e] text-white shadow-2xl shadow-black/50 transition-all duration-300 hover:bg-[#1a2640] lg:left-[44px] lg:translate-x-full lg:flex"
|
|
11
11
|
@click="toggleSidebar"
|
|
12
12
|
>
|
|
13
13
|
<slot name="collapsed-toggle-icon">
|
|
@@ -15,20 +15,35 @@
|
|
|
15
15
|
</slot>
|
|
16
16
|
</button>
|
|
17
17
|
|
|
18
|
+
<button
|
|
19
|
+
v-show="!isSidebarCollapsed"
|
|
20
|
+
type="button"
|
|
21
|
+
:aria-label="collapseLabel"
|
|
22
|
+
v-tooltip.left="collapseLabel"
|
|
23
|
+
class="fixed top-0 z-[70] hidden h-10 w-10 items-center justify-center rounded-r-full border-white/15 bg-[#121b2e] text-white shadow-2xl shadow-black/50 transition-all duration-300 hover:bg-[#1a2640] lg:left-[328px] lg:translate-x-full lg:flex"
|
|
24
|
+
@click.stop="toggleSidebar"
|
|
25
|
+
>
|
|
26
|
+
<slot name="toggle-icon">
|
|
27
|
+
<kIcon :name="collapseIcon" size="16" class="text-white" />
|
|
28
|
+
</slot>
|
|
29
|
+
</button>
|
|
30
|
+
|
|
18
31
|
<aside
|
|
19
|
-
class="flex h-screen w-full flex-col overflow-y-auto overflow-x-hidden bg-[radial-gradient(circle_at_0_0,#ffffff0f,#0000_34%),linear-gradient(#101a2d_0%,#0a1120_52%,#070d19_100%)] text-white shadow-2xl transition-all duration-300 ease-out lg:w-[360px] lg:shrink-0 lg:
|
|
32
|
+
class="flex h-screen w-full flex-col overflow-y-auto overflow-x-hidden bg-[radial-gradient(circle_at_0_0,#ffffff0f,#0000_34%),linear-gradient(#101a2d_0%,#0a1120_52%,#070d19_100%)] text-white shadow-2xl transition-all duration-300 ease-out lg:w-[360px] lg:shrink-0 lg:will-change-transform"
|
|
20
33
|
:class="
|
|
21
34
|
isSidebarCollapsed
|
|
22
35
|
? 'lg:relative lg:z-30 lg:w-[76px]'
|
|
23
36
|
: 'lg:relative lg:z-30 lg:translate-x-0'
|
|
24
37
|
"
|
|
25
38
|
>
|
|
26
|
-
<div class="relative
|
|
39
|
+
<div class="relative">
|
|
27
40
|
<button
|
|
28
41
|
v-if="logoSrc"
|
|
29
42
|
type="button"
|
|
30
43
|
class="block w-full text-left"
|
|
31
|
-
v-tooltip.right.html="
|
|
44
|
+
v-tooltip.right.html="
|
|
45
|
+
isSidebarCollapsed ? collapsedContactTooltip : logoAlt
|
|
46
|
+
"
|
|
32
47
|
@click="$emit('logo-click')"
|
|
33
48
|
>
|
|
34
49
|
<img
|
|
@@ -37,50 +52,21 @@
|
|
|
37
52
|
class="cursor-pointer px-4 py-4 transition-all duration-300"
|
|
38
53
|
/>
|
|
39
54
|
</button>
|
|
40
|
-
<div
|
|
41
|
-
|
|
42
|
-
|
|
55
|
+
<div
|
|
56
|
+
v-if="title && !isSidebarCollapsed"
|
|
57
|
+
class="py-3 text-xl font-bold text-center"
|
|
58
|
+
>
|
|
43
59
|
{{ title }}
|
|
44
60
|
</div>
|
|
45
|
-
<div v-if="showSponsors && !isSidebarCollapsed" class="flex flex-col gap-3 px-4 py-4 bg-[#0f4e8d]">
|
|
46
|
-
<div>
|
|
47
|
-
<img
|
|
48
|
-
src="https://s3.ketekny.gr/public/web-apps/sponsors/Greece 2.0_NextGeneration_White_gr.png"
|
|
49
|
-
alt="Tameio Anakampsis"
|
|
50
|
-
class="mx-auto max-h-16 w-auto object-contain"
|
|
51
|
-
/>
|
|
52
|
-
</div>
|
|
53
|
-
<div>
|
|
54
|
-
<img
|
|
55
|
-
src="https://s3.ketekny.gr/public/web-apps/sponsors/yp_ygeias_dark.png"
|
|
56
|
-
alt="Ypourgeio Ygeias"
|
|
57
|
-
class="mx-auto max-h-16 w-auto object-contain"
|
|
58
|
-
/>
|
|
59
|
-
</div>
|
|
60
|
-
</div>
|
|
61
61
|
|
|
62
62
|
<slot name="sidebar-header" />
|
|
63
|
-
|
|
64
|
-
<button
|
|
65
|
-
v-show="!isSidebarCollapsed"
|
|
66
|
-
type="button"
|
|
67
|
-
:aria-label="collapseLabel"
|
|
68
|
-
v-tooltip.left="collapseLabel"
|
|
69
|
-
class="absolute right-2 top-2 z-[70] hidden h-10 w-10 items-center justify-center rounded-full border border-white/15 bg-[#121b2e] text-white shadow-2xl shadow-black/50 transition hover:bg-[#1a2640] lg:flex"
|
|
70
|
-
@click.stop="toggleSidebar"
|
|
71
|
-
>
|
|
72
|
-
<slot name="toggle-icon">
|
|
73
|
-
<kIcon
|
|
74
|
-
:name="collapseIcon"
|
|
75
|
-
size="16"
|
|
76
|
-
class="text-white"
|
|
77
|
-
/>
|
|
78
|
-
</slot>
|
|
79
|
-
</button>
|
|
80
63
|
</div>
|
|
81
64
|
|
|
82
65
|
<div class="flex-1 pt-4">
|
|
83
|
-
<div
|
|
66
|
+
<div
|
|
67
|
+
v-if="isSidebarCollapsed"
|
|
68
|
+
class="mx-1 mt-3 flex flex-col items-center gap-2"
|
|
69
|
+
>
|
|
84
70
|
<SidebarIconLink
|
|
85
71
|
v-for="item in normalizedMainMenu"
|
|
86
72
|
:key="item.key"
|
|
@@ -127,23 +113,53 @@
|
|
|
127
113
|
</div>
|
|
128
114
|
</div>
|
|
129
115
|
|
|
130
|
-
|
|
116
|
+
<div
|
|
117
|
+
v-if="account"
|
|
118
|
+
class="shrink-0 border-b border-white/10 bg-slate-900/80 px-1 pb-4 text-white/80"
|
|
119
|
+
>
|
|
131
120
|
<div v-if="isSidebarCollapsed" class="flex flex-col gap-3">
|
|
132
121
|
<div v-if="account.loggedIn" class="flex flex-col items-center gap-2">
|
|
133
|
-
<SidebarIconLink
|
|
134
|
-
|
|
122
|
+
<SidebarIconLink
|
|
123
|
+
icon="UserRoundCog"
|
|
124
|
+
:on-click="() => $emit('edit-profile')"
|
|
125
|
+
:title="'Επεξεργασία προφίλ'"
|
|
126
|
+
v-tooltip.right="'Επεξεργασία προφίλ'"
|
|
127
|
+
/>
|
|
128
|
+
<SidebarIconLink
|
|
129
|
+
icon="LogOut"
|
|
130
|
+
warning
|
|
131
|
+
:on-click="() => $emit('signout')"
|
|
132
|
+
:title="'Αποσύνδεση'"
|
|
133
|
+
v-tooltip.right="'Αποσύνδεση'"
|
|
134
|
+
/>
|
|
135
135
|
</div>
|
|
136
136
|
<div v-else class="flex flex-col items-center gap-2">
|
|
137
|
-
<SidebarIconLink
|
|
138
|
-
|
|
137
|
+
<SidebarIconLink
|
|
138
|
+
icon="LogIn"
|
|
139
|
+
:on-click="() => $emit('signin')"
|
|
140
|
+
:title="'Sign in'"
|
|
141
|
+
v-tooltip.right="'Sign in'"
|
|
142
|
+
/>
|
|
143
|
+
<SidebarIconLink
|
|
144
|
+
icon="UserPlus"
|
|
145
|
+
:on-click="() => $emit('signup')"
|
|
146
|
+
:title="'Sign up'"
|
|
147
|
+
v-tooltip.right="'Sign up'"
|
|
148
|
+
/>
|
|
139
149
|
</div>
|
|
140
150
|
</div>
|
|
141
151
|
<div v-else class="flex flex-col gap-3 px-3">
|
|
142
152
|
<div class="min-w-0">
|
|
143
|
-
<p
|
|
153
|
+
<p
|
|
154
|
+
v-if="account.loggedIn"
|
|
155
|
+
class="mt-2 truncate text-lg font-semibold text-white"
|
|
156
|
+
>
|
|
144
157
|
{{ accountDisplayName }}
|
|
145
158
|
</p>
|
|
146
|
-
<p
|
|
159
|
+
<p
|
|
160
|
+
v-if="account.loggedIn && displayEmail"
|
|
161
|
+
class="truncate text-sm text-slate-300"
|
|
162
|
+
>
|
|
147
163
|
{{ displayEmail }}
|
|
148
164
|
</p>
|
|
149
165
|
</div>
|
|
@@ -164,7 +180,7 @@
|
|
|
164
180
|
/>
|
|
165
181
|
<kButton
|
|
166
182
|
v-if="account.loggedIn"
|
|
167
|
-
|
|
183
|
+
variant="soft"
|
|
168
184
|
icon="UserRoundCog"
|
|
169
185
|
label="Επεξεργασία προφίλ"
|
|
170
186
|
@click="$emit('edit-profile')"
|
|
@@ -181,19 +197,29 @@
|
|
|
181
197
|
</div>
|
|
182
198
|
|
|
183
199
|
<div
|
|
184
|
-
v-if="
|
|
185
|
-
class="shrink-0 border-t border-white/10
|
|
200
|
+
v-if="!isSidebarCollapsed"
|
|
201
|
+
class="shrink-0 border-t border-white/10 text-white/50"
|
|
186
202
|
>
|
|
187
|
-
<div class="flex flex-col gap-2">
|
|
188
|
-
<p
|
|
203
|
+
<div class="flex flex-col gap-2 px-4" v-if="showContactInfo">
|
|
204
|
+
<p
|
|
205
|
+
class="text-sm font-semibold uppercase tracking-[0.25em] text-white/60"
|
|
206
|
+
>
|
|
189
207
|
KETEKNY AE
|
|
190
208
|
</p>
|
|
191
|
-
<div
|
|
192
|
-
|
|
209
|
+
<div
|
|
210
|
+
class="flex flex-wrap items-center gap-x-3 text-sm"
|
|
211
|
+
:class="isSidebarCollapsed ? 'justify-center' : ''"
|
|
212
|
+
>
|
|
213
|
+
<span v-if="isSidebarCollapsed" class="sr-only"
|
|
214
|
+
>KETEKNY AE contact info</span
|
|
215
|
+
>
|
|
193
216
|
<span class="whitespace-nowrap">Βερανζέρου 13, 10677, Αθήνα</span>
|
|
194
217
|
<span class="whitespace-nowrap">210 3648 337</span>
|
|
195
218
|
<span class="whitespace-nowrap">
|
|
196
|
-
<a
|
|
219
|
+
<a
|
|
220
|
+
:href="`mailto:${contactEmail}`"
|
|
221
|
+
class="whitespace-nowrap hover:underline"
|
|
222
|
+
>
|
|
197
223
|
{{ contactEmail }}
|
|
198
224
|
</a>
|
|
199
225
|
</span>
|
|
@@ -207,11 +233,32 @@
|
|
|
207
233
|
</a>
|
|
208
234
|
</div>
|
|
209
235
|
</div>
|
|
210
|
-
</div>
|
|
211
236
|
|
|
237
|
+
<div
|
|
238
|
+
v-if="showSponsors && !isSidebarCollapsed"
|
|
239
|
+
class="flex flex-col gap-3 px-4 py-1 bg-[#0d4b87] mt-2"
|
|
240
|
+
>
|
|
241
|
+
<div>
|
|
242
|
+
<img
|
|
243
|
+
src="https://s3.ketekny.gr/public/web-apps/sponsors/Greece 2.0_NextGeneration_White_gr.png"
|
|
244
|
+
alt="Tameio Anakampsis"
|
|
245
|
+
class="mx-auto max-h-14 w-auto object-contain"
|
|
246
|
+
/>
|
|
247
|
+
</div>
|
|
248
|
+
<div>
|
|
249
|
+
<img
|
|
250
|
+
src="https://s3.ketekny.gr/public/web-apps/sponsors/yp_ygeias_dark.png"
|
|
251
|
+
alt="Ypourgeio Ygeias"
|
|
252
|
+
class="mx-auto max-h-14 w-auto object-contain"
|
|
253
|
+
/>
|
|
254
|
+
</div>
|
|
255
|
+
</div>
|
|
256
|
+
</div>
|
|
212
257
|
</aside>
|
|
213
258
|
|
|
214
|
-
<main
|
|
259
|
+
<main
|
|
260
|
+
class="min-h-screen min-w-0 flex-1 overflow-y-auto overflow-x-hidden lg:h-full lg:min-h-0"
|
|
261
|
+
>
|
|
215
262
|
<div class="w-full">
|
|
216
263
|
<slot />
|
|
217
264
|
</div>
|
|
@@ -220,10 +267,10 @@
|
|
|
220
267
|
</template>
|
|
221
268
|
|
|
222
269
|
<script>
|
|
223
|
-
import { h } from
|
|
224
|
-
import kButton from
|
|
225
|
-
import kIcon from
|
|
226
|
-
import { RouterLink } from
|
|
270
|
+
import { h } from "vue";
|
|
271
|
+
import kButton from "../ui/kButton.vue";
|
|
272
|
+
import kIcon from "../ui/kIcon.vue";
|
|
273
|
+
import { RouterLink } from "vue-router";
|
|
227
274
|
|
|
228
275
|
const SidebarIconLink = {
|
|
229
276
|
props: {
|
|
@@ -231,22 +278,22 @@ const SidebarIconLink = {
|
|
|
231
278
|
active: { type: Boolean, default: false },
|
|
232
279
|
to: { type: [String, Object], default: null },
|
|
233
280
|
href: { type: String, default: null },
|
|
234
|
-
title: { type: String, default:
|
|
281
|
+
title: { type: String, default: "" },
|
|
235
282
|
isExternal: { type: Boolean, default: false },
|
|
236
|
-
target: { type: String, default:
|
|
237
|
-
rel: { type: String, default:
|
|
283
|
+
target: { type: String, default: "_blank" },
|
|
284
|
+
rel: { type: String, default: "noreferrer" },
|
|
238
285
|
onClick: { type: Function, default: null },
|
|
239
286
|
warning: { type: Boolean, default: false },
|
|
240
|
-
tooltip: { type: String, default:
|
|
287
|
+
tooltip: { type: String, default: "" },
|
|
241
288
|
},
|
|
242
289
|
methods: {
|
|
243
290
|
handleClick(event) {
|
|
244
|
-
if (this.onClick) this.onClick(event)
|
|
291
|
+
if (this.onClick) this.onClick(event);
|
|
245
292
|
},
|
|
246
293
|
},
|
|
247
294
|
render() {
|
|
248
|
-
const isLink = Boolean(this.to)
|
|
249
|
-
const tag = isLink ? RouterLink : this.isExternal ?
|
|
295
|
+
const isLink = Boolean(this.to);
|
|
296
|
+
const tag = isLink ? RouterLink : this.isExternal ? "a" : "button";
|
|
250
297
|
|
|
251
298
|
return h(
|
|
252
299
|
tag,
|
|
@@ -255,24 +302,24 @@ const SidebarIconLink = {
|
|
|
255
302
|
href: this.href,
|
|
256
303
|
target: this.isExternal ? this.target : null,
|
|
257
304
|
rel: this.isExternal ? this.rel : null,
|
|
258
|
-
type: isLink || this.isExternal ? null :
|
|
305
|
+
type: isLink || this.isExternal ? null : "button",
|
|
259
306
|
title: this.title,
|
|
260
307
|
class: [
|
|
261
|
-
|
|
308
|
+
"group relative flex h-14 w-14 items-center justify-center rounded-xl border border-white/15 transition",
|
|
262
309
|
this.active
|
|
263
|
-
?
|
|
310
|
+
? "bg-slate-950 text-white"
|
|
264
311
|
: this.warning
|
|
265
|
-
|
|
266
|
-
|
|
312
|
+
? "bg-[#d97706] text-white hover:bg-[#b45309]"
|
|
313
|
+
: "bg-white/5 text-white hover:border-cyan-400/40 hover:bg-white/10",
|
|
267
314
|
],
|
|
268
315
|
onClick: this.handleClick,
|
|
269
316
|
},
|
|
270
|
-
[h(kIcon, { name: this.icon, size:
|
|
271
|
-
)
|
|
317
|
+
[h(kIcon, { name: this.icon, size: "20", color: "#ffffff" })]
|
|
318
|
+
);
|
|
272
319
|
},
|
|
273
|
-
}
|
|
320
|
+
};
|
|
274
321
|
|
|
275
|
-
const DEFAULT_STORAGE_KEY =
|
|
322
|
+
const DEFAULT_STORAGE_KEY = "two-col-layout-sidebar-collapsed";
|
|
276
323
|
|
|
277
324
|
export default {
|
|
278
325
|
components: {
|
|
@@ -281,97 +328,110 @@ export default {
|
|
|
281
328
|
RouterLink,
|
|
282
329
|
SidebarIconLink,
|
|
283
330
|
},
|
|
284
|
-
emits: [
|
|
331
|
+
emits: ["logo-click", "signin", "signup", "signout", "edit-profile"],
|
|
285
332
|
props: {
|
|
286
|
-
title: { type: String, default:
|
|
333
|
+
title: { type: String, default: "" },
|
|
287
334
|
collapsedLogoSrc: {
|
|
288
335
|
type: String,
|
|
289
|
-
default:
|
|
336
|
+
default: "https://s3.ketekny.gr/public/web-apps/logos/logo-icon-dark.png",
|
|
290
337
|
},
|
|
291
|
-
logoSrc: { type: String, default:
|
|
292
|
-
logoAlt: { type: String, default:
|
|
293
|
-
collapseLabel: { type: String, default:
|
|
294
|
-
expandLabel: { type: String, default:
|
|
295
|
-
collapseIcon: { type: String, default:
|
|
296
|
-
expandIcon: { type: String, default:
|
|
338
|
+
logoSrc: { type: String, default: "" },
|
|
339
|
+
logoAlt: { type: String, default: "Logo" },
|
|
340
|
+
collapseLabel: { type: String, default: "Collapse sidebar" },
|
|
341
|
+
expandLabel: { type: String, default: "Expand sidebar" },
|
|
342
|
+
collapseIcon: { type: String, default: "ArrowLeftToLine" },
|
|
343
|
+
expandIcon: { type: String, default: "ArrowRightToLine" },
|
|
297
344
|
showSponsors: { type: Boolean, default: false },
|
|
298
345
|
storageKey: { type: String, default: DEFAULT_STORAGE_KEY },
|
|
299
346
|
defaultCollapsed: { type: Boolean, default: false },
|
|
300
347
|
mainMenu: { type: Array, default: () => [] },
|
|
301
348
|
showContactInfo: { type: Boolean, default: false },
|
|
302
349
|
account: { type: Object, default: null },
|
|
303
|
-
contactEmail: { type: String, default:
|
|
350
|
+
contactEmail: { type: String, default: "grammateia@ketekny.gr" },
|
|
304
351
|
},
|
|
305
352
|
data() {
|
|
306
353
|
return {
|
|
307
354
|
isSidebarCollapsed: false,
|
|
308
355
|
mdCollapseQuery: null,
|
|
309
|
-
}
|
|
356
|
+
};
|
|
310
357
|
},
|
|
311
358
|
created() {
|
|
312
|
-
this.restoreSidebarState()
|
|
359
|
+
this.restoreSidebarState();
|
|
313
360
|
},
|
|
314
361
|
mounted() {
|
|
315
|
-
this.mdCollapseQuery = window.matchMedia(
|
|
316
|
-
|
|
317
|
-
|
|
362
|
+
this.mdCollapseQuery = window.matchMedia(
|
|
363
|
+
"(min-width: 768px) and (max-width: 1023px)"
|
|
364
|
+
);
|
|
365
|
+
this.syncSidebarForViewport();
|
|
366
|
+
this.mdCollapseQuery.addEventListener(
|
|
367
|
+
"change",
|
|
368
|
+
this.syncSidebarForViewport
|
|
369
|
+
);
|
|
318
370
|
},
|
|
319
371
|
beforeUnmount() {
|
|
320
|
-
this.mdCollapseQuery?.removeEventListener(
|
|
372
|
+
this.mdCollapseQuery?.removeEventListener(
|
|
373
|
+
"change",
|
|
374
|
+
this.syncSidebarForViewport
|
|
375
|
+
);
|
|
321
376
|
},
|
|
322
377
|
methods: {
|
|
323
378
|
restoreSidebarState() {
|
|
324
|
-
if (typeof window ===
|
|
325
|
-
this.isSidebarCollapsed = this.defaultCollapsed
|
|
326
|
-
return
|
|
379
|
+
if (typeof window === "undefined") {
|
|
380
|
+
this.isSidebarCollapsed = this.defaultCollapsed;
|
|
381
|
+
return;
|
|
327
382
|
}
|
|
328
383
|
|
|
329
|
-
const stored = window.localStorage.getItem(this.storageKey)
|
|
384
|
+
const stored = window.localStorage.getItem(this.storageKey);
|
|
330
385
|
if (stored == null) {
|
|
331
|
-
this.isSidebarCollapsed = this.defaultCollapsed
|
|
332
|
-
return
|
|
386
|
+
this.isSidebarCollapsed = this.defaultCollapsed;
|
|
387
|
+
return;
|
|
333
388
|
}
|
|
334
389
|
|
|
335
|
-
this.isSidebarCollapsed = stored ===
|
|
390
|
+
this.isSidebarCollapsed = stored === "true";
|
|
336
391
|
},
|
|
337
392
|
syncSidebarForViewport() {
|
|
338
|
-
if (typeof window ===
|
|
393
|
+
if (typeof window === "undefined") return;
|
|
339
394
|
|
|
340
|
-
const isMd = window.matchMedia(
|
|
395
|
+
const isMd = window.matchMedia(
|
|
396
|
+
"(min-width: 768px) and (max-width: 1023px)"
|
|
397
|
+
).matches;
|
|
341
398
|
if (isMd) {
|
|
342
|
-
this.isSidebarCollapsed = true
|
|
343
|
-
return
|
|
399
|
+
this.isSidebarCollapsed = true;
|
|
400
|
+
return;
|
|
344
401
|
}
|
|
345
402
|
|
|
346
|
-
this.restoreSidebarState()
|
|
403
|
+
this.restoreSidebarState();
|
|
347
404
|
},
|
|
348
405
|
persistSidebarState() {
|
|
349
|
-
if (typeof window ===
|
|
406
|
+
if (typeof window === "undefined") return;
|
|
350
407
|
|
|
351
|
-
window.localStorage.setItem(
|
|
408
|
+
window.localStorage.setItem(
|
|
409
|
+
this.storageKey,
|
|
410
|
+
this.isSidebarCollapsed ? "true" : "false"
|
|
411
|
+
);
|
|
352
412
|
},
|
|
353
413
|
toggleSidebar() {
|
|
354
|
-
this.isSidebarCollapsed = !this.isSidebarCollapsed
|
|
355
|
-
this.persistSidebarState()
|
|
414
|
+
this.isSidebarCollapsed = !this.isSidebarCollapsed;
|
|
415
|
+
this.persistSidebarState();
|
|
356
416
|
},
|
|
357
417
|
menuItemTag(item) {
|
|
358
|
-
if (item?.isLink) return
|
|
359
|
-
if (item?.isExternal) return
|
|
360
|
-
return
|
|
418
|
+
if (item?.isLink) return "RouterLink";
|
|
419
|
+
if (item?.isExternal) return "a";
|
|
420
|
+
return "button";
|
|
361
421
|
},
|
|
362
422
|
},
|
|
363
423
|
computed: {
|
|
364
424
|
normalizedMainMenu() {
|
|
365
425
|
return this.mainMenu.map((item, index) => {
|
|
366
|
-
const isExternal = Boolean(item?.href)
|
|
367
|
-
const isLink = Boolean(item?.to)
|
|
368
|
-
const active = Boolean(item?.active)
|
|
426
|
+
const isExternal = Boolean(item?.href);
|
|
427
|
+
const isLink = Boolean(item?.to);
|
|
428
|
+
const active = Boolean(item?.active);
|
|
369
429
|
|
|
370
430
|
return {
|
|
371
431
|
key: item?.key || item?.label || index,
|
|
372
|
-
label: item?.label ||
|
|
373
|
-
description: item?.description ||
|
|
374
|
-
icon: item?.icon ||
|
|
432
|
+
label: item?.label || "",
|
|
433
|
+
description: item?.description || "",
|
|
434
|
+
icon: item?.icon || "Dot",
|
|
375
435
|
active,
|
|
376
436
|
isExternal,
|
|
377
437
|
isLink,
|
|
@@ -379,31 +439,36 @@ export default {
|
|
|
379
439
|
? {
|
|
380
440
|
to: item.to,
|
|
381
441
|
title: item.title || item.label,
|
|
382
|
-
|
|
442
|
+
"aria-current": active ? "page" : null,
|
|
383
443
|
}
|
|
384
444
|
: isExternal
|
|
385
|
-
|
|
386
|
-
|
|
387
|
-
|
|
388
|
-
|
|
389
|
-
|
|
390
|
-
|
|
391
|
-
|
|
392
|
-
|
|
393
|
-
|
|
394
|
-
|
|
445
|
+
? {
|
|
446
|
+
href: item.href,
|
|
447
|
+
target: item.target || "_blank",
|
|
448
|
+
rel: item.rel || "noreferrer",
|
|
449
|
+
title: item.title || item.label,
|
|
450
|
+
}
|
|
451
|
+
: {
|
|
452
|
+
type: "button",
|
|
453
|
+
title: item.title || item.label,
|
|
454
|
+
},
|
|
395
455
|
classes: active
|
|
396
|
-
?
|
|
397
|
-
:
|
|
398
|
-
}
|
|
399
|
-
})
|
|
456
|
+
? "border-white/70 bg-white/90 text-slate-950 shadow-lg shadow-black/20"
|
|
457
|
+
: "border-white/10 bg-white/5 text-white hover:border-cyan-400/40 hover:bg-white/10",
|
|
458
|
+
};
|
|
459
|
+
});
|
|
400
460
|
},
|
|
401
461
|
accountDisplayName() {
|
|
402
|
-
if (!this.account) return
|
|
403
|
-
return
|
|
462
|
+
if (!this.account) return "";
|
|
463
|
+
return (
|
|
464
|
+
[this.account.firstName, this.account.lastName]
|
|
465
|
+
.filter(Boolean)
|
|
466
|
+
.join(" ")
|
|
467
|
+
.trim() || "Account"
|
|
468
|
+
);
|
|
404
469
|
},
|
|
405
470
|
displayEmail() {
|
|
406
|
-
return this.account?.email ||
|
|
471
|
+
return this.account?.email || "";
|
|
407
472
|
},
|
|
408
473
|
collapsedContactTooltip() {
|
|
409
474
|
return `
|
|
@@ -418,8 +483,8 @@ export default {
|
|
|
418
483
|
<div>https://ketekny.gr</div>
|
|
419
484
|
</div>
|
|
420
485
|
</div>
|
|
421
|
-
|
|
486
|
+
`;
|
|
422
487
|
},
|
|
423
488
|
},
|
|
424
|
-
}
|
|
489
|
+
};
|
|
425
490
|
</script>
|