From d9b8e578c1f950aada899da1fcd791617b73a39f Mon Sep 17 00:00:00 2001 From: Tim <135014430+nagisa77@users.noreply.github.com> Date: Wed, 9 Jul 2025 17:03:04 +0800 Subject: [PATCH] Improve timeline details --- open-isle-cli/src/views/ProfileView.vue | 64 +++++++++++++++++++++++-- 1 file changed, 59 insertions(+), 5 deletions(-) diff --git a/open-isle-cli/src/views/ProfileView.vue b/open-isle-cli/src/views/ProfileView.vue index b40ff61ff..1f5d0b534 100644 --- a/open-isle-cli/src/views/ProfileView.vue +++ b/open-isle-cli/src/views/ProfileView.vue @@ -67,7 +67,39 @@
热门回复
- + + +
暂无热门回复
@@ -76,7 +108,22 @@
热门话题
- + + +
暂无热门话题
@@ -133,6 +180,7 @@ import { ref, onMounted } from 'vue' import { useRoute } from 'vue-router' import { API_BASE_URL } from '../main' import BaseTimeline from '../components/BaseTimeline.vue' +import { stripMarkdown } from '../utils/markdown' import { hatch } from 'ldrs' hatch.register() @@ -166,7 +214,7 @@ export default { const data = await res.json() hotPosts.value = data.map(p => ({ icon: 'fas fa-book', - content: p.title + post: p })) } @@ -175,7 +223,7 @@ export default { const data = await res.json() hotReplies.value = data.map(c => ({ icon: 'fas fa-comment', - content: c.content + comment: c })) } @@ -207,7 +255,7 @@ export default { } onMounted(fetchData) - return { user, hotPosts, hotReplies, timelineItems, isLoading, selectedTab, formatDate } + return { user, hotPosts, hotReplies, timelineItems, isLoading, selectedTab, formatDate, stripMarkdown } } } @@ -343,6 +391,12 @@ export default { margin-top: 5px; } +.timeline-snippet { + font-size: 14px; + color: #666; + margin-top: 5px; +} + .timeline-link { font-weight: bold; color: var(--primary-color);