@fy-/fws-vue 2.2.55 → 2.2.57
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/components/ui/DefaultGallery.vue +19 -17
- package/package.json +1 -1
|
@@ -108,8 +108,7 @@ function setModal(value: boolean) {
|
|
|
108
108
|
}
|
|
109
109
|
isGalleryOpen.value = value
|
|
110
110
|
showControls.value = true
|
|
111
|
-
//
|
|
112
|
-
infoPanel.value = true
|
|
111
|
+
// Don't reset info panel state when opening/closing
|
|
113
112
|
}
|
|
114
113
|
|
|
115
114
|
function openGalleryImage(index: number | undefined) {
|
|
@@ -325,13 +324,12 @@ function handleBackdropClick(event: MouseEvent) {
|
|
|
325
324
|
}
|
|
326
325
|
|
|
327
326
|
watch(currentImage, () => {
|
|
328
|
-
//
|
|
329
|
-
infoPanel.value
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
})
|
|
327
|
+
// Only update the info height, don't change user's preference
|
|
328
|
+
if (infoPanel.value) {
|
|
329
|
+
nextTick(() => {
|
|
330
|
+
updateInfoHeight()
|
|
331
|
+
})
|
|
332
|
+
}
|
|
335
333
|
})
|
|
336
334
|
|
|
337
335
|
// Update CSS variable with info panel height
|
|
@@ -351,12 +349,16 @@ onMounted(() => {
|
|
|
351
349
|
eventBus.on(`${props.id}Gallery`, openGalleryImage)
|
|
352
350
|
eventBus.on(`${props.id}GalleryClose`, closeGallery)
|
|
353
351
|
|
|
354
|
-
// Initialize info height once mounted
|
|
355
|
-
|
|
352
|
+
// Initialize info height once mounted (only if info panel is shown)
|
|
353
|
+
if (infoPanel.value) {
|
|
354
|
+
updateInfoHeight()
|
|
355
|
+
}
|
|
356
356
|
|
|
357
357
|
// Set up a resize observer to track info panel height changes
|
|
358
358
|
const resizeObserver = new ResizeObserver(() => {
|
|
359
|
-
|
|
359
|
+
if (infoPanel.value) {
|
|
360
|
+
updateInfoHeight()
|
|
361
|
+
}
|
|
360
362
|
})
|
|
361
363
|
|
|
362
364
|
const infoElement = document.querySelector('.info-panel-slot')
|
|
@@ -460,7 +462,7 @@ onUnmounted(() => {
|
|
|
460
462
|
:src="isVideo(images[modelValue])"
|
|
461
463
|
class="shadow max-w-full h-auto object-contain"
|
|
462
464
|
:style="{
|
|
463
|
-
maxHeight: infoPanel ? 'calc(
|
|
465
|
+
maxHeight: infoPanel ? 'calc(80vh - var(--info-height, 0px) - 4rem)' : 'calc(80vh - 4rem)',
|
|
464
466
|
}"
|
|
465
467
|
/>
|
|
466
468
|
</ClientOnly>
|
|
@@ -470,7 +472,7 @@ onUnmounted(() => {
|
|
|
470
472
|
v-if="modelValueSrc && imageComponent === 'img'"
|
|
471
473
|
class="shadow max-w-full h-auto object-contain"
|
|
472
474
|
:style="{
|
|
473
|
-
maxHeight: infoPanel ? 'calc(
|
|
475
|
+
maxHeight: infoPanel ? 'calc(80vh - var(--info-height, 0px) - 4rem)' : 'calc(80vh - 4rem)',
|
|
474
476
|
}"
|
|
475
477
|
:src="modelValueSrc"
|
|
476
478
|
:alt="`Gallery image ${modelValue + 1}`"
|
|
@@ -483,7 +485,7 @@ onUnmounted(() => {
|
|
|
483
485
|
:alt="modelValueSrc.alt"
|
|
484
486
|
class="shadow max-w-full h-auto object-contain"
|
|
485
487
|
:style="{
|
|
486
|
-
maxHeight: infoPanel ? 'calc(
|
|
488
|
+
maxHeight: infoPanel ? 'calc(80vh - var(--info-height, 0px) - 4rem)' : 'calc(80vh - 4rem)',
|
|
487
489
|
}"
|
|
488
490
|
/>
|
|
489
491
|
</template>
|
|
@@ -537,7 +539,7 @@ onUnmounted(() => {
|
|
|
537
539
|
>
|
|
538
540
|
<div
|
|
539
541
|
v-if="sidePanel"
|
|
540
|
-
class="hidden lg:block flex-shrink-0 w-64 bg-fv-neutral-800/90 backdrop-blur-md h-full max-h-full overflow-y-auto"
|
|
542
|
+
class="hidden lg:block flex-shrink-0 w-64 bg-fv-neutral-800/90 backdrop-blur-md h-full max-h-full overflow-y-auto pt-16"
|
|
541
543
|
>
|
|
542
544
|
<!-- Paging Controls -->
|
|
543
545
|
<div v-if="paging" class="flex items-center justify-center pt-2">
|
|
@@ -604,7 +606,7 @@ onUnmounted(() => {
|
|
|
604
606
|
>
|
|
605
607
|
<div
|
|
606
608
|
v-if="showControls"
|
|
607
|
-
class="absolute top-0 left-0 right-0 px-4 py-3 flex justify-between items-center bg-gradient-to-b from-fv-neutral-900/90 to-transparent backdrop-blur-sm z-[50] transition-opacity"
|
|
609
|
+
class="absolute top-0 left-0 right-0 px-4 py-3 flex justify-between items-center bg-gradient-to-b from-fv-neutral-900/90 to-transparent backdrop-blur-sm z-[50] transition-opacity h-16"
|
|
608
610
|
>
|
|
609
611
|
<!-- Title and Counter -->
|
|
610
612
|
<div class="flex items-center space-x-2">
|