add waitingForComment position state
This commit is contained in:
parent
b99c05062f
commit
3e57a4bdc9
3 changed files with 7 additions and 2 deletions
|
|
@ -65,7 +65,7 @@
|
|||
</button>
|
||||
<!-- TODO: afficher #new-comment une fois le bouton Ajouter un commentaire cliqué -->
|
||||
<div
|
||||
hidden
|
||||
v-if="waitingForCommentPosition"
|
||||
id="new-comment"
|
||||
class="bg-primary | text-sm text-white | rounded-lg | p-12"
|
||||
>
|
||||
|
|
@ -131,6 +131,7 @@ const newCommentPosition = ref(null);
|
|||
const newCommentText = ref("");
|
||||
const isAddOpen = ref(false);
|
||||
const route = useRoute();
|
||||
const waitingForCommentPosition = ref(false);
|
||||
|
||||
const sortedComments = computed(() => comments.value.reverse());
|
||||
const sortedReplies = ref(null);
|
||||
|
|
@ -209,9 +210,11 @@ function closeComment() {
|
|||
|
||||
function toggleCommentPositionMode(enable) {
|
||||
if (enable) {
|
||||
waitingForCommentPosition.value = true;
|
||||
viewContainer.classList.add("waiting-comment");
|
||||
viewContainer.addEventListener("click", handleCommentPositionClick);
|
||||
} else {
|
||||
waitingForCommentPosition.value = false;
|
||||
viewContainer.classList.remove("waiting-comment");
|
||||
viewContainer.removeEventListener("click", handleCommentPositionClick);
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,10 +5,13 @@
|
|||
dialog.content.slug === 'proposal'
|
||||
"
|
||||
/>
|
||||
|
||||
<VirtualSample v-if="dialog.content.slug === 'virtual-sample'" />
|
||||
</template>
|
||||
<script setup>
|
||||
import PdfViewer from "./brief/PdfViewer.vue";
|
||||
import { useDialogStore } from "../../stores/dialog";
|
||||
import VirtualSample from "./VirtualSample.vue";
|
||||
|
||||
const dialog = useDialogStore();
|
||||
</script>
|
||||
|
|
|
|||
|
|
@ -90,7 +90,6 @@
|
|||
<script setup>
|
||||
import Dialog from "primevue/dialog";
|
||||
import { ref, watch } from "vue";
|
||||
import ProductViewer from "./ProductViewer.vue";
|
||||
|
||||
const { file } = defineProps({
|
||||
file: Object,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue