This commit is contained in:
isUnknown 2025-03-07 17:29:11 +01:00
parent 432f718b14
commit f34ceb1559
5 changed files with 38 additions and 34 deletions

View file

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