fix(notification): improve notification display and sorting

This commit is contained in:
Jacky 2025-02-26 06:48:00 +00:00
parent c8b5fad08e
commit 3e2a95269e
No known key found for this signature in database
GPG key ID: 215C21B10DF38B4D

View file

@ -69,7 +69,7 @@ function newSSE() {
function init() { function init() {
loading.value = true loading.value = true
notificationApi.get_list().then(r => { notificationApi.get_list({ sort: 'desc', order_by: 'created_at' }).then(r => {
data.value = r.data data.value = r.data
unreadCount.value = r.pagination?.total || 0 unreadCount.value = r.pagination?.total || 0
}).finally(() => { }).finally(() => {
@ -182,7 +182,8 @@ function viewAll() {
<template #description> <template #description>
<div class="flex justify-between items-center"> <div class="flex justify-between items-center">
<div> <div>
{{ notifications[item.title].content(item.details) }} {{ notifications[item.title]?.content(item.details)
|| item.content || item.details }}
</div> </div>
<span <span
key="list-loadmore-remove" key="list-loadmore-remove"