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