fix: mark notifications as read when accessed
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
Some checks failed
Spell Check / Spell Check with Typos (push) Failing after 6s
This commit is contained in:
parent
fc4f2fd7e1
commit
3d3ba53a53
2 changed files with 78 additions and 60 deletions
|
|
@ -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"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue