Pdf viewer : reload only on file change

This commit is contained in:
isUnknown 2024-12-19 15:02:18 +01:00
parent 94c35eadaf
commit ad6f7736c0
2 changed files with 17 additions and 6 deletions

View file

@ -14,7 +14,9 @@
data-icon="comment"
@click="isCommentsOpen = !isCommentsOpen"
>
<span class="sr-only">{{ isCommentsOpen ? 'Masquer' : 'Afficher' }} les commentaires</span>
<span class="sr-only"
>{{ isCommentsOpen ? "Masquer" : "Afficher" }} les commentaires</span
>
</button>
<Comments v-if="isCommentsOpen" @show-draft-marker="showDraftMarker" />
</template>
@ -49,8 +51,8 @@ watch(isCommentsOpen, (newVal) => {
}
});
watch(openedFile, (newVal) => {
if (!location.href.includes("virtual-sample")) return;
watch(openedFile, (newVal, oldVal) => {
if (newVal.url === oldVal.url) return;
isViewerDisabled.value = true;