mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-25 15:25:50 +00:00
同步ui
This commit is contained in:
@@ -4137,55 +4137,51 @@
|
||||
// 消息信息弹窗
|
||||
.message-info-overlay {
|
||||
position: fixed;
|
||||
top: 0;
|
||||
left: 0;
|
||||
right: 0;
|
||||
bottom: 0;
|
||||
background: rgba(0, 0, 0, 0.6);
|
||||
inset: 0;
|
||||
background: rgba(0, 0, 0, 0.4);
|
||||
backdrop-filter: blur(4px);
|
||||
z-index: 2000;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
z-index: 2000;
|
||||
padding: 20px;
|
||||
}
|
||||
|
||||
.message-info-modal {
|
||||
width: 520px;
|
||||
width: 360px;
|
||||
max-width: 90vw;
|
||||
max-height: 80vh;
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 12px;
|
||||
box-shadow: 0 8px 30px rgba(0, 0, 0, 0.2);
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
|
||||
overflow: hidden;
|
||||
|
||||
.modal-header {
|
||||
.detail-header {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: space-between;
|
||||
padding: 16px 20px;
|
||||
padding: 16px;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
|
||||
h3 {
|
||||
font-size: 16px;
|
||||
h4 {
|
||||
font-size: 15px;
|
||||
font-weight: 600;
|
||||
color: var(--text-primary);
|
||||
margin: 0;
|
||||
}
|
||||
|
||||
.close-btn {
|
||||
width: 28px;
|
||||
height: 28px;
|
||||
background: none;
|
||||
border: none;
|
||||
background: transparent;
|
||||
border-radius: 6px;
|
||||
padding: 4px;
|
||||
cursor: pointer;
|
||||
color: var(--text-secondary);
|
||||
border-radius: 6px;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
color: var(--text-tertiary);
|
||||
transition: all 0.2s;
|
||||
|
||||
&:hover {
|
||||
background: var(--bg-hover);
|
||||
@@ -4194,56 +4190,98 @@
|
||||
}
|
||||
}
|
||||
|
||||
.modal-body {
|
||||
.detail-content {
|
||||
flex: 1;
|
||||
overflow-y: auto;
|
||||
padding: 16px 20px;
|
||||
padding: 16px;
|
||||
|
||||
&::-webkit-scrollbar { width: 4px; }
|
||||
&::-webkit-scrollbar-thumb { background: var(--text-tertiary); border-radius: 2px; }
|
||||
}
|
||||
|
||||
.info-section {
|
||||
margin-bottom: 16px;
|
||||
.detail-section {
|
||||
margin-bottom: 20px;
|
||||
&:last-child { margin-bottom: 0; }
|
||||
|
||||
h4 {
|
||||
font-size: 13px;
|
||||
.section-title {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 6px;
|
||||
font-size: 12px;
|
||||
font-weight: 600;
|
||||
color: var(--text-secondary);
|
||||
margin: 0 0 8px 0;
|
||||
margin-bottom: 12px;
|
||||
letter-spacing: 0.5px;
|
||||
|
||||
svg { opacity: 0.7; }
|
||||
|
||||
.copy-btn {
|
||||
margin-left: auto;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
background: transparent;
|
||||
color: var(--text-tertiary);
|
||||
cursor: pointer;
|
||||
&:hover { background: var(--bg-secondary); color: var(--text-primary); }
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
.info-grid {
|
||||
.detail-item {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
gap: 6px;
|
||||
}
|
||||
|
||||
.info-item {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
padding: 8px 0;
|
||||
border-bottom: 1px solid var(--border-color);
|
||||
font-size: 13px;
|
||||
|
||||
.label {
|
||||
color: var(--text-tertiary);
|
||||
min-width: 80px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
&:last-child { border-bottom: none; }
|
||||
|
||||
svg { color: var(--text-tertiary); flex-shrink: 0; }
|
||||
|
||||
.label { color: var(--text-secondary); flex-shrink: 0; }
|
||||
|
||||
.value {
|
||||
flex: 1;
|
||||
text-align: right;
|
||||
color: var(--text-primary);
|
||||
word-break: break-all;
|
||||
user-select: text;
|
||||
|
||||
&.code {
|
||||
font-family: monospace;
|
||||
font-size: 12px;
|
||||
background: var(--bg-tertiary);
|
||||
padding: 2px 6px;
|
||||
&.highlight { color: var(--primary); font-weight: 600; }
|
||||
&.mono { font-family: 'Consolas', 'Monaco', monospace; font-size: 12px; }
|
||||
}
|
||||
|
||||
.copy-btn {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
width: 22px;
|
||||
height: 22px;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 4px;
|
||||
}
|
||||
}
|
||||
background: transparent;
|
||||
color: var(--text-tertiary);
|
||||
cursor: pointer;
|
||||
flex-shrink: 0;
|
||||
opacity: 0;
|
||||
transition: opacity 0.15s, color 0.15s, background 0.15s;
|
||||
|
||||
&:hover { background: var(--bg-secondary); color: var(--text-primary); }
|
||||
svg { color: inherit; }
|
||||
}
|
||||
|
||||
.raw-content-container {
|
||||
&:hover .copy-btn { opacity: 1; }
|
||||
}
|
||||
|
||||
.raw-content-box {
|
||||
background: var(--bg-tertiary);
|
||||
border-radius: 8px;
|
||||
padding: 12px;
|
||||
@@ -4252,15 +4290,12 @@
|
||||
|
||||
pre {
|
||||
margin: 0;
|
||||
font-size: 12px;
|
||||
font-family: monospace;
|
||||
color: var(--text-primary);
|
||||
white-space: pre-wrap;
|
||||
word-break: break-all;
|
||||
}
|
||||
}
|
||||
|
||||
.select-text {
|
||||
font-family: 'Consolas', 'Monaco', monospace;
|
||||
font-size: 12px;
|
||||
color: var(--text-primary);
|
||||
user-select: text;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -2749,71 +2749,121 @@ function ChatPage(_props: ChatPageProps) {
|
||||
{showMessageInfo && createPortal(
|
||||
<div className="message-info-overlay" onClick={() => setShowMessageInfo(null)}>
|
||||
<div className="message-info-modal" onClick={(e) => e.stopPropagation()}>
|
||||
<div className="modal-header">
|
||||
<div style={{ display: 'flex', alignItems: 'center', gap: '8px' }}>
|
||||
<Info size={18} />
|
||||
<h3 style={{ margin: 0 }}>消息详细信息</h3>
|
||||
</div>
|
||||
<div className="detail-header">
|
||||
<h4>消息详情</h4>
|
||||
<button className="close-btn" onClick={() => setShowMessageInfo(null)}>
|
||||
<X size={18} />
|
||||
<X size={16} />
|
||||
</button>
|
||||
</div>
|
||||
<div className="modal-body">
|
||||
<div className="info-section">
|
||||
<h4>基础字段</h4>
|
||||
<div className="info-grid">
|
||||
<div className="info-item"><span className="label">Local ID</span><span className="value select-text">{showMessageInfo.localId}</span></div>
|
||||
<div className="info-item"><span className="label">Server ID</span><span className="value select-text">{showMessageInfo.serverId}</span></div>
|
||||
<div className="info-item"><span className="label">Local Type</span><span className="value select-text">{showMessageInfo.localType}</span></div>
|
||||
<div className="info-item"><span className="label">发送者</span><span className="value select-text">{showMessageInfo.senderUsername || '-'}</span></div>
|
||||
<div className="info-item"><span className="label">创建时间</span><span className="value select-text">{new Date(showMessageInfo.createTime * 1000).toLocaleString()} ({showMessageInfo.createTime})</span></div>
|
||||
<div className="info-item"><span className="label">发送状态</span><span className="value select-text">{showMessageInfo.isSend === 1 ? '发送' : '接收'}</span></div>
|
||||
<div className="detail-content">
|
||||
<div className="detail-section">
|
||||
<div className="detail-item">
|
||||
<Hash size={14} />
|
||||
<span className="label">Local ID</span>
|
||||
<span className="value">{showMessageInfo.localId}</span>
|
||||
<button className="copy-btn" title="复制" onClick={() => handleCopyField(String(showMessageInfo.localId), 'msgLocalId')}>
|
||||
{copiedField === 'msgLocalId' ? <Check size={12} /> : <Copy size={12} />}
|
||||
</button>
|
||||
</div>
|
||||
<div className="detail-item">
|
||||
<Hash size={14} />
|
||||
<span className="label">Server ID</span>
|
||||
<span className="value">{showMessageInfo.serverId}</span>
|
||||
</div>
|
||||
<div className="detail-item">
|
||||
<span className="label">消息类型</span>
|
||||
<span className="value highlight">{showMessageInfo.localType}</span>
|
||||
</div>
|
||||
<div className="detail-item">
|
||||
<span className="label">发送者</span>
|
||||
<span className="value">{showMessageInfo.senderUsername || '-'}</span>
|
||||
{showMessageInfo.senderUsername && (
|
||||
<button className="copy-btn" title="复制" onClick={() => handleCopyField(showMessageInfo.senderUsername!, 'msgSender')}>
|
||||
{copiedField === 'msgSender' ? <Check size={12} /> : <Copy size={12} />}
|
||||
</button>
|
||||
)}
|
||||
</div>
|
||||
<div className="detail-item">
|
||||
<Calendar size={14} />
|
||||
<span className="label">创建时间</span>
|
||||
<span className="value">{new Date(showMessageInfo.createTime * 1000).toLocaleString()}</span>
|
||||
</div>
|
||||
<div className="detail-item">
|
||||
<span className="label">发送状态</span>
|
||||
<span className="value">{showMessageInfo.isSend === 1 ? '发送' : '接收'}</span>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
{(showMessageInfo.imageMd5 || showMessageInfo.videoMd5 || showMessageInfo.voiceDurationSeconds != null) && (
|
||||
<div className="detail-section">
|
||||
<div className="section-title">
|
||||
<ImageIcon size={14} />
|
||||
<span>媒体信息</span>
|
||||
</div>
|
||||
{showMessageInfo.imageMd5 && (
|
||||
<div className="info-section">
|
||||
<h4>图片信息</h4>
|
||||
<div className="info-grid">
|
||||
<div className="info-item"><span className="label">Image MD5</span><span className="value select-text code">{showMessageInfo.imageMd5}</span></div>
|
||||
{showMessageInfo.imageDatName && <div className="info-item"><span className="label">DAT 文件名</span><span className="value select-text code">{showMessageInfo.imageDatName}</span></div>}
|
||||
</div>
|
||||
<div className="detail-item">
|
||||
<span className="label">Image MD5</span>
|
||||
<span className="value mono">{showMessageInfo.imageMd5}</span>
|
||||
<button className="copy-btn" title="复制" onClick={() => handleCopyField(showMessageInfo.imageMd5!, 'imgMd5')}>
|
||||
{copiedField === 'imgMd5' ? <Check size={12} /> : <Copy size={12} />}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
{showMessageInfo.imageDatName && (
|
||||
<div className="detail-item">
|
||||
<span className="label">DAT 文件</span>
|
||||
<span className="value mono">{showMessageInfo.imageDatName}</span>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{showMessageInfo.videoMd5 && (
|
||||
<div className="info-section">
|
||||
<h4>视频信息</h4>
|
||||
<div className="info-grid">
|
||||
<div className="info-item"><span className="label">Video MD5</span><span className="value select-text code">{showMessageInfo.videoMd5}</span></div>
|
||||
</div>
|
||||
<div className="detail-item">
|
||||
<span className="label">Video MD5</span>
|
||||
<span className="value mono">{showMessageInfo.videoMd5}</span>
|
||||
<button className="copy-btn" title="复制" onClick={() => handleCopyField(showMessageInfo.videoMd5!, 'vidMd5')}>
|
||||
{copiedField === 'vidMd5' ? <Check size={12} /> : <Copy size={12} />}
|
||||
</button>
|
||||
</div>
|
||||
)}
|
||||
|
||||
{showMessageInfo.voiceDurationSeconds != null && (
|
||||
<div className="info-section">
|
||||
<h4>语音信息</h4>
|
||||
<div className="info-grid">
|
||||
<div className="info-item"><span className="label">时长</span><span className="value select-text">{showMessageInfo.voiceDurationSeconds}秒</span></div>
|
||||
<div className="detail-item">
|
||||
<Mic size={14} />
|
||||
<span className="label">语音时长</span>
|
||||
<span className="value">{showMessageInfo.voiceDurationSeconds}秒</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{(showMessageInfo.emojiMd5 || showMessageInfo.emojiCdnUrl) && (
|
||||
<div className="info-section">
|
||||
<h4>表情包信息</h4>
|
||||
<div className="info-grid">
|
||||
{showMessageInfo.emojiMd5 && <div className="info-item"><span className="label">MD5</span><span className="value select-text code">{showMessageInfo.emojiMd5}</span></div>}
|
||||
{showMessageInfo.emojiCdnUrl && <div className="info-item"><span className="label">CDN URL</span><span className="value select-text code break-all">{showMessageInfo.emojiCdnUrl}</span></div>}
|
||||
<div className="detail-section">
|
||||
<div className="section-title">
|
||||
<span>表情包信息</span>
|
||||
</div>
|
||||
{showMessageInfo.emojiMd5 && (
|
||||
<div className="detail-item">
|
||||
<span className="label">MD5</span>
|
||||
<span className="value mono">{showMessageInfo.emojiMd5}</span>
|
||||
</div>
|
||||
)}
|
||||
{showMessageInfo.emojiCdnUrl && (
|
||||
<div className="detail-item">
|
||||
<span className="label">CDN URL</span>
|
||||
<span className="value mono">{showMessageInfo.emojiCdnUrl}</span>
|
||||
</div>
|
||||
)}
|
||||
</div>
|
||||
)}
|
||||
|
||||
{(showMessageInfo.rawContent || showMessageInfo.content) && (
|
||||
<div className="info-section">
|
||||
<h4>原始消息内容</h4>
|
||||
<div className="raw-content-container">
|
||||
<pre className="select-text">{showMessageInfo.rawContent || showMessageInfo.content}</pre>
|
||||
{showMessageInfo.localType !== 1 && (showMessageInfo.rawContent || showMessageInfo.content) && (
|
||||
<div className="detail-section">
|
||||
<div className="section-title">
|
||||
<span>原始消息内容</span>
|
||||
<button className="copy-btn" title="复制" onClick={() => handleCopyField(showMessageInfo.rawContent || showMessageInfo.content || '', 'rawContent')}>
|
||||
{copiedField === 'rawContent' ? <Check size={12} /> : <Copy size={12} />}
|
||||
</button>
|
||||
</div>
|
||||
<div className="raw-content-box">
|
||||
<pre>{showMessageInfo.rawContent || showMessageInfo.content}</pre>
|
||||
</div>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user