virtual sample : create virtual sample store, activate dl image btn
This commit is contained in:
parent
a98665313f
commit
fc576e917b
4 changed files with 147 additions and 8 deletions
|
|
@ -31,17 +31,22 @@
|
|||
<h2 class="font-serif text-lg">Échantillon virtuel</h2>
|
||||
</template>
|
||||
|
||||
<Dynamic v-if="activeTab === 'dynamic'" />
|
||||
<Static v-if="activeTab === 'static'" />
|
||||
<DynamicView v-if="activeTab === 'dynamic'" />
|
||||
<StaticView v-if="activeTab === 'static'" />
|
||||
|
||||
<template #footer>
|
||||
<button
|
||||
<a
|
||||
v-if="currentFile"
|
||||
id="download-image"
|
||||
class="btn btn--white-10"
|
||||
data-icon="download"
|
||||
:href="currentFile.url"
|
||||
download
|
||||
>
|
||||
<span>Sauvegarder l’image</span>
|
||||
</button>
|
||||
<span>{{
|
||||
activeTab === "dynamic" ? "Télécharger l’image" : "Télécharger le PDF"
|
||||
}}</span>
|
||||
</a>
|
||||
<button
|
||||
id="loop-animation"
|
||||
class="btn btn--transparent btn--outline"
|
||||
|
|
@ -72,21 +77,22 @@
|
|||
<script setup>
|
||||
import { storeToRefs } from "pinia";
|
||||
import Dialog from "primevue/dialog";
|
||||
import Dynamic from "./Dynamic.vue";
|
||||
import Static from "./Static.vue";
|
||||
import DynamicView from "./DynamicView.vue";
|
||||
import StaticView from "./StaticView.vue";
|
||||
import { ref } from "vue";
|
||||
import { useDialogStore } from "../../../stores/dialog";
|
||||
import { useVirtualSampleStore } from "../../../stores/virtualSample";
|
||||
|
||||
const { file } = defineProps({
|
||||
file: Object,
|
||||
});
|
||||
|
||||
const { comments } = storeToRefs(useDialogStore());
|
||||
const { activeTab, currentFile } = storeToRefs(useVirtualSampleStore());
|
||||
|
||||
// Variables
|
||||
const isOpen = ref(true);
|
||||
const isCommentsOpen = ref(false);
|
||||
const activeTab = ref("dynamic");
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue