feat(sns): add contact timeline dialog components

This commit is contained in:
aits2026
2026-03-06 10:22:24 +08:00
parent ad217d4a3b
commit bc2ab60c59
5 changed files with 1049 additions and 10 deletions

View File

@@ -0,0 +1,26 @@
export interface ContactSnsTimelineTarget {
username: string
displayName: string
avatarUrl?: string
}
export interface ContactSnsRankItem {
name: string
count: number
latestTime: number
}
export type ContactSnsRankMode = 'likes' | 'comments'
export const isSingleContactSession = (sessionId: string): boolean => {
const normalized = String(sessionId || '').trim()
if (!normalized) return false
if (normalized.includes('@chatroom')) return false
if (normalized.startsWith('gh_')) return false
return true
}
export const getAvatarLetter = (name: string): string => {
if (!name) return '?'
return [...name][0] || '?'
}