Merge branch 'main' of github.com:nagisa77/OpenIsle

This commit is contained in:
tim
2025-08-14 17:27:42 +08:00
2 changed files with 3 additions and 3 deletions

View File

@@ -265,7 +265,7 @@ const {
time: TimeManager.format( time: TimeManager.format(
selectedTopic.value === '最新回复' ? p.lastReplyAt || p.createdAt : p.createdAt, selectedTopic.value === '最新回复' ? p.lastReplyAt || p.createdAt : p.createdAt,
), ),
pinned: !!p.pinnedAt, pinned: Boolean(p.pinned ?? p.pinnedAt ?? p.pinned_at),
type: p.type, type: p.type,
})) }))
}, },
@@ -308,7 +308,7 @@ const fetchNextPage = async () => {
time: TimeManager.format( time: TimeManager.format(
selectedTopic.value === '最新回复' ? p.lastReplyAt || p.createdAt : p.createdAt, selectedTopic.value === '最新回复' ? p.lastReplyAt || p.createdAt : p.createdAt,
), ),
pinned: !!p.pinnedAt, pinned: Boolean(p.pinned ?? p.pinnedAt ?? p.pinned_at),
type: p.type, type: p.type,
})) }))
articles.value.push(...mapped) articles.value.push(...mapped)

View File

@@ -392,7 +392,7 @@ const mapComment = (c, parentUserName = '', level = 0) => ({
avatar: c.author.avatar, avatar: c.author.avatar,
text: c.content, text: c.content,
reactions: c.reactions || [], reactions: c.reactions || [],
pinned: !!c.pinnedAt, pinned: Boolean(c.pinned ?? c.pinnedAt ?? c.pinned_at),
reply: (c.replies || []).map((r) => mapComment(r, c.author.username, level + 1)), reply: (c.replies || []).map((r) => mapComment(r, c.author.username, level + 1)),
openReplies: level === 0, openReplies: level === 0,
src: c.author.avatar, src: c.author.avatar,