diff --git a/webapp/src/components/appContent.vue b/webapp/src/components/appContent.vue index 29af3e5e..9ddf17ae 100644 --- a/webapp/src/components/appContent.vue +++ b/webapp/src/components/appContent.vue @@ -85,7 +85,7 @@ import aboutContent from "./tabContentComponents/aboutContent.vue"; import controlContent from "./tabContentComponents/controlContent.vue"; import loggingContent from "./tabContentComponents/loggingContent.vue"; import powerContent from "./tabContentComponents/powerContent.vue"; -import scanListContent from "./tabContentComponents/scanListContent.vue"; +import galleryContent from "./tabContentComponents/galleryContent.vue"; import settingsContent from "./tabContentComponents/settingsContent.vue"; import slideScanContent from "./tabContentComponents/slideScanContent.vue"; import viewContent from "./tabContentComponents/viewContent.vue"; @@ -158,10 +158,10 @@ export default { requiredThings: ["smart_scan"], }, { - id: "scan-list", - title: "Scan List", + id: "gallery", + title: "Gallery", icon: "photo_library", - component: markRaw(scanListContent), + component: markRaw(galleryContent), requiredThings: ["smart_scan"], }, ], diff --git a/webapp/src/components/tabContentComponents/scanListComponents/scanCard.vue b/webapp/src/components/tabContentComponents/galleryComponents/galleryCard.vue similarity index 77% rename from webapp/src/components/tabContentComponents/scanListComponents/scanCard.vue rename to webapp/src/components/tabContentComponents/galleryComponents/galleryCard.vue index 8f448815..d9b32d11 100644 --- a/webapp/src/components/tabContentComponents/scanListComponents/scanCard.vue +++ b/webapp/src/components/tabContentComponents/galleryComponents/galleryCard.vue @@ -12,16 +12,16 @@ /> -

{{ scanData.name }}

+
-
+
-
+
    -
  • {{ scanData.number_of_images }} images
  • -
  • Created: {{ formatDate(scanData.created) }}
  • -
  • Duration: {{ formatDuration(scanData.duration) }}
  • +
  • {{ itemData.number_of_images }} images
  • +
  • Created: {{ formatDate(itemData.created) }}
  • +
  • Duration: {{ formatDuration(itemData.duration) }}
    -
  • +
  • Not enough images to stitch
  • -
  • +
  • Interactive preview not available
  • -
  • +
  • High quality stitch not available
@@ -85,21 +85,17 @@ import { useSettingsStore } from "@/stores/settings.js"; // Export main app export default { - name: "ScanCard", + name: "GalleryCard", components: { actionButton, EndpointButton, }, props: { - scanData: { + itemData: { type: Object, required: true, }, - scansUri: { - type: String, - required: true, - }, }, emits: ["viewer-requested", "update-requested"], @@ -107,10 +103,10 @@ export default { computed: { ...mapState(useSettingsStore, ["baseUri"]), downloadStitchFile() { - return `${this.baseUri}/smart_scan/get_stitch/${this.scanData.name}`; + return `${this.baseUri}/smart_scan/get_stitch/${this.itemData.name}`; }, thumbnailPath() { - return `${this.baseUri}/smart_scan/scans/stitched_thumbnail.jpg?scan_name=${this.scanData.name}&modified=${this.scanData.modified}`; + return `${this.baseUri}/smart_scan/scans/stitched_thumbnail.jpg?scan_name=${this.itemData.name}&modified=${this.itemData.modified}`; }, }, @@ -142,14 +138,14 @@ export default { }, requestViewer() { // Notify parent that thumbnail was clicked - this.$emit("viewer-requested", this.scanData); + this.$emit("viewer-requested", this.itemData); }, async deleteScan() { try { - await this.modalConfirm(`Are you sure you want to delete ${this.scanData.name}?`); - await axios.delete(`${this.scansUri}/${this.scanData.name}`); + await this.modalConfirm(`Are you sure you want to delete ${this.itemData.name}?`); + await axios.delete(`${this.baseUri}/smart_scan/scans/${this.itemData.name}`); this.$emit("update-requested"); - this.modalNotify(`Deleted ${this.scanData.name}`); + this.modalNotify(`Deleted ${this.itemData.name}`); } catch (e) { // if the confirmation was cancelled, it's rejected with null error if (e) this.modalError(e); @@ -189,11 +185,11 @@ ul { font-weight: bold; } -.scan-card-buttons { +.gallery-card-buttons { width: 100%; } -.scan-card-title { +.gallery-card-title { text-align: center; } diff --git a/webapp/src/components/tabContentComponents/scanListComponents/openSeadragonViewer.vue b/webapp/src/components/tabContentComponents/galleryComponents/openSeadragonViewer.vue similarity index 100% rename from webapp/src/components/tabContentComponents/scanListComponents/openSeadragonViewer.vue rename to webapp/src/components/tabContentComponents/galleryComponents/openSeadragonViewer.vue diff --git a/webapp/src/components/tabContentComponents/scanListComponents/scanViewer.vue b/webapp/src/components/tabContentComponents/galleryComponents/scanViewer.vue similarity index 100% rename from webapp/src/components/tabContentComponents/scanListComponents/scanViewer.vue rename to webapp/src/components/tabContentComponents/galleryComponents/scanViewer.vue diff --git a/webapp/src/components/tabContentComponents/scanListContent.vue b/webapp/src/components/tabContentComponents/galleryContent.vue similarity index 74% rename from webapp/src/components/tabContentComponents/scanListContent.vue rename to webapp/src/components/tabContentComponents/galleryContent.vue index b8b85319..48ab275e 100644 --- a/webapp/src/components/tabContentComponents/scanListContent.vue +++ b/webapp/src/components/tabContentComponents/galleryContent.vue @@ -5,7 +5,7 @@
-
+ @@ -47,16 +47,15 @@