Merge remote-tracking branch 'remotes/origin/temp221' into temp221
This commit is contained in:
@@ -2420,11 +2420,14 @@ _handleStreamError(msg) {
|
||||
})
|
||||
|
||||
// 5) 行内代码 / 加粗 / 斜体 / 删除线 (此时链接已抽离, 不会被误改)
|
||||
// PR-FIX-AI-TEXT-COLOR (2026-09-24): AI 回答统一配色 —— 正文/标题/加粗/行内代码/引用/删除线
|
||||
// 一律黑色(TEXT), 只有"网址/链接"是蓝色(LINK)。
|
||||
// 之前行内代码是粉色(#d63384)、删除线是灰色(#999), 回答里颜色太杂。
|
||||
t = t
|
||||
.replace(/`([^`]+)`/g, '<code style="background:#f2f3f5;padding:2rpx 10rpx;border-radius:6rpx;font-size:24rpx;font-family:monospace;color:#d63384;">$1</code>')
|
||||
.replace(/`([^`]+)`/g, '<code style="background:#f2f3f5;padding:2rpx 10rpx;border-radius:6rpx;font-size:24rpx;font-family:monospace;color:' + TEXT + ';">$1</code>')
|
||||
.replace(/\*\*(.+?)\*\*/g, '<strong style="font-weight:700;color:' + TEXT + ';">$1</strong>')
|
||||
.replace(/\*(.+?)\*/g, '<em style="font-style:italic;">$1</em>')
|
||||
.replace(/~~(.+?)~~/g, '<del style="text-decoration:line-through;color:#999;">$1</del>')
|
||||
.replace(/\*(.+?)\*/g, '<em style="font-style:italic;color:' + TEXT + ';">$1</em>')
|
||||
.replace(/~~(.+?)~~/g, '<del style="text-decoration:line-through;color:' + TEXT + ';">$1</del>')
|
||||
|
||||
return t
|
||||
}
|
||||
@@ -2442,7 +2445,7 @@ _handleStreamError(msg) {
|
||||
const safe = code.replace(/</g, '<').replace(/>/g, '>')
|
||||
codeBlocks.push(
|
||||
`<pre style="background:#f7f8fa;padding:20rpx;border-radius:8rpx;overflow-x:auto;font-size:24rpx;line-height:1.6;margin:12rpx 0;white-space:pre-wrap;">` +
|
||||
`<code style="background:transparent;padding:0;font-family:monospace;color:#333;font-size:24rpx;">${safe}</code></pre>`
|
||||
`<code style="background:transparent;padding:0;font-family:monospace;color:${TEXT};font-size:24rpx;">${safe}</code></pre>`
|
||||
)
|
||||
return `%%CODEBLOCK_${idx}%%`
|
||||
})
|
||||
@@ -2538,7 +2541,7 @@ _handleStreamError(msg) {
|
||||
const bqMatch = line.match(/^>\s?(.+)$/)
|
||||
if (bqMatch) {
|
||||
flushBuf(); out.push(closeList())
|
||||
out.push(`<blockquote style="border-left:4rpx solid #d0d7de;padding:8rpx 16rpx;margin:${BQ_MARGIN};background:#f6f8fa;color:#57606a;line-height:${BQ_LH};font-size:28rpx;border-radius:0 6rpx 6rpx 0;">${parseInline(bqMatch[1])}</blockquote>`)
|
||||
out.push(`<blockquote style="border-left:4rpx solid #d0d7de;padding:8rpx 16rpx;margin:${BQ_MARGIN};background:#f6f8fa;color:${TEXT};line-height:${BQ_LH};font-size:28rpx;border-radius:0 6rpx 6rpx 0;">${parseInline(bqMatch[1])}</blockquote>`)
|
||||
continue
|
||||
}
|
||||
|
||||
@@ -4268,16 +4271,18 @@ _handleStreamError(msg) {
|
||||
.markdown-body {
|
||||
line-height: 1.8;
|
||||
font-size: 26rpx;
|
||||
color: $color-text;
|
||||
/* PR-FIX-AI-TEXT-COLOR (2026-09-24): 统一配色 —— 正文/加粗/斜体/代码全部黑色,
|
||||
只有链接(a)是蓝色; 之前正文是灰蓝($color-text)、代码是蓝灰($color-primary) */
|
||||
color: #1a1a1a;
|
||||
|
||||
strong {
|
||||
font-weight: 600;
|
||||
color: $color-text;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
em {
|
||||
font-style: italic;
|
||||
color: $color-text-light;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
code {
|
||||
@@ -4286,17 +4291,18 @@ _handleStreamError(msg) {
|
||||
border-radius: $radius-sm;
|
||||
font-family: monospace;
|
||||
font-size: 24rpx;
|
||||
color: $color-primary;
|
||||
color: #1a1a1a;
|
||||
}
|
||||
|
||||
a {
|
||||
color: $color-primary;
|
||||
/* 网址/链接: 蓝色 (与 parseMarkdown 里的 LINK 常量保持一致) */
|
||||
color: #3a7afe;
|
||||
text-decoration: underline;
|
||||
text-underline-offset: 4rpx;
|
||||
transition: color 0.2s ease;
|
||||
|
||||
&:hover {
|
||||
color: #5a7cb0;
|
||||
color: #2b6cf0;
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -4853,8 +4859,10 @@ _handleStreamError(msg) {
|
||||
- 内边距加大 -> 气泡比文字大, 文字与气泡边缘留出间距
|
||||
- 宽度 auto + inline-block -> 气泡宽度贴着内容, 不拉满整行
|
||||
- 只调整气泡自身, 气泡内文字字号不变
|
||||
- 用 :not() 排除图片/配文/文件/视频/音频气泡, 避免影响它们原有的紧凑样式 */
|
||||
.user-message .message-content .message-bubble:not(.user-image-bubble):not(.image-caption-bubble):not(.user-file-bubble):not(.user-video-bubble):not(.user-audio-bubble) {
|
||||
- 用 :not() 排除图片/文件/视频/音频气泡, 避免影响它们原有的紧凑样式
|
||||
PR-FIX-CAPTION-BUBBLE-SIZE (2026-09-24): 不再排除 .image-caption-bubble ——
|
||||
图文一起发时的配文气泡要和普通文字气泡一样大(之前被排除 → 内边距只有 30rpx) */
|
||||
.user-message .message-content .message-bubble:not(.user-image-bubble):not(.user-file-bubble):not(.user-video-bubble):not(.user-audio-bubble) {
|
||||
padding: 10rpx 30rpx !important;
|
||||
border-radius: 16rpx !important;
|
||||
display: inline-block !important;
|
||||
@@ -5735,10 +5743,11 @@ _handleStreamError(msg) {
|
||||
|
||||
/* 用户消息气泡: 覆盖上面的 padding:0
|
||||
- H5: 气泡要明显比文字大(与小程序一致), 只改气泡, 不改文字字号;
|
||||
用 :not() 排除图片/配文/文件/视频/音频气泡
|
||||
- 小程序: 保持原有浅灰气泡 + 加大内边距(不动) */
|
||||
用 :not() 排除图片/文件/视频/音频气泡
|
||||
- 小程序: 保持原有浅灰气泡 + 加大内边距(不动)
|
||||
PR-FIX-CAPTION-BUBBLE-SIZE (2026-09-24): 同上层, 配文气泡不再排除, 与普通文字气泡同尺寸 */
|
||||
/* #ifdef H5 */
|
||||
.user-message .message-content .message-bubble:not(.user-image-bubble):not(.image-caption-bubble):not(.user-file-bubble):not(.user-video-bubble):not(.user-audio-bubble) {
|
||||
.user-message .message-content .message-bubble:not(.user-image-bubble):not(.user-file-bubble):not(.user-video-bubble):not(.user-audio-bubble) {
|
||||
padding: 20rpx 40rpx !important;
|
||||
border-radius: 16rpx !important;
|
||||
display: inline-block !important;
|
||||
@@ -6518,19 +6527,16 @@ _handleStreamError(msg) {
|
||||
}
|
||||
}
|
||||
|
||||
/* 图片消息配文气泡 (图文一起发出时, 独立气泡显示在图片下方) */
|
||||
/* 图片消息配文气泡 (图文一起发出时, 独立气泡显示在图片下方)
|
||||
PR-FIX-CAPTION-BUBBLE-SIZE (2026-09-24): 这里原先单独定义了
|
||||
background/border-radius/padding/max-width/字号, 使配文气泡比普通文字气泡小一圈
|
||||
(H5 下又被 :not() 规则排除, 内边距只有 30rpx)。
|
||||
现在只保留"与图片的间距 + 右对齐", 其余(内边距/圆角/背景/字号)全部复用普通文字气泡,
|
||||
保证图文消息下方的问题气泡和纯文字消息的气泡一样大。 */
|
||||
.image-caption-bubble {
|
||||
margin-top: 10rpx;
|
||||
background: #f5f5f5;
|
||||
border-radius: 20rpx;
|
||||
padding: 14rpx 22rpx;
|
||||
max-width: 460rpx;
|
||||
.message-text {
|
||||
font-size: 28rpx;
|
||||
color: #111827;
|
||||
line-height: 1.5;
|
||||
word-break: break-all;
|
||||
}
|
||||
align-self: flex-end;
|
||||
width: auto;
|
||||
}
|
||||
|
||||
/* 输入框内待发送图片缩略图: 位于文字输入行上方, 出现时输入框自动向上撑高 */
|
||||
|
||||
Reference in New Issue
Block a user