2024-10-28 18:18:32 +01:00
|
|
|
|
<template>
|
2024-10-30 16:41:29 +01:00
|
|
|
|
<Dialog
|
|
|
|
|
|
id="virtual-sample"
|
|
|
|
|
|
v-model:visible="isOpen"
|
|
|
|
|
|
modal
|
|
|
|
|
|
:draggable="false"
|
|
|
|
|
|
header="Titre du rendu"
|
|
|
|
|
|
class="dialog"
|
|
|
|
|
|
:class="{ 'with-comments': isCommentsOpen }"
|
|
|
|
|
|
:closeOnEscape="true"
|
|
|
|
|
|
>
|
|
|
|
|
|
<template #header>
|
|
|
|
|
|
<div class="dialog__tabs">
|
2024-11-05 14:14:40 +01:00
|
|
|
|
<button
|
|
|
|
|
|
class="btn btn--transparent | font-serif"
|
2024-10-30 16:41:29 +01:00
|
|
|
|
data-icon="cursor"
|
|
|
|
|
|
aria-pressed="true"
|
|
|
|
|
|
>
|
|
|
|
|
|
<span>Vue Dynamique</span>
|
|
|
|
|
|
</button>
|
2024-11-05 14:14:40 +01:00
|
|
|
|
<button class="btn btn--transparent | font-serif" data-icon="image">
|
2024-10-30 16:41:29 +01:00
|
|
|
|
<span>Vue statique</span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
</div>
|
|
|
|
|
|
<h2 class="font-serif text-lg">Titre du rendu</h2>
|
|
|
|
|
|
</template>
|
2024-11-13 07:46:32 +01:00
|
|
|
|
|
2024-11-20 15:57:07 +01:00
|
|
|
|
<Dynamic />
|
|
|
|
|
|
|
2024-10-30 16:41:29 +01:00
|
|
|
|
<template #footer>
|
2024-11-05 14:14:40 +01:00
|
|
|
|
<button
|
2024-10-30 16:41:29 +01:00
|
|
|
|
id="download-image"
|
2024-11-05 14:14:40 +01:00
|
|
|
|
class="btn btn--white-10"
|
2024-10-30 16:41:29 +01:00
|
|
|
|
data-icon="download"
|
|
|
|
|
|
>
|
|
|
|
|
|
<span>Sauvegarder l’image</span>
|
|
|
|
|
|
</button>
|
2024-11-05 14:14:40 +01:00
|
|
|
|
<button
|
2024-10-30 16:41:29 +01:00
|
|
|
|
id="loop-animation"
|
2024-11-05 14:14:40 +01:00
|
|
|
|
class="btn btn--transparent btn--outline"
|
2024-10-30 16:41:29 +01:00
|
|
|
|
data-icon="loop"
|
|
|
|
|
|
>
|
|
|
|
|
|
<span>Animation en boucle</span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<button
|
|
|
|
|
|
id="toggle-comments"
|
|
|
|
|
|
:aria-pressed="isCommentsOpen"
|
|
|
|
|
|
class="btn btn--transparent btn--outline"
|
|
|
|
|
|
data-icon="comment"
|
|
|
|
|
|
@click="isCommentsOpen = !isCommentsOpen"
|
|
|
|
|
|
>
|
|
|
|
|
|
<span class="sr-only">Afficher les commentaires</span>
|
|
|
|
|
|
</button>
|
|
|
|
|
|
<Comments
|
|
|
|
|
|
v-if="isCommentsOpen"
|
|
|
|
|
|
:current-page-index="currentPageIndex"
|
|
|
|
|
|
:file="file"
|
|
|
|
|
|
:comments="file.comments"
|
|
|
|
|
|
@update:file="changeFile"
|
|
|
|
|
|
/>
|
|
|
|
|
|
</template>
|
|
|
|
|
|
</Dialog>
|
2024-10-28 18:18:32 +01:00
|
|
|
|
</template>
|
2024-10-30 16:41:29 +01:00
|
|
|
|
|
|
|
|
|
|
<script setup>
|
2024-11-20 08:26:12 +01:00
|
|
|
|
import { storeToRefs } from "pinia";
|
2024-10-30 16:41:29 +01:00
|
|
|
|
import Dialog from "primevue/dialog";
|
2024-11-20 15:57:07 +01:00
|
|
|
|
import Dynamic from "./Dynamic.vue";
|
2024-11-20 08:26:12 +01:00
|
|
|
|
import { computed, ref } from "vue";
|
2024-11-20 15:57:07 +01:00
|
|
|
|
import { usePageStore } from "../../../stores/page";
|
|
|
|
|
|
import { useDialogStore } from "../../../stores/dialog";
|
2024-10-30 16:41:29 +01:00
|
|
|
|
|
|
|
|
|
|
const { file } = defineProps({
|
|
|
|
|
|
file: Object,
|
|
|
|
|
|
});
|
2024-11-20 08:26:12 +01:00
|
|
|
|
|
2024-11-20 15:57:07 +01:00
|
|
|
|
const { comments } = storeToRefs(useDialogStore());
|
2024-10-30 16:41:29 +01:00
|
|
|
|
|
|
|
|
|
|
// Variables
|
2024-11-19 17:20:47 +01:00
|
|
|
|
const isOpen = ref(true);
|
2024-10-30 16:41:29 +01:00
|
|
|
|
const isCommentsOpen = ref(false);
|
|
|
|
|
|
</script>
|
|
|
|
|
|
|
|
|
|
|
|
<style scoped>
|
|
|
|
|
|
.dialog__inner {
|
|
|
|
|
|
padding: var(--space-16);
|
|
|
|
|
|
}
|
2024-11-20 08:26:12 +01:00
|
|
|
|
|
2024-11-20 15:11:06 +01:00
|
|
|
|
.track-container {
|
|
|
|
|
|
--w: 100%;
|
|
|
|
|
|
--h: calc(100% - 74px);
|
2024-11-20 08:26:12 +01:00
|
|
|
|
--x-steps: 14;
|
|
|
|
|
|
--y-steps: 5;
|
|
|
|
|
|
width: var(--w);
|
|
|
|
|
|
height: var(--h);
|
|
|
|
|
|
position: relative;
|
2024-11-20 15:11:06 +01:00
|
|
|
|
margin: var(--space-16) auto;
|
|
|
|
|
|
border-radius: var(--rounded-lg);
|
2024-11-20 08:26:12 +01:00
|
|
|
|
}
|
|
|
|
|
|
|
2024-11-20 15:11:06 +01:00
|
|
|
|
.track-container figure {
|
2024-11-20 08:26:12 +01:00
|
|
|
|
padding: 0;
|
|
|
|
|
|
margin: 0;
|
|
|
|
|
|
width: 100%;
|
|
|
|
|
|
height: 100%;
|
|
|
|
|
|
position: relative;
|
|
|
|
|
|
}
|
2024-11-20 15:11:06 +01:00
|
|
|
|
.track-container img {
|
2024-11-20 08:26:12 +01:00
|
|
|
|
display: block;
|
|
|
|
|
|
position: absolute;
|
|
|
|
|
|
inset: 0;
|
|
|
|
|
|
width: inherit;
|
|
|
|
|
|
height: inherit;
|
2024-11-20 15:11:06 +01:00
|
|
|
|
object-fit: contain;
|
2024-11-20 08:26:12 +01:00
|
|
|
|
}
|
2024-11-20 15:11:06 +01:00
|
|
|
|
.track-container fieldset {
|
|
|
|
|
|
--p: 0rem;
|
2024-11-20 08:26:12 +01:00
|
|
|
|
margin: 0;
|
|
|
|
|
|
padding: 0;
|
|
|
|
|
|
width: var(--w);
|
|
|
|
|
|
height: var(--h);
|
|
|
|
|
|
border: none;
|
|
|
|
|
|
}
|
2024-11-20 15:11:06 +01:00
|
|
|
|
.track-container button,
|
|
|
|
|
|
.track-container input {
|
2024-11-20 08:26:12 +01:00
|
|
|
|
position: absolute;
|
|
|
|
|
|
}
|
|
|
|
|
|
|
2024-11-20 15:11:06 +01:00
|
|
|
|
/* Buttons */
|
|
|
|
|
|
.track-container .btn--icon {
|
|
|
|
|
|
--icon-size: var(--space-24);
|
|
|
|
|
|
--icon-color: var(--color-grey-700);
|
|
|
|
|
|
width: var(--space-48);
|
|
|
|
|
|
height: var(--space-48);
|
|
|
|
|
|
max-height: var(--space-48);
|
|
|
|
|
|
background: transparent;
|
|
|
|
|
|
padding: var(--space-12);
|
2024-11-20 08:26:12 +01:00
|
|
|
|
}
|
2024-11-20 15:11:06 +01:00
|
|
|
|
.track-container .btn--icon:hover {
|
|
|
|
|
|
background: var(--color-black-10);
|
2024-11-20 08:26:12 +01:00
|
|
|
|
}
|
|
|
|
|
|
#y-up {
|
|
|
|
|
|
top: var(--p);
|
|
|
|
|
|
}
|
2024-11-20 15:11:06 +01:00
|
|
|
|
#y-up::before {
|
|
|
|
|
|
transform: rotate(90deg);
|
|
|
|
|
|
}
|
2024-11-20 08:26:12 +01:00
|
|
|
|
#y-down {
|
|
|
|
|
|
bottom: var(--p);
|
|
|
|
|
|
}
|
2024-11-20 15:11:06 +01:00
|
|
|
|
#y-down::before {
|
|
|
|
|
|
transform: rotate(-90deg);
|
|
|
|
|
|
}
|
2024-11-20 08:26:12 +01:00
|
|
|
|
#y-up,
|
|
|
|
|
|
#y-down {
|
|
|
|
|
|
text-align: center;
|
|
|
|
|
|
left: 50%;
|
|
|
|
|
|
transform: translateX(-50%);
|
|
|
|
|
|
}
|
|
|
|
|
|
#x-down {
|
|
|
|
|
|
left: var(--p);
|
|
|
|
|
|
}
|
|
|
|
|
|
#x-up {
|
|
|
|
|
|
right: var(--p);
|
|
|
|
|
|
}
|
2024-11-20 15:11:06 +01:00
|
|
|
|
#x-up::before {
|
|
|
|
|
|
transform: rotate(180deg);
|
|
|
|
|
|
}
|
2024-11-20 08:26:12 +01:00
|
|
|
|
#x-down,
|
|
|
|
|
|
#x-up {
|
|
|
|
|
|
top: 50%;
|
|
|
|
|
|
transform: translateY(-50%);
|
|
|
|
|
|
}
|
2024-10-30 16:41:29 +01:00
|
|
|
|
</style>
|