|
|
@@ -450,8 +450,8 @@ function App(): JSX.Element {
|
|
|
return (
|
|
|
<>
|
|
|
<div className="search-bar" style={{ WebkitAppRegion: 'drag', position: 'relative', zIndex: 1 } as React.CSSProperties}>
|
|
|
- <div style={{ backgroundColor: '#e2e2e2', borderRadius: '4px', padding: '6px 8px', fontSize: '12px', color: '#666', display: 'flex', alignItems: 'center', WebkitAppRegion: 'no-drag', position: 'relative' } as React.CSSProperties}>
|
|
|
- <BsSearch style={{ marginRight: '5px' }} />
|
|
|
+ <div style={{ backgroundColor: 'var(--im-surface)', border: '1px solid var(--im-border)', borderRadius: 'var(--im-radius)', padding: '9px 11px', fontSize: '13px', color: 'var(--im-text-muted)', display: 'flex', alignItems: 'center', WebkitAppRegion: 'no-drag', position: 'relative', boxShadow: 'var(--im-shadow-sm)' } as React.CSSProperties}>
|
|
|
+ <BsSearch style={{ marginRight: '8px', color: 'var(--im-text-subtle)', fontSize: '15px' }} />
|
|
|
<input
|
|
|
type="text"
|
|
|
placeholder="搜索聊天记录"
|
|
|
@@ -482,8 +482,8 @@ function App(): JSX.Element {
|
|
|
outline: 'none',
|
|
|
backgroundColor: 'transparent',
|
|
|
flex: 1,
|
|
|
- fontSize: '12px',
|
|
|
- color: '#666'
|
|
|
+ fontSize: '13px',
|
|
|
+ color: 'var(--im-text)'
|
|
|
}}
|
|
|
/>
|
|
|
{searchQuery && (
|
|
|
@@ -492,7 +492,7 @@ function App(): JSX.Element {
|
|
|
e.stopPropagation()
|
|
|
setSearchQuery('')
|
|
|
}}
|
|
|
- style={{ cursor: 'pointer', marginLeft: '5px', fontSize: '14px' }}
|
|
|
+ style={{ cursor: 'pointer', marginLeft: '8px', fontSize: '16px', color: 'var(--im-text-subtle)' }}
|
|
|
>
|
|
|
✕
|
|
|
</span>
|
|
|
@@ -507,13 +507,13 @@ function App(): JSX.Element {
|
|
|
left: '10px',
|
|
|
right: '10px',
|
|
|
backgroundColor: '#fff',
|
|
|
- border: '1px solid #e7e7e7',
|
|
|
- borderRadius: '4px',
|
|
|
+ border: '1px solid var(--im-border)',
|
|
|
+ borderRadius: 'var(--im-radius)',
|
|
|
maxHeight: '300px',
|
|
|
overflowY: 'auto',
|
|
|
zIndex: 10000,
|
|
|
marginTop: '4px',
|
|
|
- boxShadow: '0 2px 8px rgba(0,0,0,0.1)',
|
|
|
+ boxShadow: 'var(--im-shadow-md)',
|
|
|
WebkitAppRegion: 'no-drag'
|
|
|
} as React.CSSProperties}
|
|
|
>
|
|
|
@@ -540,26 +540,26 @@ function App(): JSX.Element {
|
|
|
style={{
|
|
|
padding: '8px 12px',
|
|
|
cursor: 'pointer',
|
|
|
- borderBottom: '1px solid #f0f0f0',
|
|
|
+ borderBottom: '1px solid var(--im-border)',
|
|
|
fontSize: '12px'
|
|
|
}}
|
|
|
onMouseEnter={(e) => {
|
|
|
- e.currentTarget.style.backgroundColor = '#f5f5f5'
|
|
|
+ e.currentTarget.style.backgroundColor = '#f8fafc'
|
|
|
}}
|
|
|
onMouseLeave={(e) => {
|
|
|
e.currentTarget.style.backgroundColor = '#fff'
|
|
|
}}
|
|
|
>
|
|
|
<div style={{ display: 'flex', justifyContent: 'space-between', alignItems: 'center', marginBottom: '4px' }}>
|
|
|
- <div style={{ color: '#666', fontSize: '11px', fontWeight: '500' }}>
|
|
|
+ <div style={{ color: 'var(--im-text-muted)', fontSize: '11px', fontWeight: '600' }}>
|
|
|
{result.contactName}
|
|
|
</div>
|
|
|
- <div style={{ color: '#999', fontSize: '10px' }}>
|
|
|
+ <div style={{ color: 'var(--im-text-subtle)', fontSize: '10px' }}>
|
|
|
{formatFullDateTime(result.message.timestamp)}
|
|
|
</div>
|
|
|
</div>
|
|
|
<div style={{
|
|
|
- color: '#333',
|
|
|
+ color: 'var(--im-text)',
|
|
|
overflow: 'hidden',
|
|
|
textOverflow: 'ellipsis',
|
|
|
whiteSpace: 'nowrap'
|
|
|
@@ -579,11 +579,11 @@ function App(): JSX.Element {
|
|
|
left: '10px',
|
|
|
right: '10px',
|
|
|
backgroundColor: '#fff',
|
|
|
- border: '1px solid #e7e7e7',
|
|
|
- borderRadius: '4px',
|
|
|
+ border: '1px solid var(--im-border)',
|
|
|
+ borderRadius: 'var(--im-radius)',
|
|
|
padding: '12px',
|
|
|
textAlign: 'center',
|
|
|
- color: '#999',
|
|
|
+ color: 'var(--im-text-subtle)',
|
|
|
fontSize: '12px',
|
|
|
zIndex: 10000,
|
|
|
marginTop: '4px',
|
|
|
@@ -594,7 +594,7 @@ function App(): JSX.Element {
|
|
|
</div>
|
|
|
)}
|
|
|
</div>
|
|
|
- <div style={{ flex: 1, overflowY: 'auto' }}>
|
|
|
+ <div style={{ flex: 1, overflowY: 'auto', backgroundColor: 'var(--im-panel)' }}>
|
|
|
{contacts.map(contact => {
|
|
|
const remarkLabel = formatConversationRemark(contact.remarks)
|
|
|
return (
|
|
|
@@ -606,14 +606,15 @@ function App(): JSX.Element {
|
|
|
}}
|
|
|
style={{
|
|
|
display: 'flex',
|
|
|
- padding: '12px',
|
|
|
+ minHeight: '68px',
|
|
|
+ padding: '12px 14px',
|
|
|
cursor: 'pointer',
|
|
|
- backgroundColor: contact.id === activeContactId ? '#c6c6c6' : '#e6e6e6',
|
|
|
+ backgroundColor: contact.id === activeContactId ? 'var(--im-brand-soft)' : 'var(--im-panel)',
|
|
|
transition: 'background-color 0.2s',
|
|
|
- borderBottom: '1px solid #d6d6d6'
|
|
|
+ borderBottom: '1px solid var(--im-border)'
|
|
|
}}
|
|
|
>
|
|
|
- <div style={{ position: 'relative', marginRight: '10px', flexShrink: 0 }}>
|
|
|
+ <div style={{ position: 'relative', marginRight: '12px', flexShrink: 0 }}>
|
|
|
<div
|
|
|
style={{
|
|
|
width: '40px',
|
|
|
@@ -628,7 +629,7 @@ function App(): JSX.Element {
|
|
|
{contact.unreadCount > 0 && (
|
|
|
<div style={{
|
|
|
position: 'absolute', top: '-5px', right: '-5px',
|
|
|
- backgroundColor: '#ff3b30', color: 'white',
|
|
|
+ backgroundColor: 'var(--im-danger)', color: 'white',
|
|
|
borderRadius: '10px', padding: '0 5px', fontSize: '10px',
|
|
|
minWidth: '14px', height: '14px', lineHeight: '14px', textAlign: 'center'
|
|
|
}}>
|
|
|
@@ -639,14 +640,14 @@ function App(): JSX.Element {
|
|
|
<div style={{ flex: 1, overflow: 'hidden', display: 'flex', flexDirection: 'column', justifyContent: 'center' }}>
|
|
|
<div style={{ display: 'flex', justifyContent: 'space-between', marginBottom: '4px' }}>
|
|
|
<div style={{ display: 'flex', alignItems: 'center', flex: 1, marginRight: '8px', flexWrap: 'wrap' }}>
|
|
|
- <span style={{ fontWeight: '500', fontSize: '14px', color: '#000' }}>
|
|
|
+ <span style={{ fontWeight: '600', fontSize: '14px', color: 'var(--im-text)' }}>
|
|
|
{contact.name}
|
|
|
</span>
|
|
|
{remarkLabel && (
|
|
|
<span
|
|
|
style={{
|
|
|
fontSize: '11px',
|
|
|
- color: '#d97706',
|
|
|
+ color: '#b7791f',
|
|
|
marginLeft: '2px',
|
|
|
whiteSpace: 'nowrap',
|
|
|
display: 'inline-block'
|
|
|
@@ -657,9 +658,9 @@ function App(): JSX.Element {
|
|
|
</span>
|
|
|
)}
|
|
|
</div>
|
|
|
- <span style={{ fontSize: '10px', color: '#999' }}>{contact.lastMessageTime}</span>
|
|
|
+ <span style={{ fontSize: '10px', color: 'var(--im-text-subtle)' }}>{contact.lastMessageTime}</span>
|
|
|
</div>
|
|
|
- <div style={{ fontSize: '12px', color: '#888', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>
|
|
|
+ <div style={{ fontSize: '12px', color: 'var(--im-text-muted)', whiteSpace: 'nowrap', overflow: 'hidden', textOverflow: 'ellipsis' }}>
|
|
|
{contact.lastMessage}
|
|
|
</div>
|
|
|
</div>
|
|
|
@@ -709,8 +710,8 @@ function App(): JSX.Element {
|
|
|
display: 'flex',
|
|
|
alignItems: 'center',
|
|
|
justifyContent: 'center',
|
|
|
- backgroundColor: '#f5f5f5',
|
|
|
- color: '#666',
|
|
|
+ backgroundColor: 'var(--im-bg)',
|
|
|
+ color: 'var(--im-text-muted)',
|
|
|
fontSize: 15
|
|
|
}}
|
|
|
>
|
|
|
@@ -740,7 +741,7 @@ function App(): JSX.Element {
|
|
|
</div>
|
|
|
)}
|
|
|
|
|
|
- <div style={{ flex: 1, display: 'flex', flexDirection: 'column', backgroundColor: '#f5f5f5', minWidth: 0, overflow: 'hidden' }}>
|
|
|
+ <div className="content-panel">
|
|
|
{activeTab === 'chat' ? (
|
|
|
isLoadingContacts ? (
|
|
|
<div style={{ flex: 1, display: 'flex', alignItems: 'center', justifyContent: 'center', color: '#999' }}>
|
|
|
@@ -779,71 +780,71 @@ function App(): JSX.Element {
|
|
|
)
|
|
|
) : activeTab === 'contact' ? (
|
|
|
selectedContactDetail ? (
|
|
|
- <div style={{ flex: 1, display: 'flex', flexDirection: 'column', backgroundColor: '#f5f5f5' }}>
|
|
|
- <div style={{ padding: '0 20px', height: '60px', display: 'flex', alignItems: 'center', borderBottom: '1px solid #e7e7e7', justifyContent: 'space-between', WebkitAppRegion: 'drag', backgroundColor: '#fff' } as React.CSSProperties}>
|
|
|
- <div style={{ fontWeight: 'bold', fontSize: '16px', WebkitAppRegion: 'no-drag' } as React.CSSProperties}>
|
|
|
+ <div style={{ flex: 1, display: 'flex', flexDirection: 'column', backgroundColor: 'var(--im-bg)' }}>
|
|
|
+ <div style={{ padding: '0 28px', height: 'var(--im-topbar-height)', display: 'flex', alignItems: 'center', borderBottom: '1px solid var(--im-border)', justifyContent: 'space-between', WebkitAppRegion: 'drag', backgroundColor: 'var(--im-panel)' } as React.CSSProperties}>
|
|
|
+ <div style={{ fontWeight: '700', fontSize: '17px', color: 'var(--im-text)', WebkitAppRegion: 'no-drag' } as React.CSSProperties}>
|
|
|
联系人详情
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div style={{ flex: 1, overflowY: 'auto', padding: '40px 20px', display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
|
|
|
- <div style={{ width: '100px', height: '100px', borderRadius: '50%', backgroundColor: 'transparent', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: '100px', marginBottom: '30px', border: '1px solid #e7e7e7', boxShadow: '0 2px 4px rgba(0,0,0,0.1)', overflow: 'hidden' }}>
|
|
|
+ <div style={{ flex: 1, overflowY: 'auto', padding: '54px 24px 44px', display: 'flex', flexDirection: 'column', alignItems: 'center' }}>
|
|
|
+ <div style={{ width: '104px', height: '104px', borderRadius: '50%', backgroundColor: 'transparent', display: 'flex', alignItems: 'center', justifyContent: 'center', fontSize: '100px', marginBottom: '24px', border: '1px solid rgba(255,255,255,0.9)', boxShadow: '0 10px 30px rgba(15, 23, 42, 0.14)', overflow: 'hidden' }}>
|
|
|
{getDefaultAvatar(selectedContactDetail.id, selectedContactDetail.name || selectedContactDetail.english_name, { sizePx: 100 })}
|
|
|
</div>
|
|
|
|
|
|
- <div style={{ fontSize: '20px', fontWeight: 'bold', marginBottom: '40px', color: '#333' }}>
|
|
|
+ <div style={{ fontSize: '22px', fontWeight: '700', marginBottom: '36px', color: 'var(--im-text)' }}>
|
|
|
{selectedContactDetail.name || selectedContactDetail.english_name || `用户${selectedContactDetail.id}`}
|
|
|
</div>
|
|
|
|
|
|
- <div style={{ width: '100%', maxWidth: '500px', backgroundColor: '#fff', borderRadius: '8px', padding: '20px', boxShadow: '0 2px 4px rgba(0,0,0,0.05)' }}>
|
|
|
+ <div style={{ width: '100%', maxWidth: '560px', backgroundColor: 'var(--im-panel)', borderRadius: 'var(--im-radius)', padding: '8px 24px', border: '1px solid var(--im-border)', boxShadow: 'var(--im-shadow-sm)' }}>
|
|
|
{selectedContactDetail.name && (
|
|
|
- <div style={{ padding: '15px 0', borderBottom: '1px solid #f0f0f0', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
|
- <span style={{ color: '#999', fontSize: '14px' }}>中文名</span>
|
|
|
- <span style={{ color: '#333', fontSize: '14px', fontWeight: '500' }}>{selectedContactDetail.name}</span>
|
|
|
+ <div style={{ padding: '17px 0', borderBottom: '1px solid var(--im-border)', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
|
+ <span style={{ color: 'var(--im-text-muted)', fontSize: '14px' }}>中文名</span>
|
|
|
+ <span style={{ color: 'var(--im-text)', fontSize: '14px', fontWeight: '600' }}>{selectedContactDetail.name}</span>
|
|
|
</div>
|
|
|
)}
|
|
|
|
|
|
{selectedContactDetail.english_name && (
|
|
|
- <div style={{ padding: '15px 0', borderBottom: '1px solid #f0f0f0', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
|
- <span style={{ color: '#999', fontSize: '14px' }}>英文名</span>
|
|
|
- <span style={{ color: '#333', fontSize: '14px', fontWeight: '500' }}>{selectedContactDetail.english_name}</span>
|
|
|
+ <div style={{ padding: '17px 0', borderBottom: '1px solid var(--im-border)', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
|
+ <span style={{ color: 'var(--im-text-muted)', fontSize: '14px' }}>英文名</span>
|
|
|
+ <span style={{ color: 'var(--im-text)', fontSize: '14px', fontWeight: '600' }}>{selectedContactDetail.english_name}</span>
|
|
|
</div>
|
|
|
)}
|
|
|
|
|
|
{selectedContactDetail.status && (
|
|
|
- <div style={{ padding: '15px 0', borderBottom: '1px solid #f0f0f0', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
|
- <span style={{ color: '#999', fontSize: '14px' }}>状态</span>
|
|
|
- <span style={{ color: '#333', fontSize: '14px', fontWeight: '500' }}>{selectedContactDetail.status}</span>
|
|
|
+ <div style={{ padding: '17px 0', borderBottom: '1px solid var(--im-border)', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
|
+ <span style={{ color: 'var(--im-text-muted)', fontSize: '14px' }}>状态</span>
|
|
|
+ <span style={{ color: 'var(--im-text)', fontSize: '14px', fontWeight: '600' }}>{selectedContactDetail.status}</span>
|
|
|
</div>
|
|
|
)}
|
|
|
|
|
|
- <div style={{ padding: '15px 0', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
|
- <span style={{ color: '#999', fontSize: '14px' }}>用户ID</span>
|
|
|
- <span style={{ color: '#333', fontSize: '14px', fontWeight: '500' }}>{selectedContactDetail.id}</span>
|
|
|
+ <div style={{ padding: '17px 0', display: 'flex', justifyContent: 'space-between', alignItems: 'center' }}>
|
|
|
+ <span style={{ color: 'var(--im-text-muted)', fontSize: '14px' }}>用户ID</span>
|
|
|
+ <span style={{ color: 'var(--im-text)', fontSize: '14px', fontWeight: '600' }}>{selectedContactDetail.id}</span>
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div style={{ marginTop: '50px', width: '100%', maxWidth: '500px', padding: '0 20px' }}>
|
|
|
+ <div style={{ marginTop: '44px', width: '100%', maxWidth: '560px', padding: '0 20px' }}>
|
|
|
<button
|
|
|
onClick={() => handleSendMessageFromContact(selectedContactDetail)}
|
|
|
style={{
|
|
|
width: '100%',
|
|
|
- padding: '14px',
|
|
|
- backgroundColor: '#1aad19',
|
|
|
+ padding: '13px 16px',
|
|
|
+ backgroundColor: '#20b86f',
|
|
|
color: 'white',
|
|
|
border: 'none',
|
|
|
- borderRadius: '6px',
|
|
|
+ borderRadius: 'var(--im-radius)',
|
|
|
fontSize: '16px',
|
|
|
- fontWeight: '500',
|
|
|
+ fontWeight: '600',
|
|
|
cursor: 'pointer',
|
|
|
- transition: 'background-color 0.2s',
|
|
|
- boxShadow: '0 2px 4px rgba(0,0,0,0.1)'
|
|
|
+ transition: 'background-color 0.18s ease, box-shadow 0.18s ease',
|
|
|
+ boxShadow: '0 8px 18px rgba(32, 184, 111, 0.22)'
|
|
|
}}
|
|
|
onMouseEnter={(e) => {
|
|
|
- e.currentTarget.style.backgroundColor = '#179b16'
|
|
|
+ e.currentTarget.style.backgroundColor = '#18a764'
|
|
|
}}
|
|
|
onMouseLeave={(e) => {
|
|
|
- e.currentTarget.style.backgroundColor = '#1aad19'
|
|
|
+ e.currentTarget.style.backgroundColor = '#20b86f'
|
|
|
}}
|
|
|
>
|
|
|
发消息
|