Merge branch 'main' of https://framagit.org/isUnknown/design-to-pack
* 'main' of https://framagit.org/isUnknown/design-to-pack: #88 - fix edit comment system delete reply working
This commit is contained in:
commit
bc1722495f
5 changed files with 16 additions and 17 deletions
|
|
@ -121,8 +121,9 @@ dayjs.locale("fr");
|
|||
const { user } = useUserStore();
|
||||
const { page } = usePageStore();
|
||||
const dialog = useDialogStore();
|
||||
const { comments, openedFile, draftComment, activeTracks, isEditCommentMode } =
|
||||
storeToRefs(useDialogStore());
|
||||
const { comments, openedFile, draftComment, activeTracks } = storeToRefs(
|
||||
useDialogStore()
|
||||
);
|
||||
const api = useApiStore();
|
||||
|
||||
const openedComment = ref(null);
|
||||
|
|
@ -304,11 +305,11 @@ function prepareDraftCommentInImage(event) {
|
|||
}
|
||||
|
||||
function openComment(comment) {
|
||||
if (isEditCommentMode.value) return;
|
||||
if (comment.isEditMode) return;
|
||||
|
||||
openedComment.value = comment;
|
||||
|
||||
if (activeTracks?.value.length === 1) {
|
||||
if (activeTracks.value?.length === 1) {
|
||||
openedFile.value = activeTracks.value[0].files.find(
|
||||
(file) => file.uuid === openedComment.value.location.file.uuid
|
||||
);
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue