style(sns): move friends count to contact header

This commit is contained in:
aits2026
2026-03-06 15:42:10 +08:00
parent 5fd846bfc8
commit 1c89ee2797
3 changed files with 25 additions and 1 deletions

View File

@@ -1021,9 +1021,21 @@
padding: 2px 6px;
border-radius: 10px;
}
.widget-header-summary {
margin-left: auto;
font-size: 12px;
font-weight: 500;
color: var(--text-tertiary);
white-space: nowrap;
}
}
}
.contact-widget .widget-header .badge + .widget-header-summary {
margin-left: 8px;
}
/* Search Widget */
.input-group {
position: relative;

View File

@@ -451,7 +451,7 @@ export default function SnsPage() {
if (overviewStatsStatus === 'loading') {
return '统计中...'
}
return `${overviewStats.totalPosts} ${formatDateOnly(overviewStats.earliestTime)} ~ ${formatDateOnly(overviewStats.latestTime)} ${overviewStats.totalFriends} 位好友`
return `${overviewStats.totalPosts} ${formatDateOnly(overviewStats.earliestTime)} ~ ${formatDateOnly(overviewStats.latestTime)}`
}
const loadPosts = useCallback(async (options: { reset?: boolean, direction?: 'older' | 'newer' } = {}) => {
@@ -1112,6 +1112,13 @@ export default function SnsPage() {
setSearchKeyword={setSearchKeyword}
jumpTargetDate={jumpTargetDate}
setJumpTargetDate={setJumpTargetDate}
totalFriendsLabel={
overviewStatsStatus === 'loading'
? '统计中'
: overviewStatsStatus === 'ready'
? `${overviewStats.totalFriends} 位好友`
: undefined
}
selectedUsernames={selectedUsernames}
setSelectedUsernames={setSelectedUsernames}
contacts={contacts}