Add VirtualSample dialogD, create .dialog class
This commit is contained in:
parent
5e227d9fc3
commit
eed6f69f8f
5 changed files with 283 additions and 81 deletions
|
|
@ -1,5 +1,109 @@
|
|||
<template>
|
||||
<div>Échantillon virtuel</div>
|
||||
<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">
|
||||
<button
|
||||
class="btn btn--transparent | font-serif"
|
||||
data-icon="cursor"
|
||||
aria-pressed="true"
|
||||
>
|
||||
<span>Vue Dynamique</span>
|
||||
</button>
|
||||
<button
|
||||
class="btn btn--transparent | font-serif"
|
||||
data-icon="image"
|
||||
>
|
||||
<span>Vue statique</span>
|
||||
</button>
|
||||
</div>
|
||||
<h2 class="font-serif text-lg">Titre du rendu</h2>
|
||||
</template>
|
||||
<div class="dialog__inner">
|
||||
<header class="flex">
|
||||
<div class="options-selector">
|
||||
<button
|
||||
class="btn btn--image"
|
||||
aria-pressed="true"
|
||||
style="--btn-image: url('https://images.unsplash.com/photo-1708486855543-6010a133280f?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8MTJ8fHBhcmZ1bWUlMjBib3R0bGV8ZW58MHx8MHx8fDA%3D')"
|
||||
>
|
||||
<span>Piste 1</span>
|
||||
</button>
|
||||
<button
|
||||
class="btn btn--image"
|
||||
style="--btn-image: url('https://images.unsplash.com/photo-1680607622631-1e243ddd6782?w=500&auto=format&fit=crop&q=60&ixlib=rb-4.0.3&ixid=M3wxMjA3fDB8MHxzZWFyY2h8NHx8cGFyZnVtZSUyMGJvdHRsZXxlbnwwfHwwfHx8MA%3D%3D')"
|
||||
>
|
||||
<span>Piste 2</span>
|
||||
</button>
|
||||
</div>
|
||||
<button
|
||||
class="btn | ml-auto"
|
||||
>
|
||||
<span>Comparer les pistes</span>
|
||||
</button>
|
||||
</header>
|
||||
</div>
|
||||
<template #footer>
|
||||
<button
|
||||
id="download-image"
|
||||
class="btn btn--white-10"
|
||||
data-icon="download"
|
||||
>
|
||||
<span>Sauvegarder l’image</span>
|
||||
</button>
|
||||
<button
|
||||
id="loop-animation"
|
||||
class="btn btn--transparent btn--outline"
|
||||
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>
|
||||
</template>
|
||||
<script setup></script>
|
||||
<style scoped></style>
|
||||
|
||||
<script setup>
|
||||
import Dialog from "primevue/dialog";
|
||||
import { ref, watch } from "vue";
|
||||
|
||||
const { file } = defineProps({
|
||||
file: Object,
|
||||
});
|
||||
|
||||
// Variables
|
||||
const isOpen = ref(false);
|
||||
watch(isOpen, (newValue) => {
|
||||
emits("close");
|
||||
});
|
||||
const isCommentsOpen = ref(false);
|
||||
</script>
|
||||
|
||||
<style scoped>
|
||||
.dialog__inner {
|
||||
padding: var(--space-16);
|
||||
}
|
||||
</style>
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@
|
|||
modal
|
||||
:draggable="false"
|
||||
header="Titre du PDF"
|
||||
class="w-full | text-grey-800 | rounded-2xl | overflow-hidden"
|
||||
class="dialog"
|
||||
:class="{ 'with-comments': isCommentsOpen }"
|
||||
:closeOnEscape="true"
|
||||
>
|
||||
|
|
@ -24,7 +24,7 @@
|
|||
<button
|
||||
id="toggle-comments"
|
||||
:aria-pressed="isCommentsOpen"
|
||||
class="btn btn--transparent"
|
||||
class="btn btn--transparent btn--outline"
|
||||
data-icon="comment"
|
||||
@click="isCommentsOpen = !isCommentsOpen"
|
||||
>
|
||||
|
|
@ -111,44 +111,14 @@ function changeFile(newFile) {
|
|||
</script>
|
||||
|
||||
<style>
|
||||
#add-pdf {
|
||||
--max-w: min(100vw - var(--gutter) * 2, 77rem);
|
||||
--max-h: calc(100vh - var(--gutter) * 2 - 5.5rem);
|
||||
--header-h: 4.5rem;
|
||||
--comments-w: 22.5rem;
|
||||
max-width: var(--max-w);
|
||||
height: var(--max-h);
|
||||
background: black;
|
||||
margin: auto !important;
|
||||
}
|
||||
#add-pdf [data-pc-section="header"] {
|
||||
height: var(--header-h);
|
||||
padding: 1rem;
|
||||
color: var(--color-white);
|
||||
background: var(--color-white-20);
|
||||
display: flex;
|
||||
gap: var(--space-16);
|
||||
}
|
||||
#add-pdf [data-pc-section="header"] h2 {
|
||||
font-family: var(--font-serif);
|
||||
position: absolute;
|
||||
left: 0;
|
||||
right: 0;
|
||||
text-align: center;
|
||||
padding: 0 15rem;
|
||||
line-height: 2.5rem;
|
||||
}
|
||||
#add-pdf [data-pc-name="pcclosebutton"] {
|
||||
color: var(--color-white);
|
||||
}
|
||||
#vpv-container {
|
||||
width: var(--max-w);
|
||||
height: calc(var(--max-h) - var(--header-h));
|
||||
width: var(--dialog-max-w);
|
||||
height: calc(var(--dialog-max-h) - var(--dialog-header-h));
|
||||
background: black;
|
||||
position: relative;
|
||||
}
|
||||
.with-comments .vpv-pages-container-wrapper {
|
||||
margin-right: var(--comments-w, 20rem);
|
||||
margin-right: var(--dialog-comments-w, 20rem);
|
||||
}
|
||||
</style>
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue