diff --git a/frontend_nuxt/components/TimelineTagItem.vue b/frontend_nuxt/components/TimelineTagItem.vue new file mode 100644 index 000000000..09406540e --- /dev/null +++ b/frontend_nuxt/components/TimelineTagItem.vue @@ -0,0 +1,126 @@ + + + + + diff --git a/frontend_nuxt/pages/users/[id].vue b/frontend_nuxt/pages/users/[id].vue index 95fc1c959..aef398201 100644 --- a/frontend_nuxt/pages/users/[id].vue +++ b/frontend_nuxt/pages/users/[id].vue @@ -143,15 +143,7 @@
@@ -164,15 +156,7 @@
@@ -222,16 +206,7 @@ @@ -297,6 +272,7 @@ import BaseTabs from '~/components/BaseTabs.vue' import LevelProgress from '~/components/LevelProgress.vue' import TimelineCommentGroup from '~/components/TimelineCommentGroup.vue' import TimelinePostItem from '~/components/TimelinePostItem.vue' +import TimelineTagItem from '~/components/TimelineTagItem.vue' import UserList from '~/components/UserList.vue' import { toast } from '~/main' import { authState, getToken } from '~/utils/auth' @@ -386,7 +362,12 @@ const fetchSummary = async () => { const postsRes = await fetch(`${API_BASE_URL}/api/users/${username}/hot-posts`) if (postsRes.ok) { const data = await postsRes.json() - hotPosts.value = data.map((p) => ({ icon: 'file-text', post: p })) + hotPosts.value = data.map((p) => ({ + icon: 'file-text', + type: 'post', + post: p, + createdAt: p.createdAt, + })) } const repliesRes = await fetch(`${API_BASE_URL}/api/users/${username}/hot-replies`) @@ -398,7 +379,12 @@ const fetchSummary = async () => { const tagsRes = await fetch(`${API_BASE_URL}/api/users/${username}/hot-tags`) if (tagsRes.ok) { const data = await tagsRes.json() - hotTags.value = data.map((t) => ({ icon: 'tag-one', tag: t })) + hotTags.value = data.map((t) => ({ + icon: 'tag-one', + type: 'tag', + tag: t, + createdAt: t.createdAt, + })) } }