virtual sample : show static vue files
This commit is contained in:
parent
1398da62be
commit
9ed050b122
6 changed files with 42 additions and 7 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@
|
|||
<template #header>
|
||||
<div class="dialog__tabs">
|
||||
<button
|
||||
v-if="step.files.dynamic"
|
||||
class="btn btn--transparent | font-serif"
|
||||
data-icon="cursor"
|
||||
:aria-pressed="activeTab === 'dynamic' ? true : false"
|
||||
|
|
@ -20,6 +21,7 @@
|
|||
<span>Vue Dynamique</span>
|
||||
</button>
|
||||
<button
|
||||
v-if="step.files.static"
|
||||
@click="activeTab = 'static'"
|
||||
class="btn btn--transparent | font-serif"
|
||||
data-icon="image"
|
||||
|
|
@ -82,13 +84,15 @@ import StaticView from "./StaticView.vue";
|
|||
import { ref } from "vue";
|
||||
import { useDialogStore } from "../../../stores/dialog";
|
||||
import { useVirtualSampleStore } from "../../../stores/virtualSample";
|
||||
import { usePageStore } from "../../../stores/page";
|
||||
|
||||
const { file } = defineProps({
|
||||
file: Object,
|
||||
});
|
||||
|
||||
const { page } = usePageStore();
|
||||
const { comments } = storeToRefs(useDialogStore());
|
||||
const { activeTab, currentFile } = storeToRefs(useVirtualSampleStore());
|
||||
const { activeTab, currentFile, step } = storeToRefs(useVirtualSampleStore());
|
||||
|
||||
// Variables
|
||||
const isOpen = ref(true);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue