diff --git a/mateclaw-ui/src/components/chat/ChatInput.vue b/mateclaw-ui/src/components/chat/ChatInput.vue index 6fe364df..abe1bc5f 100644 --- a/mateclaw-ui/src/components/chat/ChatInput.vue +++ b/mateclaw-ui/src/components/chat/ChatInput.vue @@ -45,9 +45,9 @@ - 允许 + {{ t('chat.approvalAllow') }} {{ pendingApproval.toolName }} - 执行? + {{ t('chat.approvalExecute') }}
@@ -729,4 +729,34 @@ defineExpose({ .send-btn.is-interrupt:hover:not(:disabled) { background: #d97706; } + +/* ===== 移动端适配 ===== */ +@media (max-width: 768px) { + .chat-input-wrapper { + padding: 10px 12px 14px; + } + + .approval-bar { + flex-direction: column; + align-items: stretch; + gap: 8px; + padding: 10px 12px; + } + + .approval-bar__info { + flex-wrap: wrap; + } + + .approval-bar__actions { + justify-content: flex-end; + } + + .approval-bar__tool { + max-width: 180px; + } + + .attachment-chip__label span:first-child { + max-width: 180px; + } +} diff --git a/mateclaw-ui/src/components/chat/MessageBubble.vue b/mateclaw-ui/src/components/chat/MessageBubble.vue index 2bd2a68f..ca03cafc 100644 --- a/mateclaw-ui/src/components/chat/MessageBubble.vue +++ b/mateclaw-ui/src/components/chat/MessageBubble.vue @@ -1560,4 +1560,26 @@ watch(isGenerating, (generating) => { font-weight: 600; color: var(--mc-text-primary, #1e293b); } + +/* ===== 移动端适配 ===== */ +@media (max-width: 768px) { + .message-wrapper { + max-width: 100%; + gap: 8px; + } + + .msg-body { + max-width: calc(100% - 40px); + } + + .msg-avatar { + width: 28px; + height: 28px; + font-size: 12px; + } + + .error-card { + max-width: 100%; + } +} diff --git a/mateclaw-ui/src/components/chat/MessageList.vue b/mateclaw-ui/src/components/chat/MessageList.vue index e2b2bd82..e430ab20 100644 --- a/mateclaw-ui/src/components/chat/MessageList.vue +++ b/mateclaw-ui/src/components/chat/MessageList.vue @@ -185,6 +185,8 @@ watch( display: flex; flex-direction: column; align-items: center; + width: 100%; + box-sizing: border-box; } .welcome-logo { @@ -272,9 +274,10 @@ watch( .suggestion-card__text { flex: 1; overflow: hidden; - text-overflow: ellipsis; - white-space: nowrap; line-height: 1.4; + display: -webkit-box; + -webkit-line-clamp: 2; + -webkit-box-orient: vertical; } .suggestion-card__arrow { @@ -334,4 +337,46 @@ watch( opacity: 1; pointer-events: auto; } + +/* ===== 移动端适配 ===== */ +@media (max-width: 768px) { + .message-list { + padding: 16px 12px 12px; + } + + .message-list-content { + gap: 12px; + } + + .empty-state { + min-height: 300px; + } + + .welcome-screen { + padding: 24px 12px; + } + + .welcome-logo__icon { + width: 48px; + height: 48px; + } + + .welcome-title { + font-size: 22px; + } + + .welcome-subtitle { + margin-bottom: 24px; + max-width: 100%; + } + + .welcome-suggestions { + grid-template-columns: 1fr; + max-width: 100%; + } + + .suggestion-card { + padding: 10px 12px; + } +} diff --git a/mateclaw-ui/src/i18n/locales/en-US.ts b/mateclaw-ui/src/i18n/locales/en-US.ts index 18c73356..fdb2c48d 100644 --- a/mateclaw-ui/src/i18n/locales/en-US.ts +++ b/mateclaw-ui/src/i18n/locales/en-US.ts @@ -145,6 +145,13 @@ export default { streamReconnecting: 'Reconnecting...', streamStopped: 'Stopped', streamCompleted: 'Completed', + // Approval bar + approvalAllow: 'Allow', + approvalExecute: 'to execute?', + // Time format + timeJustNow: 'Just now', + timeMinutesAgo: '{n}m ago', + timeHoursAgo: '{n}h ago', }, nav: { chat: 'Chat', diff --git a/mateclaw-ui/src/i18n/locales/zh-CN.ts b/mateclaw-ui/src/i18n/locales/zh-CN.ts index b89e477c..a74f54a4 100644 --- a/mateclaw-ui/src/i18n/locales/zh-CN.ts +++ b/mateclaw-ui/src/i18n/locales/zh-CN.ts @@ -145,6 +145,13 @@ export default { streamReconnecting: '重新连接...', streamStopped: '已停止', streamCompleted: '已完成', + // 审批栏 + approvalAllow: '允许', + approvalExecute: '执行?', + // 时间格式 + timeJustNow: '刚刚', + timeMinutesAgo: '{n} 分钟前', + timeHoursAgo: '{n} 小时前', }, nav: { chat: '对话', diff --git a/mateclaw-ui/src/views/ChatConsole.vue b/mateclaw-ui/src/views/ChatConsole.vue index f9ac4a34..e2038703 100644 --- a/mateclaw-ui/src/views/ChatConsole.vue +++ b/mateclaw-ui/src/views/ChatConsole.vue @@ -1,7 +1,12 @@