fix: 首页默认排序改为最近活动时间线
reply 按发帖与最后评论的较晚时间混排,零回复新帖不再沉底;默认文案改为「最新」。 Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -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 },
|
||||
];
|
||||
|
||||
@@ -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 },
|
||||
};
|
||||
|
||||
@@ -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: '推荐帖' },
|
||||
};
|
||||
|
||||
@@ -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)}
|
||||
|
||||
@@ -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: '推荐帖',
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user