#137 - create single image component and add download image function

This commit is contained in:
isUnknown 2025-02-26 15:12:15 +01:00
parent 1cd55b98d6
commit 1ed7aa9c5b
5 changed files with 63 additions and 33 deletions

View file

@ -1,13 +1,15 @@
import { defineStore } from "pinia";
import { ref, watch } from "vue";
import { usePageStore } from "./page";
import { defineStore, storeToRefs } from 'pinia';
import { ref, watch } from 'vue';
import { usePageStore } from './page';
import { useDialogStore } from './dialog';
export const useVirtualSampleStore = defineStore("virtual-sample", () => {
export const useVirtualSampleStore = defineStore('virtual-sample', () => {
const { page } = usePageStore();
const step = page.steps.find((step) => step.id === "virtualSample");
const { openedFile } = storeToRefs(useDialogStore());
const step = page.steps.find((step) => step.id === 'virtualSample');
const isCompareModeEnabled = ref(false);
const activeTab = ref(step.files.dynamic ? "dynamic" : "static");
const activeTab = ref(step.files.dynamic ? 'dynamic' : 'static');
const currentFile = ref(null);
const isLoopAnimationEnabled = ref(false);
const isDownloadTriggered = ref(false);