feat: 赞赏后台

This commit is contained in:
Tim
2025-10-17 11:24:19 +08:00
parent 2db958f8c9
commit 8643446d8b
13 changed files with 359 additions and 45 deletions

View File

@@ -31,6 +31,7 @@ const iconMap = {
MENTION: 'HashtagKey',
POST_DELETED: 'ClearIcon',
POST_FEATURED: 'Star',
DONATION: 'PaperMoneyTwo',
}
export async function fetchUnreadCount() {
@@ -334,6 +335,18 @@ function createFetchNotifications() {
}
},
})
} else if (n.type === 'DONATION') {
arr.push({
...n,
src: n.fromUser ? n.fromUser.avatar : null,
icon: n.fromUser ? undefined : iconMap[n.type],
iconClick: () => {
if (n.post) {
markNotificationRead(n.id)
navigateTo(`/posts/${n.post.id}`, { replace: true })
}
},
})
} else if (n.type === 'REGISTER_REQUEST') {
arr.push({
...n,