fix: mark notifications as read when accessed
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s

This commit is contained in:
puriphatt 2025-03-10 14:39:24 +07:00
parent fc4f2fd7e1
commit 3d3ba53a53
2 changed files with 78 additions and 60 deletions

View file

@ -75,8 +75,13 @@ async function deleteNoti() {
}
function readNoti(id: string) {
const notification = noti.value.find((n) => n.id === id);
state.notiId = id;
state.notiDialog = true;
if (notification) {
notification.read = true;
}
}
onMounted(async () => {
@ -203,10 +208,10 @@ onMounted(async () => {
class="q-py-sm q-px-md rounded row no-wrap items-center"
@click.stop="readNoti(n.id)"
>
<!-- <div
<div
class="rounded"
:style="`background: hsl(var(--info-bg)/${n.read ? 0 : 1}); width: 6px; height: 6px`"
/> -->
/>
<q-checkbox
:model-value="selectedNoti.includes(n.id)"
size="xs"