fix: 首页默认排序改为最近活动时间线

reply 按发帖与最后评论的较晚时间混排,零回复新帖不再沉底;默认文案改为「最新」。

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
2026-09-01 21:54:44 +08:00
parent ea9e0058d4
commit dff60dde6a
8 changed files with 12 additions and 18 deletions

View File

@@ -224,7 +224,7 @@ export interface FeedSortTab {
}
export const DEFAULT_FEED_SORT_TABS: FeedSortTab[] = [
{ id: 'reply', label: '新评论', enabled: true },
{ id: 'reply', label: '新', enabled: true },
{ id: 'latest', label: '新帖子', enabled: true },
{ id: 'hot', label: '推荐帖', enabled: true },
];

View File

@@ -15,7 +15,7 @@ import type { FeedSortTab } from '../api/types';
export type FeedSort = 'latest' | 'reply' | 'hot';
const SORT_META: Record<FeedSort, { hint: string; icon: typeof Clock }> = {
reply: { hint: '最近有人评论', icon: MessageCircle },
reply: { hint: '最近活动(发帖或评论', icon: MessageCircle },
latest: { hint: '按发帖时间', icon: Clock },
hot: { hint: '仅展示推荐帖', icon: BadgeCheck },
};

View File

@@ -5,7 +5,7 @@ import type { FeedSortId, FeedSortTab } from '../../api/types';
import { normalizeFeedSortTabs } from '../../utils/feedSortTabs';
const TAB_META: Record<FeedSortId, { hint: string; placeholder: string }> = {
reply: { hint: '按最后评论时间', placeholder: '新评论' },
reply: { hint: '按最近活动(发帖或评论)', placeholder: '新' },
latest: { hint: '按发帖时间', placeholder: '新帖子' },
hot: { hint: '仅展示推荐帖', placeholder: '推荐帖' },
};

View File

@@ -952,7 +952,7 @@ export default function AdminSettingsPage() {
<div className="admin-settings-subsection">
<h4 className="admin-settings-subsection-title"></h4>
<p className="admin-settings-subsection-desc">
</p>
<FeedSortTabList
tabs={normalizeFeedSortTabs(limits.feed_sort_tabs ?? DEFAULT_FEED_SORT_TABS)}

View File

@@ -4,7 +4,7 @@ import { DEFAULT_FEED_SORT_TABS } from '../api/types';
const FEED_SORT_IDS: FeedSortId[] = ['reply', 'latest', 'hot'];
const DEFAULT_LABELS: Record<FeedSortId, string> = {
reply: '新评论',
reply: '新',
latest: '新帖子',
hot: '推荐帖',
};