@@ -44,12 +44,16 @@ const params = useUrlSearchParams('history')
4444// Store only category IDs (URL + state)
4545const selectedCategories = computed <string []>({
4646 get : () => params .categories ? (params .categories as string ).split (' ,' ) : [],
47- set : (val ) => params .categories = val .length ? val .join (' ,' ) : null ,
47+ set : (val ) => {
48+ params .categories = val .length ? val .join (' ,' ) : null as any
49+ },
4850})
4951
5052const filters = computed <string []>({
5153 get : () => params .filters ? (params .filters as string ).split (' ,' ) : [],
52- set : (val ) => params .filters = val .length ? val .join (' ,' ) : null ,
54+ set : (val ) => {
55+ params .filters = val .length ? val .join (' ,' ) : null as any
56+ },
5357})
5458
5559const { locale, locales } = useI18n ()
@@ -62,7 +66,7 @@ async function changeLocale(code: string) {
6266 if (code === locale .value )
6367 return
6468
65- const path = switchLocalePath (code )
69+ const path = switchLocalePath (code as any )
6670 if (! path )
6771 return
6872
@@ -120,12 +124,12 @@ function getCategoryById(categoryId: string) {
120124<template >
121125 <div bg-neutral-100 h-screen relative overflow-hidden >
122126 <!-- Background SVG at bottom -->
123- <NuxtImg src =" /assets/lugano.svg" alt =" Lugano" h-auto w-full mx-auto op-3 flex pointer-events-none items-end absolute bottom-0 left-0 right-0 z-0 />
127+ <NuxtImg src =" /assets/lugano.svg" alt =" Lugano" mx-auto op-3 flex h-auto w-full pointer-events-none items-end bottom-0 left-0 right-0 absolute z-0 />
124128
125129 <!-- Language Selector -->
126130 <DevOnly >
127131 <div right-16 top-16 fixed z-50 >
128- <SelectRoot :model-value =" locale" @update:modelValue =" changeLocale" >
132+ <SelectRoot :model-value =" locale" @update:model-value =" changeLocale" >
129133 <SelectTrigger
130134 outline =" ~ 1.5 neutral-300"
131135 flex =" ~ items-center gap-8" shadow-sm font-medium py-8 rounded-8 bg-white cursor-pointer text-f-sm f-px-md
@@ -193,7 +197,7 @@ function getCategoryById(categoryId: string) {
193197 flex =" ~ items-center gap-6"
194198 @click =" removeCategory(categoryId)"
195199 >
196- <Icon :name =" getCategoryById(categoryId)?.icon" size-16 />
200+ <Icon :name =" getCategoryById(categoryId)?.icon || '' " size-16 />
197201 {{ getCategoryById(categoryId)?.name }}
198202 <Icon name =" i-nimiq:cross" size-16 />
199203 </button >
@@ -225,45 +229,43 @@ function getCategoryById(categoryId: string) {
225229 <div
226230 v-for =" i in 6"
227231 :key =" `skeleton-${i}`"
228- bg-white
229- rounded-12
230- overflow-hidden
232+
231233 outline =" ~ 1 neutral-200"
232- shadow-sm
234+
233235 flex =" ~ col"
234- animate-pulse
236+ shadow-sm rounded-12 bg-white overflow-hidden animate-pulse
235237 >
236238 <!-- Image skeleton -->
237- <div aspect =" 16/9" bg-neutral-200 flex-shrink-0 ></ div >
239+ <div aspect =" 16/9" bg-neutral-200 flex-shrink-0 / >
238240
239241 <!-- Content skeleton -->
240242 <div f-p-md flex =" ~ col gap-12" >
241243 <!-- Title -->
242- <div h-20 bg-neutral-200 rounded-6 w =" 3/4" ></ div >
244+ <div rounded-6 bg-neutral-200 h-20 w =" 3/4" / >
243245
244246 <!-- Status -->
245247 <div flex =" ~ gap-8" >
246- <div h-24 bg-neutral-200 rounded-full w-80 ></ div >
247- <div h-24 bg-neutral-200 rounded-6 w-100 ></ div >
248+ <div rounded-full bg-neutral-200 h-24 w-80 / >
249+ <div rounded-6 bg-neutral-200 h-24 w-100 / >
248250 </div >
249251
250252 <!-- Address -->
251253 <div flex =" ~ gap-8" >
252- <div size-16 bg-neutral-200 rounded-4 flex-shrink-0 mt-2 ></ div >
254+ <div mt-2 rounded-4 bg-neutral-200 flex-shrink-0 size-16 / >
253255 <div flex =" ~ col gap-6 flex-1" >
254- <div h-16 bg-neutral-200 rounded-4 w-full ></ div >
255- <div h-16 bg-neutral-200 rounded-4 w =" 2/3" ></ div >
256+ <div rounded-4 bg-neutral-200 h-16 w-full / >
257+ <div rounded-4 bg-neutral-200 h-16 w =" 2/3" / >
256258 </div >
257259 </div >
258260
259261 <!-- Categories -->
260262 <div flex =" ~ gap-6" >
261- <div h-24 bg-neutral-200 rounded-full w-80 ></ div >
262- <div h-24 bg-neutral-200 rounded-full w-60 ></ div >
263+ <div rounded-full bg-neutral-200 h-24 w-80 / >
264+ <div rounded-full bg-neutral-200 h-24 w-60 / >
263265 </div >
264266
265267 <!-- Action -->
266- <div h-20 bg-neutral-200 rounded-6 w-100 mt-auto pt-8 ></ div >
268+ <div mt-auto pt-8 rounded-6 bg-neutral-200 h-20 w-100 / >
267269 </div >
268270 </div >
269271 </div >
@@ -277,47 +279,32 @@ function getCategoryById(categoryId: string) {
277279 :aria-label =" `View ${location.name} on Google Maps`"
278280 target =" _blank"
279281 rel =" noopener noreferrer"
280- nq-hoverable
281- p-0
282- bg-white
283- rounded-12
284- overflow-hidden
282+
285283 outline =" ~ 1 neutral-200"
286- block
287- no-underline
288- group
284+
289285 flex =" ~ col"
290- h-full
286+ group p-0 rounded-12 bg-white no-underline h-full block overflow-hidden nq-hoverable
291287 >
292288 <!-- Image with Rating Overlay (16:9 aspect ratio) -->
293- <div relative aspect =" 16/9" bg-neutral-200 overflow-hidden flex-shrink-0 >
289+ <div aspect =" 16/9" bg-neutral-200 flex-shrink-0 relative overflow-hidden >
294290 <NuxtImg
295291 v-if =" location.photo"
296292 :src =" location.photo"
297293 :alt =" `Photo of ${location.name}`"
298- h-full
299- w-full
300- object-cover
301- transition-transform
302- duration-300
303- group-hover:scale-105
294+
295+ h-full w-full transition-transform duration-300 object-cover group-hover:scale-105
304296 />
305297
306298 <!-- Rating Pill Overlay -->
307299 <div
308300 v-if =" location.rating"
309- absolute
310- top-8
311- right-8
301+
312302 flex =" ~ items-center gap-4"
313303 bg =" white/95"
314- backdrop-blur-sm
304+
315305 text =" neutral-900 f-sm"
316- font-semibold
317- px-8
318- py-4
319- rounded-full
320- shadow-sm
306+
307+ shadow-sm font-semibold px-8 py-4 rounded-full right-8 top-8 absolute backdrop-blur-sm
321308 outline =" 1.5 offset--1.5 neutral/10"
322309 >
323310 <Icon name =" i-nimiq:star" text-gold size-16 />
@@ -326,7 +313,7 @@ function getCategoryById(categoryId: string) {
326313 </div >
327314
328315 <!-- Content with consistent vertical rhythm -->
329- <div f-p-md flex =" ~ col gap-12" flex-1 >
316+ <div flex =" ~ col gap-12" flex-1 f-p-md >
330317 <!-- Name (1 line max) -->
331318 <h3
332319 text =" f-lg neutral-900"
@@ -343,8 +330,7 @@ function getCategoryById(categoryId: string) {
343330 flex =" ~ items-center gap-8 wrap"
344331 >
345332 <span
346- :class =" [
347- 'px-8 py-4 rounded-full text-f-xs font-semibold whitespace-nowrap',
333+ class =" font-semibold px-8 py-4 rounded-full whitespace-nowrap text-f-xs" :class =" [
348334 location.hoursStatus.variant === 'open' && 'bg-green-400 text-green-1100 outline-1.5 outline-green-400',
349335 location.hoursStatus.variant === 'closing-soon' && 'bg-orange-400 text-orange-1100 outline-1.5 outline-orange-400',
350336 location.hoursStatus.variant === 'closed' && 'bg-neutral-200 text-neutral-800',
@@ -371,16 +357,13 @@ function getCategoryById(categoryId: string) {
371357 <div flex =" ~ items-start gap-8" >
372358 <Icon
373359 name =" i-tabler:map-pin"
374- size-16
375- text-neutral-700
376- flex-shrink-0
377- mt-2
360+
361+ text-neutral-700 mt-2 flex-shrink-0 size-16
378362 />
379363 <p
380364 text =" neutral-800 f-sm"
381- m-0
382- line-clamp-2
383- flex-1
365+
366+ m-0 flex-1 line-clamp-2
384367 >
385368 {{ location.address }}
386369 </p >
@@ -429,13 +412,10 @@ function getCategoryById(categoryId: string) {
429412 :aria-label =" `Visit ${location.name} website`"
430413 target =" _blank"
431414 rel =" noopener noreferrer"
432- @click.stop.prevent =" (e) => { window.open(location.website, '_blank') }"
433415 un-text =" neutral-600 hover:neutral-900 f-sm"
434416 font-medium
435- ml-auto
436- transition-colors
437- no-underline
438- nq-arrow
417+
418+ ml-auto no-underline transition-colors nq-arrow @click.stop
439419 >
440420 Website
441421 </a >
@@ -447,33 +427,27 @@ function getCategoryById(categoryId: string) {
447427 <!-- Empty State -->
448428 <div
449429 v-if =" !pending && (!locations || locations.length === 0)"
450- bg-white
430+
451431 outline =" ~ 1 neutral-200"
452- shadow-sm
453- text-center
454- rounded-12
455- f-py-2xl
456- f-px-lg
457- f-mt-xl
432+
433+ shadow-sm text-center rounded-12 bg-white f-px-lg f-py-2xl f-mt-xl
458434 >
459435 <div
460- size-64
461- bg-neutral-100
462- rounded-full
436+
463437 flex =" ~ items-center justify-center"
464- mx-auto
465- f-mb-md
438+
439+ mx-auto rounded-full bg-neutral-100 size-64 f-mb-md
466440 >
467441 <Icon
468442 name =" i-nimiq:magnifying-glass"
469- size-32
470- text-neutral-400
443+
444+ text-neutral-400 size-32
471445 />
472446 </div >
473447 <p text =" neutral-800 f-lg" font-semibold m-0 >
474448 {{ $t('empty.title') }}
475449 </p >
476- <p text =" neutral-600 f-sm" f-mt-xs m-0 >
450+ <p text =" neutral-600 f-sm" m-0 f-mt-xs >
477451 {{ $t('empty.subtitle') }}
478452 </p >
479453 </div >
0 commit comments