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