show comments corresponding to current file
This commit is contained in:
parent
0d7d8e3f59
commit
cd9de2572a
3 changed files with 59 additions and 56 deletions
|
|
@ -66,8 +66,8 @@
|
|||
>
|
||||
<span>{{
|
||||
!isLoopAnimationEnabled
|
||||
? "Animation en boucle"
|
||||
: "Arrêter l’animation"
|
||||
? 'Animation en boucle'
|
||||
: 'Arrêter l’animation'
|
||||
}}</span>
|
||||
</button>
|
||||
<button
|
||||
|
|
@ -79,7 +79,7 @@
|
|||
@click="isCommentsOpen = !isCommentsOpen"
|
||||
>
|
||||
<span class="sr-only"
|
||||
>{{ isCommentsOpen ? "Masquer" : "Afficher" }} les commentaires</span
|
||||
>{{ isCommentsOpen ? 'Masquer' : 'Afficher' }} les commentaires</span
|
||||
>
|
||||
</button>
|
||||
</template>
|
||||
|
|
@ -92,17 +92,17 @@
|
|||
</template>
|
||||
|
||||
<script setup>
|
||||
import Comments from "../../comments/Comments.vue";
|
||||
import Dialog from "primevue/dialog";
|
||||
import DynamicView from "./DynamicView.vue";
|
||||
import StaticView from "./StaticView.vue";
|
||||
import DTLPanel from "../../design-to-light/DTLPanel.vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { ref, watch, computed } from "vue";
|
||||
import { useVirtualSampleStore } from "../../../stores/virtualSample";
|
||||
import { useDialogStore } from "../../../stores/dialog";
|
||||
import { useRoute, useRouter } from "vue-router";
|
||||
import { usePageStore } from "../../../stores/page";
|
||||
import Comments from '../../comments/Comments.vue';
|
||||
import Dialog from 'primevue/dialog';
|
||||
import DynamicView from './DynamicView.vue';
|
||||
import StaticView from './StaticView.vue';
|
||||
import DTLPanel from '../../design-to-light/DTLPanel.vue';
|
||||
import { storeToRefs } from 'pinia';
|
||||
import { ref, watch, computed } from 'vue';
|
||||
import { useVirtualSampleStore } from '../../../stores/virtualSample';
|
||||
import { useDialogStore } from '../../../stores/dialog';
|
||||
import { useRoute, useRouter } from 'vue-router';
|
||||
import { usePageStore } from '../../../stores/page';
|
||||
|
||||
const { file } = defineProps({
|
||||
file: Object,
|
||||
|
|
@ -130,17 +130,18 @@ const isOpen = ref(true);
|
|||
watch(isOpen, (newValue) => {
|
||||
router.push({ name: route.name });
|
||||
openedFile.value = null;
|
||||
activeTracks.value = null;
|
||||
});
|
||||
|
||||
const downloadText = computed(() => {
|
||||
if (activeTab.value === "dynamic") {
|
||||
if (activeTab.value === 'dynamic') {
|
||||
if (activeTracks.value.length === 1) {
|
||||
return "Télécharger l'image";
|
||||
} else {
|
||||
return "Télécharger les images";
|
||||
return 'Télécharger les images';
|
||||
}
|
||||
} else {
|
||||
return "Télécharger le PDF";
|
||||
return 'Télécharger le PDF';
|
||||
}
|
||||
});
|
||||
|
||||
|
|
@ -149,16 +150,16 @@ const correspondingDTLProposal = computed(() => {
|
|||
if (!hasDTLProposal || !isOpen.value || !openedFile.value) return false;
|
||||
|
||||
const correspondingDTLProposal = page.value.designToLight.find((proposal) => {
|
||||
if (activeTab.value === "dynamic") {
|
||||
if (activeTab.value === 'dynamic') {
|
||||
return (
|
||||
proposal.location.type === "dynamic" &&
|
||||
proposal.location.type === 'dynamic' &&
|
||||
activeTracks?.value?.some(
|
||||
(activeTrack) => activeTrack.slug === proposal.location.trackSlug
|
||||
)
|
||||
);
|
||||
} else {
|
||||
return (
|
||||
proposal.location.type === "static" &&
|
||||
proposal.location.type === 'static' &&
|
||||
openedFile.value?.source === proposal.location.source
|
||||
);
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue