Further renaming within gallery

This commit is contained in:
Julian Stirling 2026-06-21 16:12:53 +01:00
parent 6ece96e802
commit bef63769df
2 changed files with 15 additions and 22 deletions

View file

@ -1,7 +1,7 @@
<template> <template>
<div id="scan-modal" ref="scanModal" uk-modal> <div id="viewer-modal" ref="viewerModal" uk-modal>
<div v-if="selectedItem" id="scan-modal-body" class="uk-modal-dialog uk-modal-body"> <div v-if="selectedItem" id="viewer-modal-body" class="uk-modal-dialog uk-modal-body">
<h2 id="scan-modal-title" class="uk-modal-title"> <h2 id="viewer-modal-title" class="uk-modal-title">
{{ selectedItem.name }} {{ selectedItem.name }}
<button class="uk-modal-close uk-float-right" type="button"> <button class="uk-modal-close uk-float-right" type="button">
<span class="material-symbols-outlined">close</span> <span class="material-symbols-outlined">close</span>
@ -58,7 +58,7 @@ import UIkit from "uikit";
import OpenSeadragonViewer from "./openSeadragonViewer.vue"; import OpenSeadragonViewer from "./openSeadragonViewer.vue";
export default { export default {
name: "ScanViewerModal", name: "GalleryModal",
components: { components: {
OpenSeadragonViewer, OpenSeadragonViewer,
}, },
@ -92,7 +92,7 @@ export default {
}, },
}, },
mounted() { mounted() {
this.modalEl = this.$refs.scanModal; this.modalEl = this.$refs.viewerModal;
this.beforeHideHandler = (event) => { this.beforeHideHandler = (event) => {
if (this.enteringFullscreen) { if (this.enteringFullscreen) {
event.preventDefault(); event.preventDefault();
@ -108,10 +108,10 @@ export default {
}, },
methods: { methods: {
show() { show() {
UIkit.modal(this.$refs.scanModal).show(); UIkit.modal(this.$refs.viewerModal).show();
}, },
hide() { hide() {
UIkit.modal(this.$refs.scanModal).hide(); UIkit.modal(this.$refs.viewerModal).hide();
}, },
goFullscreen() { goFullscreen() {
this.$refs.openseadragon.openFullscreen(); this.$refs.openseadragon.openFullscreen();
@ -131,11 +131,11 @@ input[type="range"] {
z-index: 1001; z-index: 1001;
} }
#scan-modal { #viewer-modal {
padding: 10px; padding: 10px;
} }
#scan-modal-body { #viewer-modal-body {
padding: 10px; padding: 10px;
width: 95%; width: 95%;
height: 95%; height: 95%;
@ -143,7 +143,7 @@ input[type="range"] {
flex-direction: column; flex-direction: column;
} }
#scan-modal-title { #viewer-modal-title {
flex: 0 0 auto; flex: 0 0 auto;
} }

View file

@ -41,7 +41,7 @@
</div> </div>
</nav> </nav>
<ScanViewerModal ref="scanViewer" :selected-item="selectedItem" :base-uri="baseUri" /> <gallery-modal ref="viewerModal" :selected-item="selectedItem" :base-uri="baseUri" />
<!-- Gallery --> <!-- Gallery -->
<div v-if="ready" class="uk-padding-remove-top" uk-lightbox="toggle: .lightbox-link"> <div v-if="ready" class="uk-padding-remove-top" uk-lightbox="toggle: .lightbox-link">
@ -73,7 +73,7 @@ import axios from "axios";
import PaginateLinks from "@/components/genericComponents/paginateLinks.vue"; import PaginateLinks from "@/components/genericComponents/paginateLinks.vue";
import actionButton from "../labThingsComponents/actionButton.vue"; import actionButton from "../labThingsComponents/actionButton.vue";
import galleryCard from "./galleryComponents/galleryCard.vue"; import galleryCard from "./galleryComponents/galleryCard.vue";
import ScanViewerModal from "./galleryComponents/scanViewer.vue"; import galleryModal from "./galleryComponents/galleryViewer.vue/index.js";
import { eventBus } from "../../eventBus.js"; import { eventBus } from "../../eventBus.js";
import { useIntersectionObserver } from "@vueuse/core"; import { useIntersectionObserver } from "@vueuse/core";
import { useSettingsStore } from "@/stores/settings.js"; import { useSettingsStore } from "@/stores/settings.js";
@ -86,7 +86,7 @@ export default {
components: { components: {
actionButton, actionButton,
galleryCard, galleryCard,
ScanViewerModal, galleryModal,
PaginateLinks, PaginateLinks,
}, },
@ -112,13 +112,6 @@ export default {
noItems() { noItems() {
return !this.all_items || this.all_items?.length === 0; return !this.all_items || this.all_items?.length === 0;
}, },
selectedItemDZI() {
if (this.selectedItem && this.selectedItem.dzi != "") {
return `${this.baseUri}/data/smart_scan/${this.selectedItem.name}/images/${this.selectedItem.dzi}`;
} else {
return null;
}
},
totalPages() { totalPages() {
return Math.ceil((this.all_items?.length || 0) / this.itemsPerPage); return Math.ceil((this.all_items?.length || 0) / this.itemsPerPage);
}, },
@ -213,13 +206,13 @@ export default {
if (itemData.card_type === "Scan") { if (itemData.card_type === "Scan") {
if (itemData.dzi) { if (itemData.dzi) {
this.selectedItem = itemData; this.selectedItem = itemData;
this.$refs.scanViewer.show(); this.$refs.viewerModal.show();
} else { } else {
this.modalError("Scan not stitched for viewing in webapp, please download or stitch"); this.modalError("Scan not stitched for viewing in webapp, please download or stitch");
} }
} else { } else {
this.selectedItem = itemData; this.selectedItem = itemData;
this.$refs.scanViewer.show(); this.$refs.viewerModal.show();
} }
}, },
changePage(page) { changePage(page) {