mirror of
https://github.com/hicccc77/WeFlow.git
synced 2026-03-25 15:25:50 +00:00
修复
This commit is contained in:
@@ -1047,6 +1047,7 @@
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
border: 1px solid var(--border-color);
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
||||
|
||||
&:hover {
|
||||
background: var(--bg-hover);
|
||||
@@ -3107,7 +3108,7 @@
|
||||
.chat-record-message,
|
||||
.miniapp-message,
|
||||
.appmsg-rich-card {
|
||||
background: rgba(255, 255, 255, 0.15);
|
||||
background: rgba(255, 255, 255, 0.25);
|
||||
|
||||
.card-name,
|
||||
.miniapp-title,
|
||||
@@ -3618,11 +3619,12 @@
|
||||
align-items: center;
|
||||
gap: 12px;
|
||||
padding: 12px;
|
||||
background: var(--bg-primary); // 添加底色
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
|
||||
|
||||
&:hover {
|
||||
background: var(--bg-hover);
|
||||
@@ -3672,12 +3674,13 @@
|
||||
|
||||
// 聊天记录消息外观
|
||||
.chat-record-message {
|
||||
background: var(--bg-primary); // 添加底色
|
||||
background: var(--card-bg) !important;
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
|
||||
|
||||
&:hover {
|
||||
background: var(--bg-hover);
|
||||
background: var(--bg-hover) !important;
|
||||
}
|
||||
|
||||
.chat-record-list {
|
||||
@@ -3710,13 +3713,15 @@
|
||||
.official-message {
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
background: var(--bg-primary);
|
||||
background: var(--card-bg);
|
||||
border: 1px solid var(--border-color);
|
||||
border-radius: 8px;
|
||||
overflow: hidden;
|
||||
cursor: pointer;
|
||||
transition: all 0.2s ease;
|
||||
min-width: 240px;
|
||||
max-width: 320px;
|
||||
box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
|
||||
|
||||
&:hover {
|
||||
background: var(--bg-hover);
|
||||
|
||||
@@ -3987,8 +3987,12 @@ function MessageBubble({
|
||||
const label = raw.match(/label="([^"]*)"/)?.[1] || message.locationLabel || ''
|
||||
const lat = parseFloat(raw.match(/x="([^"]*)"/)?.[1] || String(message.locationLat || 0))
|
||||
const lng = parseFloat(raw.match(/y="([^"]*)"/)?.[1] || String(message.locationLng || 0))
|
||||
const zoom = 15
|
||||
const tileX = Math.floor((lng + 180) / 360 * Math.pow(2, zoom))
|
||||
const latRad = lat * Math.PI / 180
|
||||
const tileY = Math.floor((1 - Math.log(Math.tan(latRad) + 1 / Math.cos(latRad)) / Math.PI) / 2 * Math.pow(2, zoom))
|
||||
const mapTileUrl = (lat && lng)
|
||||
? `https://restapi.amap.com/v3/staticmap?location=${lng},${lat}&zoom=15&size=280*100&markers=mid,,A:${lng},${lat}&key=e1dedc6bfbb8413ab2185e7a0e21f0a1`
|
||||
? `https://webrd01.is.autonavi.com/appmaptile?lang=zh_cn&size=1&scale=1&style=8&x=${tileX}&y=${tileY}&z=${zoom}`
|
||||
: ''
|
||||
return (
|
||||
<div className="location-message" onClick={() => window.electronAPI.shell.openExternal(`https://uri.amap.com/marker?position=${lng},${lat}&name=${encodeURIComponent(poiname || label)}`)}>
|
||||
@@ -4039,6 +4043,7 @@ function MessageBubble({
|
||||
const thumbUrl = message.linkThumb || message.appMsgThumbUrl || q('thumburl') || q('cdnthumburl') || q('cover') || q('coverurl')
|
||||
const musicUrl = message.appMsgMusicUrl || message.appMsgDataUrl || q('musicurl') || q('playurl') || q('dataurl') || q('lowurl')
|
||||
const sourceName = message.appMsgSourceName || q('sourcename')
|
||||
const sourceDisplayName = q('sourcedisplayname') || ''
|
||||
const appName = message.appMsgAppName || q('appname')
|
||||
const sourceUsername = message.appMsgSourceUsername || q('sourceusername')
|
||||
const finderName =
|
||||
@@ -4066,9 +4071,14 @@ function MessageBubble({
|
||||
|
||||
// 对视频号提取真实标题,避免出现 "当前版本不支持该内容"
|
||||
let displayTitle = title
|
||||
if (kind === 'finder' && title.includes('不支持')) {
|
||||
if (kind === 'finder' && (!displayTitle || displayTitle.includes('不支持'))) {
|
||||
try {
|
||||
const d = new DOMParser().parseFromString(rawXml, 'text/xml')
|
||||
displayTitle = d.querySelector('finderFeed desc')?.textContent?.trim() || desc || ''
|
||||
} catch {
|
||||
displayTitle = desc || ''
|
||||
}
|
||||
}
|
||||
|
||||
const openExternal = (e: React.MouseEvent, nextUrl?: string) => {
|
||||
if (!nextUrl) return
|
||||
@@ -4224,8 +4234,8 @@ function MessageBubble({
|
||||
}
|
||||
|
||||
if (kind === 'official-link') {
|
||||
const authorAvatar = q('publisher > headimg') || q('brand_info > headimgurl') || q('appmsg > avatar') || message.cardAvatarUrl
|
||||
const authorName = q('publisher > nickname') || sourceName || appName || '公众号'
|
||||
const authorAvatar = q('publisher > headimg') || q('brand_info > headimgurl') || q('appmsg > avatar') || q('headimgurl') || message.cardAvatarUrl
|
||||
const authorName = sourceDisplayName || q('publisher > nickname') || sourceName || appName || '公众号'
|
||||
const coverPic = q('mmreader > category > item > cover') || thumbUrl
|
||||
const digest = q('mmreader > category > item > digest') || desc
|
||||
const articleTitle = q('mmreader > category > item > title') || title
|
||||
|
||||
Reference in New Issue
Block a user