diff --git a/open-isle-cli/src/views/ProfileView.vue b/open-isle-cli/src/views/ProfileView.vue index 176030194..1dcf2862e 100644 --- a/open-isle-cli/src/views/ProfileView.vue +++ b/open-isle-cli/src/views/ProfileView.vue @@ -55,7 +55,43 @@
- + + +
@@ -117,8 +153,18 @@ export default { const posts = postsRes.ok ? await postsRes.json() : [] const replies = repliesRes.ok ? await repliesRes.json() : [] const mapped = [ - ...posts.map(p => ({ icon: 'fas fa-book', content: p.title, createdAt: p.createdAt })), - ...replies.map(r => ({ icon: 'fas fa-comment', content: r.content, createdAt: r.createdAt })) + ...posts.map(p => ({ + type: 'post', + icon: 'fas fa-book', + post: p, + createdAt: p.createdAt + })), + ...replies.map(r => ({ + type: r.parentComment ? 'reply' : 'comment', + icon: 'fas fa-comment', + comment: r, + createdAt: r.createdAt + })) ] mapped.sort((a, b) => new Date(b.createdAt) - new Date(a.createdAt)) timelineItems.value = mapped @@ -236,4 +282,20 @@ export default { .profile-timeline { padding: 20px; } + +.timeline-date { + font-size: 12px; + color: gray; + margin-top: 5px; +} + +.timeline-link { + font-weight: bold; + color: var(--primary-color); + text-decoration: none; +} + +.timeline-link:hover { + text-decoration: underline; +}