feat: Enhance loading indicators and improve UI consistency across chat components

- Replaced loading GIFs with animated typing indicators for a more modern user experience.
- Updated styles for various components to ensure consistent padding, margins, and font sizes.
- Improved responsiveness and visual hierarchy in tool result displays and document information sections.
- Enhanced overall UI aesthetics with refined color schemes and layout adjustments.
This commit is contained in:
wizardchen
2025-11-21 02:56:02 +08:00
parent 9e98848d69
commit 83ea262286
11 changed files with 765 additions and 528 deletions
File diff suppressed because it is too large Load Diff
@@ -125,7 +125,7 @@ const toolArguments = computed(() => props.arguments || {});
<style lang="less" scoped> <style lang="less" scoped>
.tool-result-renderer { .tool-result-renderer {
margin: 8px 0; margin: 0;
} }
.fallback-output { .fallback-output {
+48 -3
View File
@@ -7,9 +7,14 @@
</div> </div>
<!-- 非 Agent 模式下才显示传统的 markdown 渲染 --> <!-- 非 Agent 模式下才显示传统的 markdown 渲染 -->
<div ref="parentMd" v-if="!session.hideContent && !session.isAgentMode"> <div ref="parentMd" v-if="!session.hideContent && !session.isAgentMode">
<!-- 消息正在总结中则渲染加载gif --> <!-- 消息正在总结中则渲染加载动画 -->
<img v-if="session.thinking" class="botanswer_laoding_gif" src="@/assets/img/botanswer_loading.gif" <div v-if="session.thinking" class="thinking-loading">
:alt="$t('chat.summaryInProgress')"> <div class="loading-typing">
<span></span>
<span></span>
<span></span>
</div>
</div>
<!-- 直接渲染完整内容,避免切分导致的问题,样式与 thinking 一致 --> <!-- 直接渲染完整内容,避免切分导致的问题,样式与 thinking 一致 -->
<div class="content-wrapper"> <div class="content-wrapper">
<div class="ai-markdown-template markdown-content" v-html="processMarkdown(content || session.content)"></div> <div class="ai-markdown-template markdown-content" v-html="processMarkdown(content || session.content)"></div>
@@ -339,6 +344,46 @@ onMounted(async () => {
margin-left: 16px; margin-left: 16px;
} }
.thinking-loading {
margin-left: 16px;
margin-bottom: 8px;
}
.loading-typing {
display: flex;
align-items: center;
gap: 4px;
span {
width: 6px;
height: 6px;
border-radius: 50%;
background: #07c05f;
animation: typingBounce 1.4s ease-in-out infinite;
&:nth-child(1) {
animation-delay: 0s;
}
&:nth-child(2) {
animation-delay: 0.2s;
}
&:nth-child(3) {
animation-delay: 0.4s;
}
}
}
@keyframes typingBounce {
0%, 60%, 100% {
transform: translateY(0);
}
30% {
transform: translateY(-8px);
}
}
.img_loading { .img_loading {
background: #3032360f; background: #3032360f;
height: 230px; height: 230px;
@@ -127,61 +127,29 @@ const formatMetadataValue = (value: unknown) => {
.document-info { .document-info {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 12px; gap: 8px;
}
.document-summary {
.summary-main {
display: flex;
justify-content: space-between;
align-items: center;
gap: 12px;
}
.summary-label {
font-size: 13px;
font-weight: 600;
color: #333;
}
.summary-value {
font-size: 13px;
color: #555;
}
.summary-meta {
margin-top: 8px;
display: flex;
flex-wrap: wrap;
gap: 6px;
}
.summary-errors {
margin-top: 10px;
padding-top: 10px;
border-top: 1px solid @card-border;
}
} }
.meta-chip { .meta-chip {
font-size: 12px; font-size: 11px;
color: #555; color: #6b7280;
background: #ffffff; background: #f9fafb;
border: 1px solid @card-border; border: 1px solid @card-border;
border-radius: 12px; border-radius: 10px;
padding: 2px 10px; padding: 2px 8px;
line-height: 1.6; line-height: 1.5;
white-space: nowrap; white-space: nowrap;
} }
.documents-list { .documents-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 10px; gap: 8px;
} }
.document-card { .document-card {
margin: 0 10px 10px 10px; margin: 0 8px 8px 8px;
.document-header { .document-header {
align-items: center; align-items: center;
} }
@@ -192,24 +160,24 @@ const formatMetadataValue = (value: unknown) => {
} }
.doc-title { .doc-title {
font-size: 14px; font-size: 13px;
font-weight: 500; font-weight: 500;
color: #222; color: #374151;
} }
.status-pill { .status-pill {
font-size: 12px; font-size: 11px;
color: #07c05f; color: #07c05f;
border: 1px solid rgba(7, 192, 95, 0.5); border: 1px solid rgba(7, 192, 95, 0.3);
border-radius: 12px; border-radius: 10px;
padding: 2px 10px; padding: 2px 8px;
line-height: 1.4; line-height: 1.4;
} }
} }
.info-section { .info-section {
margin-top: 0; margin-top: 0;
padding: 8px 0; padding: 6px 0;
&:first-of-type { &:first-of-type {
padding-top: 4px; padding-top: 4px;
@@ -218,66 +186,71 @@ const formatMetadataValue = (value: unknown) => {
.info-field { .info-field {
display: flex; display: flex;
gap: 12px; gap: 10px;
margin-bottom: 6px; margin-bottom: 5px;
font-size: 13px; font-size: 12px;
line-height: 1.5;
.field-label { .field-label {
color: #8b8b8b; color: #6b7280;
min-width: 100px; min-width: 90px;
font-weight: 600; font-weight: 500;
} }
.field-value { .field-value {
flex: 1; flex: 1;
color: #333; color: #374151;
line-height: 1.5; line-height: 1.5;
} }
} }
.metadata-section { .metadata-section {
padding-top: 12px; padding-top: 10px;
border-top: 1px dashed @card-border; border-top: 1px dashed @card-border;
} }
.metadata-list { .metadata-list {
list-style: none; list-style: none;
margin: 6px 0 0; margin: 4px 0 0;
padding: 0; padding: 0;
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 4px; gap: 3px;
li { li {
font-size: 12px; font-size: 11px;
color: #333; color: #374151;
line-height: 1.5;
} }
.metadata-key { .metadata-key {
font-weight: 600; font-weight: 600;
margin-right: 4px; margin-right: 4px;
color: #6b7280;
} }
.metadata-value { .metadata-value {
font-family: 'Monaco', 'Courier New', monospace; font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
color: #374151;
} }
} }
.empty-state { .empty-state {
font-size: 13px; font-size: 12px;
color: #666; color: #9ca3af;
text-align: center; text-align: center;
padding: 16px; padding: 14px;
border: 1px dashed @card-border; border: 1px dashed @card-border;
border-radius: @card-radius; border-radius: @card-radius;
background: #fff; background: #f9fafb;
} }
code { code {
font-family: 'Monaco', 'Courier New', monospace; font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
font-size: 11px; font-size: 10px;
background: #f0f0f0; background: #f3f4f6;
padding: 2px 4px; padding: 2px 4px;
border-radius: 3px; border-radius: 2px;
color: #374151;
} }
</style> </style>
@@ -36,10 +36,10 @@ const props = defineProps<Props>();
<style lang="less" scoped> <style lang="less" scoped>
.plan-display { .plan-display {
font-size: 13px; font-size: 12px;
color: #666; color: #6b7280;
background: transparent; background: transparent;
padding: 8px 0 8px 12px; padding: 6px 0 6px 12px;
margin: 0; margin: 0;
border: none !important; border: none !important;
box-shadow: none !important; box-shadow: none !important;
@@ -49,15 +49,15 @@ const props = defineProps<Props>();
.plan-steps { .plan-steps {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 4px; gap: 3px;
} }
.step-item { .step-item {
display: flex; display: flex;
align-items: flex-start; align-items: flex-start;
gap: 8px; gap: 7px;
padding: 2px 0; padding: 1px 0;
transition: all 0.2s; transition: all 0.15s;
&:last-child { &:last-child {
margin-bottom: 0; margin-bottom: 0;
@@ -65,7 +65,7 @@ const props = defineProps<Props>();
&.status-in_progress { &.status-in_progress {
.step-description { .step-description {
color: #333; color: #374151;
font-weight: 500; font-weight: 500;
} }
} }
@@ -100,27 +100,27 @@ const props = defineProps<Props>();
.step-description { .step-description {
flex: 1; flex: 1;
color: #666; color: #6b7280;
line-height: 1.5; line-height: 1.5;
font-size: 13px; font-size: 12px;
&.completed { &.completed {
text-decoration: line-through; text-decoration: line-through;
color: #999; color: #9ca3af;
} }
.sparkle { .sparkle {
margin-left: 4px; margin-left: 3px;
font-size: 12px; font-size: 11px;
} }
} }
.no-steps { .no-steps {
padding: 8px 12px; padding: 12px;
text-align: center; text-align: center;
color: #9ca3af; color: #9ca3af;
font-style: italic; font-style: italic;
font-size: 13px; font-size: 12px;
} }
</style> </style>
@@ -127,90 +127,13 @@ const getRelevanceLabel = (level: RelevanceLevel): string => {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 0 0 0 12px; padding: 0 0 0 12px;
gap: 4px; gap: 3px;
}
.search-params {
padding: 10px 12px;
background: #f8f9fa;
border: 1px solid #e7e7e7;
border-radius: 6px;
font-size: 13px;
line-height: 1.5;
display: flex;
flex-direction: column;
gap: 8px;
.params-main {
display: flex;
flex-direction: column;
gap: 6px;
}
.param-item {
display: flex;
align-items: flex-start;
gap: 8px;
.param-label {
font-weight: 600;
color: #666;
min-width: 75px;
flex-shrink: 0;
font-size: 12px;
}
.param-value {
color: #333;
flex: 1;
word-break: break-word;
line-height: 1.5;
font-size: 13px;
}
}
.params-meta {
display: flex;
flex-wrap: wrap;
gap: 6px;
padding-top: 6px;
border-top: 1px solid #e7e7e7;
.param-meta-item {
font-size: 11px;
color: #666;
background: #ffffff;
padding: 3px 8px;
border-radius: 4px;
border: 1px solid #e7e7e7;
white-space: nowrap;
}
}
}
.stats-card {
padding: 8px 12px;
background: #f8f9fa;
border: 1px solid #e7e7e7;
border-radius: 6px;
font-size: 13px;
line-height: 1.6;
.stats-label {
font-weight: 600;
color: #666;
margin-right: 6px;
}
.stats-item-inline {
color: #333;
}
} }
.results-list { .results-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 8px; gap: 3px;
} }
.result-item { .result-item {
@@ -221,14 +144,14 @@ const getRelevanceLabel = (level: RelevanceLevel): string => {
} }
.result-header { .result-header {
padding: 4px 0; padding: 2px 0;
cursor: pointer; cursor: pointer;
user-select: none; user-select: none;
display: flex; display: flex;
align-items: center; align-items: center;
justify-content: space-between; justify-content: space-between;
gap: 8px; gap: 6px;
transition: color 0.25s cubic-bezier(0.4, 0, 0.2, 1); transition: color 0.15s ease;
&:hover { &:hover {
color: #07c05f; color: #07c05f;
@@ -242,24 +165,26 @@ const getRelevanceLabel = (level: RelevanceLevel): string => {
flex: 1; flex: 1;
min-width: 0; min-width: 0;
font-size: 12px; font-size: 12px;
line-height: 1.4;
} }
.result-index { .result-index {
font-size: 11px; font-size: 11px;
color: #8b8b8b; color: #9ca3af;
font-weight: 600; font-weight: 600;
flex-shrink: 0; flex-shrink: 0;
} }
.relevance-badge { .relevance-badge {
flex-shrink: 0; flex-shrink: 0;
font-size: 11px; font-size: 10px;
padding: 2px 6px; padding: 2px 5px;
border-radius: 3px;
} }
.knowledge-title { .knowledge-title {
font-size: 12px; font-size: 12px;
color: #333; color: #374151;
flex: 1; flex: 1;
font-weight: 500; font-weight: 500;
overflow: hidden; overflow: hidden;
@@ -268,7 +193,6 @@ const getRelevanceLabel = (level: RelevanceLevel): string => {
min-width: 0; min-width: 0;
} }
// Popup overlay styles // Popup overlay styles
:deep([class*="result-popup-"]) { :deep([class*="result-popup-"]) {
.t-popup__content { .t-popup__content {
@@ -278,14 +202,14 @@ const getRelevanceLabel = (level: RelevanceLevel): string => {
overflow-x: hidden; overflow-x: hidden;
padding: 0; padding: 0;
border-radius: 6px; border-radius: 6px;
box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15); box-shadow: 0 4px 12px rgba(0, 0, 0, 0.12);
word-wrap: break-word; word-wrap: break-word;
word-break: break-word; word-break: break-word;
} }
} }
.info-section { .info-section {
margin-top: 8px; margin-top: 6px;
&:first-child { &:first-child {
margin-top: 0; margin-top: 0;
@@ -293,32 +217,32 @@ const getRelevanceLabel = (level: RelevanceLevel): string => {
} }
.full-content { .full-content {
font-size: 13px; font-size: 12px;
color: #333; color: #374151;
line-height: 1.8; line-height: 1.6;
padding: 12px; padding: 10px;
background: #ffffff; background: #ffffff;
border-radius: 4px; border-radius: 4px;
border: 1px solid #e7e7e7; border: 1px solid #e5e7eb;
white-space: pre-wrap; white-space: pre-wrap;
word-break: break-word; word-break: break-word;
margin-bottom: 8px; margin-bottom: 6px;
} }
.info-field { .info-field {
font-size: 11px; font-size: 11px;
margin-bottom: 3px; margin-bottom: 4px;
.field-label { .field-label {
min-width: 60px; min-width: 60px;
font-size: 11px; font-size: 10px;
} }
} }
code { code {
font-family: 'Monaco', 'Courier New', monospace; font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
font-size: 10px; font-size: 10px;
background: #f0f0f0; background: #f3f4f6;
padding: 1px 4px; padding: 1px 4px;
border-radius: 2px; border-radius: 2px;
} }
@@ -23,30 +23,32 @@ useI18n(); // ensure component reacts to locale changes if needed
@import './tool-results.less'; @import './tool-results.less';
.thinking-display { .thinking-display {
padding: 8px 0; padding: 0;
} }
.thinking-content { .thinking-content {
display: flex; display: flex;
gap: 8px; gap: 10px;
padding: 10px 12px; padding: 12px 14px;
background: #f3f3f3; background: #f9fafb;
border-radius: 6px; border-radius: 6px;
border-left: 3px solid #8b8b8b; border-left: 3px solid #9ca3af;
} }
.thinking-icon { .thinking-icon {
font-size: 16px; font-size: 16px;
flex-shrink: 0; flex-shrink: 0;
line-height: 1.5;
} }
.thinking-text { .thinking-text {
font-size: 13px; font-size: 15px;
color: #333; color: #1f2937;
line-height: 1.6; line-height: 1.65;
white-space: pre-wrap; white-space: pre-wrap;
word-break: break-word; word-break: break-word;
flex: 1; flex: 1;
font-weight: 400;
} }
</style> </style>
@@ -181,30 +181,31 @@ const indexKey = (index: number, item: WebFetchResultItem): string => {
.web-fetch-results { .web-fetch-results {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 8px; gap: 6px;
padding: 8px 8px 0 8px; padding: 6px 6px 0 6px;
} }
.results-list { .results-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 8px; gap: 6px;
} }
.result-index { .result-index {
font-size: 12px; font-size: 11px;
font-weight: 600; font-weight: 600;
color: #8b8b8b; color: #9ca3af;
} }
.result-link { .result-link {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
gap: 4px; gap: 4px;
color: #1f2937; color: #374151;
font-size: 13px; font-size: 12px;
font-weight: 500; font-weight: 500;
text-decoration: none; text-decoration: none;
transition: color 0.15s ease;
&:hover { &:hover {
color: #07c05f; color: #07c05f;
@@ -213,29 +214,30 @@ const indexKey = (index: number, item: WebFetchResultItem): string => {
} }
.result-domain { .result-domain {
font-size: 13px; font-size: 12px;
font-weight: 500; font-weight: 500;
color: #1f2937; color: #374151;
} }
.meta-pill { .meta-pill {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
padding: 2px 8px; padding: 2px 6px;
border-radius: 999px; border-radius: 999px;
background: #e8f8f0; background: rgba(7, 192, 95, 0.08);
color: #0f7a49; color: #0f7a49;
font-size: 11px; font-size: 10px;
font-weight: 600; font-weight: 600;
line-height: 1.4;
} }
.meta-text { .meta-text {
font-size: 12px; font-size: 11px;
color: #6b7280; color: #6b7280;
} }
.result-content.expanded { .result-content.expanded {
padding-top: 12px; padding-top: 10px;
} }
.info-field .field-value a { .info-field .field-value a {
@@ -248,13 +250,14 @@ const indexKey = (index: number, item: WebFetchResultItem): string => {
} }
.raw-length { .raw-length {
font-size: 12px; font-size: 11px;
color: #8b8b8b; color: #9ca3af;
margin-left: 4px; margin-left: 4px;
font-weight: normal;
} }
.action-button { .action-button {
margin-top: 8px; margin-top: 6px;
} }
.info-section-title.error { .info-section-title.error {
@@ -150,20 +150,20 @@ const formatDate = (dateStr: string): string => {
.web-search-results { .web-search-results {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
padding: 8px 8px 0 8px; padding: 0 0 0 12px;
gap: 8px; gap: 4px;
} }
.results-groups { .results-groups {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 8px; gap: 4px;
} }
.results-group { .results-group {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 4px; gap: 3px;
} }
.group-header { .group-header {
@@ -199,14 +199,13 @@ const formatDate = (dateStr: string): string => {
.results-list { .results-list {
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 4px; gap: 3px;
} }
.result-item { .result-item {
// padding: 6px 8px;
background: #ffffff; background: #ffffff;
border: none; border: none;
border-radius: 8px; border-radius: 0;
transition: none; transition: none;
} }
@@ -215,30 +214,30 @@ const formatDate = (dateStr: string): string => {
align-items: center; align-items: center;
gap: 6px; gap: 6px;
margin-bottom: 0; margin-bottom: 0;
/* Ensure links inside header remain clickable despite shared styles */ padding: 2px 0;
:deep(a) { :deep(a) {
pointer-events: auto; pointer-events: auto;
} }
} }
.result-index { .result-index {
font-size: 12px; font-size: 11px;
font-weight: 600; font-weight: 600;
color: #8b8b8b; color: #9ca3af;
flex-shrink: 0; flex-shrink: 0;
padding-top: 1px; min-width: 24px;
min-width: 28px;
text-align: right; text-align: right;
} }
.result-title-link { .result-title-link {
display: flex; display: flex;
align-items: baseline; align-items: baseline;
gap: 8px; gap: 6px;
flex: 1; flex: 1;
text-decoration: none; text-decoration: none;
color: #1f2937; color: #374151;
transition: color 0.2s ease; transition: color 0.15s ease;
&:hover { &:hover {
color: #07c05f; color: #07c05f;
@@ -250,10 +249,10 @@ const formatDate = (dateStr: string): string => {
} }
.result-title { .result-title {
font-size: 13px; font-size: 12px;
font-weight: 600; font-weight: 500;
line-height: 1.2; line-height: 1.4;
color: #1f2937; color: inherit;
flex: 1; flex: 1;
word-break: break-word; word-break: break-word;
overflow: hidden; overflow: hidden;
@@ -267,47 +266,25 @@ const formatDate = (dateStr: string): string => {
white-space: nowrap; white-space: nowrap;
} }
.result-domain {
font-size: 12px;
color: #6b7280;
flex-shrink: 0;
}
.external-link-icon {
font-size: 11px;
color: #9ca3af;
flex-shrink: 0;
transition: color 0.2s ease;
}
.result-title-link:hover .external-link-icon {
color: #07c05f;
}
.result-title-text { .result-title-text {
display: flex; display: flex;
align-items: baseline; align-items: baseline;
flex: 1; flex: 1;
}
.result-title {
.result-title-text .result-title { font-size: 12px;
font-size: 13px; font-weight: 500;
font-weight: 600; line-height: 1.4;
line-height: 1.3; color: #374151;
color: #1f2937; }
flex: 1;
word-break: break-word;
overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
} }
.result-meta { .result-meta {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 10px; gap: 8px;
margin-top: 6px; margin-top: 4px;
padding-top: 6px; padding-top: 4px;
border-top: 1px solid #f3f4f6; border-top: 1px solid #f3f4f6;
font-size: 10px; font-size: 10px;
color: #9ca3af; color: #9ca3af;
@@ -315,7 +292,7 @@ const formatDate = (dateStr: string): string => {
.meta-item { .meta-item {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 4px; gap: 3px;
} }
.meta-icon { .meta-icon {
@@ -324,13 +301,14 @@ const formatDate = (dateStr: string): string => {
} }
.empty-state { .empty-state {
padding: 20px; padding: 16px;
text-align: center; text-align: center;
color: #9ca3af; color: #9ca3af;
font-size: 12px;
font-style: italic; font-style: italic;
background: #f9fafb; background: #f9fafb;
border-radius: 6px; border-radius: 6px;
border: 1px solid #e5e7eb; border: 1px dashed #e5e7eb;
} }
</style> </style>
@@ -10,49 +10,50 @@
@relevance-weak: #bdbdbd; @relevance-weak: #bdbdbd;
// Card colors // Card colors
@card-bg: #f8f9fa; @card-bg: #ffffff;
@card-border: #e7e7e7; @card-border: #e5e7eb;
@card-hover-border: #07c05f; @card-hover-border: #07c05f;
@card-radius: 8px; @card-radius: 6px;
@card-shadow: 0 2px 4px rgba(0, 0, 0, 0.05); @card-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
@card-shadow-hover: 0 4px 8px rgba(0, 0, 0, 0.1); @card-shadow-hover: 0 2px 6px rgba(7, 192, 95, 0.08);
// Animation timing // Animation timing
@transition-time: 0.3s; @transition-time: 0.2s;
// Tool result container // Tool result container
.tool-result-container { .tool-result-container {
margin: 8px 0; margin: 12px 0;
} }
// Relevance badge styles // Relevance badge styles
.relevance-badge { .relevance-badge {
display: inline-flex; display: inline-flex;
align-items: center; align-items: center;
padding: 4px 8px; padding: 2px 6px;
border-radius: 4px; border-radius: 3px;
font-size: 12px; font-size: 11px;
font-weight: 600; font-weight: 600;
gap: 4px; gap: 3px;
line-height: 1.4;
&.high { &.high {
background-color: @relevance-high; background-color: rgba(0, 168, 112, 0.12);
color: white; color: @relevance-high;
} }
&.medium { &.medium {
background-color: @relevance-medium; background-color: rgba(255, 152, 0, 0.12);
color: white; color: #d67700;
} }
&.low { &.low {
background-color: @relevance-low; background-color: rgba(117, 117, 117, 0.12);
color: white; color: @relevance-low;
} }
&.weak { &.weak {
background-color: @relevance-weak; background-color: rgba(189, 189, 189, 0.12);
color: #333; color: #666;
} }
} }
@@ -62,25 +63,26 @@
align-items: center; align-items: center;
padding: 2px 6px; padding: 2px 6px;
border-radius: 3px; border-radius: 3px;
font-size: 11px; font-size: 10px;
background-color: #e7e7e7; background-color: #f3f4f6;
color: #666; color: #6b7280;
gap: 2px; gap: 2px;
line-height: 1.4;
} }
// Result card // Result card
.result-card { .result-card {
background: #ffffff; background: @card-bg;
border: 1px solid @card-border; border: 1px solid @card-border;
border-radius: @card-radius; border-radius: @card-radius;
margin-bottom: 0; margin-bottom: 0;
overflow: hidden; overflow: hidden;
transition: all @transition-time ease; transition: border-color @transition-time ease, box-shadow @transition-time ease;
box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04); box-shadow: @card-shadow;
&:hover { &:hover {
border-color: @card-hover-border; border-color: @card-hover-border;
box-shadow: 0 2px 8px rgba(7, 192, 95, 0.12); box-shadow: @card-shadow-hover;
} }
} }
@@ -94,9 +96,10 @@
gap: 8px; gap: 8px;
position: relative; position: relative;
z-index: 1; z-index: 1;
transition: background-color 0.15s ease;
&:hover { &:hover {
background: rgba(7, 192, 95, 0.05); background: rgba(7, 192, 95, 0.04);
} }
* { * {
@@ -107,22 +110,24 @@
.result-title { .result-title {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 8px; gap: 6px;
flex: 1; flex: 1;
font-size: 14px; font-size: 13px;
font-weight: 500; font-weight: 500;
line-height: 1.4;
} }
.result-meta { .result-meta {
display: flex; display: flex;
align-items: center; align-items: center;
gap: 6px; gap: 6px;
font-size: 12px; font-size: 11px;
color: #8b8b8b; color: #6b7280;
flex-shrink: 0;
} }
.result-content { .result-content {
padding: 0 12px 12px 12px; padding: 0;
border-top: 1px solid @card-border; border-top: 1px solid @card-border;
background: white; background: white;
max-height: 0; max-height: 0;
@@ -139,11 +144,11 @@
.expand-icon { .expand-icon {
font-size: 12px; font-size: 12px;
color: #8b8b8b; color: #9ca3af;
transition: transform 0.2s ease; transition: transform 0.15s ease, color 0.15s ease;
&.expanded { &.expanded {
transform: rotate(90deg); transform: rotate(180deg);
} }
} }
@@ -157,44 +162,48 @@
} }
.info-section-title { .info-section-title {
font-size: 12px; font-size: 11px;
font-weight: 600; font-weight: 600;
color: #666; color: #6b7280;
text-transform: uppercase; text-transform: uppercase;
letter-spacing: 0.5px; letter-spacing: 0.5px;
margin-bottom: 6px; margin-bottom: 8px;
} }
.info-field { .info-field {
display: flex; display: flex;
gap: 8px; gap: 8px;
margin-bottom: 4px; margin-bottom: 6px;
font-size: 13px; font-size: 12px;
line-height: 1.5;
.field-label { .field-label {
color: #8b8b8b; color: #6b7280;
min-width: 80px; min-width: 80px;
flex-shrink: 0;
font-weight: 500;
} }
.field-value { .field-value {
color: #333; color: #374151;
flex: 1; flex: 1;
word-break: break-word;
} }
} }
// Statistics card (for KB counts, etc.) // Statistics card (for KB counts, etc.)
.stats-card { .stats-card {
background: #f0f7ff; background: rgba(7, 192, 95, 0.04);
border: 1px solid #d6e4ff; border: 1px solid rgba(7, 192, 95, 0.15);
border-radius: 6px; border-radius: @card-radius;
padding: 10px 12px; padding: 10px 12px;
margin-bottom: 12px; margin-bottom: 10px;
} }
.stats-title { .stats-title {
font-size: 13px; font-size: 12px;
font-weight: 600; font-weight: 600;
color: #333; color: #374151;
margin-bottom: 6px; margin-bottom: 6px;
} }
@@ -205,17 +214,18 @@
} }
.stats-item { .stats-item {
font-size: 12px; font-size: 11px;
color: #666; color: #6b7280;
display: flex; display: flex;
justify-content: space-between; justify-content: space-between;
line-height: 1.5;
} }
// Grid layout for cards // Grid layout for cards
.card-grid { .card-grid {
display: grid; display: grid;
grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
gap: 12px; gap: 10px;
margin-top: 8px; margin-top: 8px;
} }
@@ -224,8 +234,8 @@
display: flex; display: flex;
flex-direction: column; flex-direction: column;
gap: 4px; gap: 4px;
padding: 8px 0; padding: 6px 0;
border-bottom: 1px solid #f0f0f0; border-bottom: 1px solid #f3f4f6;
&:last-child { &:last-child {
border-bottom: none; border-bottom: none;
@@ -234,9 +244,9 @@
// Content preview (truncated) // Content preview (truncated)
.content-preview { .content-preview {
font-size: 13px; font-size: 12px;
color: #333; color: #374151;
line-height: 1.5; line-height: 1.6;
max-height: 60px; max-height: 60px;
overflow: hidden; overflow: hidden;
text-overflow: ellipsis; text-overflow: ellipsis;
@@ -247,13 +257,13 @@
// Full content // Full content
.full-content { .full-content {
font-size: 13px; font-size: 12px;
color: #333; color: #374151;
line-height: 1.6; line-height: 1.6;
white-space: pre-wrap; white-space: pre-wrap;
word-break: break-word; word-break: break-word;
padding: 8px; padding: 10px;
background: #f5f5f5; background: #f9fafb;
border-radius: 4px; border-radius: 4px;
border: 1px solid @card-border; border: 1px solid @card-border;
} }
@@ -261,36 +271,43 @@
// Action buttons // Action buttons
.action-button { .action-button {
padding: 4px 10px; padding: 4px 10px;
font-size: 12px; font-size: 11px;
border-radius: 4px; border-radius: 4px;
border: 1px solid @card-border; border: 1px solid @card-border;
background: white; background: white;
color: #666; color: #6b7280;
cursor: pointer; cursor: pointer;
transition: all 0.2s ease; transition: all 0.15s ease;
font-weight: 500;
&:hover { &:hover {
border-color: @card-hover-border; border-color: @card-hover-border;
color: @card-hover-border; color: @card-hover-border;
background: rgba(7, 192, 95, 0.04);
} }
} }
// Empty state // Empty state
.empty-state { .empty-state {
padding: 24px; padding: 20px;
text-align: center; text-align: center;
color: #8b8b8b; color: #9ca3af;
font-size: 14px; font-size: 12px;
font-style: italic;
background: #f9fafb;
border-radius: @card-radius;
border: 1px dashed @card-border;
} }
// Code block // Code block
.code-block { .code-block {
font-family: 'Monaco', 'Courier New', monospace; font-family: 'Monaco', 'Menlo', 'Courier New', monospace;
font-size: 12px; font-size: 11px;
background: #f5f5f5; background: #f9fafb;
padding: 8px; padding: 8px;
border-radius: 4px; border-radius: 4px;
border: 1px solid @card-border; border: 1px solid @card-border;
overflow-x: auto; overflow-x: auto;
line-height: 1.5;
} }
+41 -2
View File
@@ -12,8 +12,12 @@
</div> </div>
</div> </div>
<div v-if="loading" <div v-if="loading"
style="height: 41px;display: flex;align-items: center;background: #fff;width: 58px;"> style="height: 41px;display: flex;align-items: center;padding-left: 4px;">
<img class="botanswer_laoding_gif" src="@/assets/img/botanswer_loading.gif" :alt="$t('chat.waitingForAnswer')"> <div class="loading-typing">
<span></span>
<span></span>
<span></span>
</div>
</div> </div>
</div> </div>
</div> </div>
@@ -872,5 +876,40 @@ onBeforeRouteUpdate((to, from, next) => {
height: 18px; height: 18px;
margin-left: 16px; margin-left: 16px;
} }
.loading-typing {
display: flex;
align-items: center;
gap: 4px;
span {
width: 6px;
height: 6px;
border-radius: 50%;
background: #07c05f;
animation: typingBounce 1.4s ease-in-out infinite;
&:nth-child(1) {
animation-delay: 0s;
}
&:nth-child(2) {
animation-delay: 0.2s;
}
&:nth-child(3) {
animation-delay: 0.4s;
}
}
}
}
@keyframes typingBounce {
0%, 60%, 100% {
transform: translateY(0);
}
30% {
transform: translateY(-8px);
}
} }
</style> </style>