fix comment problem

This commit is contained in:
isUnknown 2024-11-27 17:51:49 +01:00
parent 16d57ec024
commit cca389f1b0
10 changed files with 128 additions and 545 deletions

View file

@ -1,5 +1,6 @@
import { defineStore } from "pinia";
import { ref, computed } from "vue";
import { useRoute } from "vue-router";
export const useDialogStore = defineStore("dialog", () => {
const content = ref(null);
@ -15,5 +16,10 @@ export const useDialogStore = defineStore("dialog", () => {
openedFile.value = newFile;
}
return { content, openedFile, comments, updateFile };
const route = useRoute();
const isCommentsOpen = ref(
route.query.hasOwnProperty("comments") ? true : false
);
return { content, openedFile, comments, isCommentsOpen, updateFile };
});