mirror of
https://github.com/nagisa77/OpenIsle.git
synced 2026-02-24 23:20:49 +08:00
feat: update profile page
This commit is contained in:
@@ -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)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user