Skip to content

Commit 3e2a952

Browse files
committed
fix(notification): improve notification display and sorting
1 parent c8b5fad commit 3e2a952

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

app/src/components/Notification/Notification.vue

+3-2
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ function newSSE() {
6969
7070
function init() {
7171
loading.value = true
72-
notificationApi.get_list().then(r => {
72+
notificationApi.get_list({ sort: 'desc', order_by: 'created_at' }).then(r => {
7373
data.value = r.data
7474
unreadCount.value = r.pagination?.total || 0
7575
}).finally(() => {
@@ -182,7 +182,8 @@ function viewAll() {
182182
<template #description>
183183
<div class="flex justify-between items-center">
184184
<div>
185-
{{ notifications[item.title].content(item.details) }}
185+
{{ notifications[item.title]?.content(item.details)
186+
|| item.content || item.details }}
186187
</div>
187188
<span
188189
key="list-loadmore-remove"

0 commit comments

Comments
 (0)