virtual sample : show static vue files

This commit is contained in:
isUnknown 2024-11-21 13:20:57 +01:00
parent 1398da62be
commit 9ed050b122
6 changed files with 42 additions and 7 deletions

View file

@ -1,6 +1,7 @@
<template>
<header role="tablist" aria-labelledby="tablist">
<button
v-if="step.files.static.rawGlass"
id="verre-brut-label"
type="button"
role="tab"
@ -11,6 +12,7 @@
<span class="label">Verre brut</span>
</button>
<button
v-if="step.files.static.finishedGlass"
id="verre-paracheve-label"
type="button"
role="tab"
@ -21,10 +23,26 @@
</button>
</header>
<div class="dialog__inner" id="verre-brut">
<!-- PdvViewer -->
<VPdfViewer
:darkMode="true"
:initialThumbnailsVisible="true"
:src="openedFile.url"
local="fr_FR"
@loaded="onPdfLoaded"
/>
</div>
</template>
<script setup>
import { ref } from "vue";
import { useVirtualSampleStore } from "../../../stores/virtualSample";
import { VPdfViewer, useLicense } from "@vue-pdf-viewer/viewer";
const { step } = useVirtualSampleStore();
const activeTab = ref(Object.keys(step.files.static)[0]);
const openedFile = ref(step.files.static[activeTab.value]);
</script>
<style scoped>
.dialog__inner {
background-color: inherit;