fix(mobile): highlight new-chat button and flex-center composer labels
- AskSourceHeader: solid brand-red new-chat button, flex-centered label - replace padding+line-height centering with flex on chips, hold-talk, send, bubble-action, transcript-toggle, system-text, scope-note - carries the in-flight AskSourceHeader extraction on sop/web-ai pages (parallel session work; its test updates intentionally left uncommitted)
This commit is contained in:
@@ -1,18 +1,12 @@
|
||||
<template>
|
||||
<view class="page sop-chat-page">
|
||||
<view class="chat-head">
|
||||
<view class="chat-head-row">
|
||||
<text class="chat-title">问 · 数字师傅</text>
|
||||
<view class="chat-head-actions">
|
||||
<text class="chat-context">{{ positionLabel }} · 住宅项目</text>
|
||||
<button class="new-chat-button" :disabled="loading" @click="startNewConversation">新对话</button>
|
||||
</view>
|
||||
</view>
|
||||
<view class="source-switch chat-source-switch" aria-label="问答来源">
|
||||
<button class="source-option active" aria-current="page">工作助手</button>
|
||||
<button class="source-option" @click="openWebAi">查全网</button>
|
||||
</view>
|
||||
</view>
|
||||
<AskSourceHeader
|
||||
active="assistant"
|
||||
:context="`${positionLabel} · 住宅项目`"
|
||||
:loading="loading || voiceTranscribing"
|
||||
@select-web="openWebAi"
|
||||
@new-conversation="startNewConversation"
|
||||
/>
|
||||
|
||||
<scroll-view scroll-y class="chat-thread" :scroll-top="threadScrollTop" :scroll-with-animation="true">
|
||||
<view class="thread-inner">
|
||||
@@ -300,6 +294,7 @@ import type {
|
||||
SummaryCardResponse
|
||||
} from '@/types/api';
|
||||
import ChatComposer from '@/components/chat/ChatComposer.vue';
|
||||
import AskSourceHeader from '@/components/chat/AskSourceHeader.vue';
|
||||
import MemoryCandidateCard from '@/components/chat/MemoryCandidateCard.vue';
|
||||
import {
|
||||
chooseKnowledgeMedia,
|
||||
@@ -1023,26 +1018,6 @@ onUnload(() => {
|
||||
content: '';
|
||||
}
|
||||
|
||||
.source-switch {
|
||||
display: grid;
|
||||
grid-template-columns: 1fr 1fr;
|
||||
gap: 4px;
|
||||
margin-top: 16px;
|
||||
padding: 4px;
|
||||
}
|
||||
|
||||
.source-option {
|
||||
min-height: 44px;
|
||||
background: transparent;
|
||||
color: var(--employee-muted);
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.source-option.active {
|
||||
background: var(--employee-primary-soft);
|
||||
color: var(--employee-primary);
|
||||
}
|
||||
|
||||
.sop-eyebrow {
|
||||
display: inline-flex;
|
||||
margin-bottom: 12px;
|
||||
@@ -2059,79 +2034,6 @@ onUnload(() => {
|
||||
overflow: hidden;
|
||||
}
|
||||
|
||||
.chat-head {
|
||||
flex-shrink: 0;
|
||||
padding: 10px 14px 8px;
|
||||
background: #ffffff;
|
||||
border-bottom: 1px solid #ebedf0;
|
||||
}
|
||||
|
||||
.chat-head-row {
|
||||
display: flex;
|
||||
align-items: baseline;
|
||||
justify-content: space-between;
|
||||
margin-bottom: 8px;
|
||||
}
|
||||
|
||||
.chat-title {
|
||||
color: #18202b;
|
||||
font-size: 18px;
|
||||
font-weight: 800;
|
||||
}
|
||||
|
||||
.chat-context {
|
||||
color: #8a93a0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.chat-head-actions {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
gap: 8px;
|
||||
}
|
||||
|
||||
.new-chat-button {
|
||||
margin: 0;
|
||||
padding: 3px 9px;
|
||||
border: 1px solid #e3e6ea;
|
||||
border-radius: 999px;
|
||||
background: #ffffff;
|
||||
color: #5a6270;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
.chat-source-switch {
|
||||
display: flex;
|
||||
padding: 3px;
|
||||
border-radius: 999px;
|
||||
background: #f2f3f5;
|
||||
}
|
||||
|
||||
.chat-source-switch .source-option {
|
||||
display: flex;
|
||||
flex: 1;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
box-sizing: border-box;
|
||||
height: 32px;
|
||||
margin: 0;
|
||||
padding: 0;
|
||||
border: none;
|
||||
border-radius: 999px;
|
||||
background: transparent;
|
||||
color: #5a6270;
|
||||
font-size: 14px;
|
||||
line-height: 1.2;
|
||||
}
|
||||
|
||||
.chat-source-switch .source-option.active {
|
||||
background: #ffffff;
|
||||
color: #c8001a;
|
||||
font-weight: 700;
|
||||
box-shadow: 0 1px 4px rgba(20, 24, 31, 0.08);
|
||||
}
|
||||
|
||||
.chat-thread {
|
||||
flex: 1;
|
||||
min-height: 0;
|
||||
@@ -2263,14 +2165,18 @@ onUnload(() => {
|
||||
}
|
||||
|
||||
.bubble-action {
|
||||
display: flex;
|
||||
min-height: 28px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
padding: 4px 12px;
|
||||
padding: 0 12px;
|
||||
border: 1px solid #e3e6ea;
|
||||
border-radius: 999px;
|
||||
background: #f7f8fa;
|
||||
color: #38424e;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.bubble-action.active {
|
||||
@@ -2429,14 +2335,18 @@ onUnload(() => {
|
||||
}
|
||||
|
||||
.system-text {
|
||||
display: flex;
|
||||
max-width: 86%;
|
||||
padding: 4px 12px;
|
||||
min-height: 26px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
padding: 0 12px;
|
||||
border-radius: 999px;
|
||||
background: rgba(20, 24, 31, 0.06);
|
||||
color: #6b7480;
|
||||
font-size: 12px;
|
||||
text-align: center;
|
||||
line-height: 1.5;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.pending-bubble .bubble-text {
|
||||
@@ -2504,32 +2414,18 @@ onUnload(() => {
|
||||
|
||||
.transcript-toggle {
|
||||
flex-shrink: 0;
|
||||
display: flex;
|
||||
min-height: 28px;
|
||||
align-items: center;
|
||||
justify-content: center;
|
||||
margin: 0;
|
||||
padding: 4px 12px;
|
||||
padding: 0 12px;
|
||||
border: none;
|
||||
border-radius: 8px;
|
||||
background: rgba(20, 24, 31, 0.06);
|
||||
color: #6b7480;
|
||||
font-size: 12px;
|
||||
line-height: 1.5;
|
||||
}
|
||||
|
||||
/* compact header */
|
||||
.chat-head {
|
||||
padding: 8px 12px 6px;
|
||||
}
|
||||
|
||||
.chat-head-row {
|
||||
margin-bottom: 6px;
|
||||
}
|
||||
|
||||
.chat-title {
|
||||
font-size: 16px;
|
||||
}
|
||||
|
||||
.chat-source-switch .source-option {
|
||||
height: 30px;
|
||||
font-size: 13px;
|
||||
line-height: 1;
|
||||
}
|
||||
|
||||
.transcript-collapse {
|
||||
@@ -2546,12 +2442,15 @@ onUnload(() => {
|
||||
|
||||
.scope-note {
|
||||
flex-shrink: 0;
|
||||
padding: 6px 14px;
|
||||
display: flex;
|
||||
min-height: 30px;
|
||||
align-items: center;
|
||||
padding: 0 14px;
|
||||
border-top: 1px solid #eceef1;
|
||||
background: #ffffff;
|
||||
color: #8a93a0;
|
||||
font-size: 12px;
|
||||
line-height: 1.4;
|
||||
line-height: 1.3;
|
||||
}
|
||||
|
||||
.master-col :deep(.memory-card) {
|
||||
|
||||
Reference in New Issue
Block a user