comments working
This commit is contained in:
parent
375bed1d01
commit
0b472988a2
14 changed files with 107 additions and 59 deletions
|
|
@ -85,6 +85,7 @@ import { useApiStore } from "../../stores/api";
|
|||
import { useDialogStore } from "../../stores/dialog";
|
||||
import { computed, onMounted, ref, useTemplateRef } from "vue";
|
||||
import { storeToRefs } from "pinia";
|
||||
import { usePageStore } from "../../stores/page";
|
||||
|
||||
dayjs.locale("fr");
|
||||
|
||||
|
|
@ -102,6 +103,7 @@ const { activeTracks, openedComment } = storeToRefs(useDialogStore());
|
|||
const draftText = ref(comment.text);
|
||||
const editField = ref(null);
|
||||
const commentNode = useTemplateRef("comment-node");
|
||||
const { page } = storeToRefs(usePageStore());
|
||||
let correspondingMarker = null;
|
||||
|
||||
// Functions
|
||||
|
|
@ -143,7 +145,7 @@ function handleClick() {
|
|||
async function read() {
|
||||
if (getStatus.value !== "unread") return;
|
||||
try {
|
||||
const newNotification = await api.readNotification(comment);
|
||||
const newNotification = await api.readNotification(comment, page.value.uri);
|
||||
console.log(newNotification);
|
||||
userStore.readNotification(comment.id);
|
||||
} catch (error) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue