feat: update profile page

This commit is contained in:
tim
2025-07-09 13:28:15 +08:00
parent 90f33b0508
commit d9322307fe
5 changed files with 247 additions and 6 deletions

View File

@@ -106,7 +106,20 @@ export default {
return
}
const data = await res.json()
notifications.value = data.map(n => ({ ...n, icon: iconMap[n.type] }))
for (const n of data) {
if (n.type === 'COMMENT_REPLY') {
notifications.value.push({
...n,
src: n.comment.author.avatar,
})
} else {
notifications.value.push({
...n,
icon: iconMap[n.type],
})
}
}
} catch (e) {
console.error(e)
}