From 92007f71614d9f02e894acd5b55129e98d953825 Mon Sep 17 00:00:00 2001
From: isUnknown
Date: Fri, 6 Jun 2025 09:33:08 +0200
Subject: [PATCH] adapt kanban images show to new structure
---
src/components/Selector.vue | 14 +++++++++++++-
src/components/project/cards/Images.vue | 13 ++++++++++---
.../project/cards/VirtualSample.vue | 17 +++++++++++------
.../project/virtual-sample/DynamicView.vue | 1 -
src/stores/virtualSample.js | 19 ++++++++++++++-----
5 files changed, 48 insertions(+), 16 deletions(-)
diff --git a/src/components/Selector.vue b/src/components/Selector.vue
index 7c4dba1..9277351 100644
--- a/src/components/Selector.vue
+++ b/src/components/Selector.vue
@@ -6,7 +6,19 @@
>
+
+
- Select...
+ Selectionnez
diff --git a/src/components/project/cards/Images.vue b/src/components/project/cards/Images.vue
index b76ad66..463bfcc 100644
--- a/src/components/project/cards/Images.vue
+++ b/src/components/project/cards/Images.vue
@@ -12,7 +12,12 @@
:data-plus="images.length > 3 ? images.length - 3 : undefined"
>
-
+
@@ -35,6 +40,7 @@
diff --git a/src/components/project/virtual-sample/DynamicView.vue b/src/components/project/virtual-sample/DynamicView.vue
index 8d555ac..92837a7 100644
--- a/src/components/project/virtual-sample/DynamicView.vue
+++ b/src/components/project/virtual-sample/DynamicView.vue
@@ -105,7 +105,6 @@ const tracks = computed(() => {
});
const isSingleImage = computed(() => {
- console.log(activeTracks.value);
return (
activeTracks.value?.length === 1 &&
activeTracks.value[0]?.files?.length === 1
diff --git a/src/stores/virtualSample.js b/src/stores/virtualSample.js
index 0277c11..99c4dc2 100644
--- a/src/stores/virtualSample.js
+++ b/src/stores/virtualSample.js
@@ -6,22 +6,31 @@ import { useDialogStore } from './dialog';
export const useVirtualSampleStore = defineStore('virtual-sample', () => {
const { page } = storeToRefs(usePageStore());
const { openedFile } = storeToRefs(useDialogStore());
- const step = computed(() => {
- return page.value.steps.find((step) => step.id === 'virtualSample');
- });
- const isCompareModeEnabled = ref(false);
- const activeTab = ref(step.value.files.dynamic ? 'dynamic' : 'static');
+ const isCompareModeEnabled = ref(false);
const currentFile = ref(null);
const isLoopAnimationEnabled = ref(false);
const isDownloadTriggered = ref(false);
+ const step = computed(() => {
+ return page.value.steps.find((step) => step.id === 'virtualSample');
+ });
+
+ const activeTab = computed(() =>
+ step.value.files.dynamic ? 'dynamic' : 'static'
+ );
+
+ const allVariations = computed(() =>
+ Object.values(step.value.files?.dynamic).flat(1)
+ );
+
watch(activeTab, () => (currentFile.value = null));
return {
activeTab,
currentFile,
step,
+ allVariations,
isLoopAnimationEnabled,
isCompareModeEnabled,
isDownloadTriggered,