Skip to content

Open-source LLM knowledge platform: turn raw documents into a queryable RAG, an autonomous reasoning agent, and a self-maintaining Wiki.

fix: standardize border styles across components

wizardchen371002e085c2
diff --git a/frontend/src/components/AgentSelector.vue b/frontend/src/components/AgentSelector.vue
index c5f48c1b6..96e616d2e 100644
--- a/frontend/src/components/AgentSelector.vue
+++ b/frontend/src/components/AgentSelector.vue
@@ -478,7 +478,7 @@ watch(() => props.visible, (newVal) => {
background: var(--td-bg-color-container, #fff);
border-radius: 10px;
box-shadow: var(--td-shadow-2, 0 6px 28px rgba(15, 23, 42, 0.08));
- border: 1px solid var(--td-component-border, #e7e9eb);
+ border: .5px solid var(--td-component-border, #e7e9eb);
overflow: hidden;
display: flex;
flex-direction: column;
diff --git a/frontend/src/components/Input-field.vue b/frontend/src/components/Input-field.vue
index f31381a7c..7253add72 100644
--- a/frontend/src/components/Input-field.vue
+++ b/frontend/src/components/Input-field.vue
@@ -2017,7 +2017,7 @@ const getImgSrc = (url: string) => {
width: 800px;
background: var(--td-bg-color-container, #FFF);
border-radius: 12px;
- border: 1px solid var(--td-component-border, #E7E7E7);
+ border: .5px solid var(--td-component-border, #E7E7E7);
box-shadow: 0 6px 6px 0 rgba(0, 0, 0, 0.04), 0 12px 12px -1px rgba(0, 0, 0, 0.08);
&:focus-within {
@@ -2032,7 +2032,7 @@ const getImgSrc = (url: string) => {
align-items: center;
gap: 5px;
padding: 6px 12px 6px;
- border-bottom: 1px solid var(--td-component-stroke, #e7e7e7);
+ border-bottom: .5px solid var(--td-component-stroke, #e7e7e7);
background: var(--td-bg-color-container, #fff);
border-radius: 11px 11px 0 0; /* 与 .rich-input-container 内缘上边圆角一致(12px - 1px 边框) */
}
@@ -2047,7 +2047,7 @@ const getImgSrc = (url: string) => {
font-weight: 500;
cursor: default;
transition: background 0.2s, border-color 0.2s, box-shadow 0.2s;
- border: 1px solid transparent;
+ border: .5px solid transparent;
color: var(--td-text-color-primary, #1f2937);
line-height: 1.3;
}
@@ -2263,7 +2263,6 @@ const getImgSrc = (url: string) => {
gap: 4px;
padding: 6px 10px;
border-radius: 6px;
- background: var(--td-bg-color-secondarycontainer, #f5f5f5);
color: var(--td-text-color-secondary, #666);
cursor: pointer;
transition: background 0.12s, color 0.12s;
@@ -2290,7 +2289,7 @@ const getImgSrc = (url: string) => {
min-width: auto;
font-weight: 500;
position: relative;
- border: 1px solid var(--td-component-border, #e7e7e7);
+ border: .5px solid var(--td-component-border, #e7e7e7);
}
.agent-icon {
@@ -2433,7 +2432,7 @@ const getImgSrc = (url: string) => {
:global(.input-field-tooltip) {
.t-popup__content {
box-shadow: var(--td-shadow-2);
- border: 1px solid var(--td-component-border, #e7e7e7);
+ border: .5px solid var(--td-component-border, #e7e7e7);
}
}
@@ -2556,8 +2555,7 @@ const getImgSrc = (url: string) => {
min-width: 100px;
height: 22px;
border-radius: 6px;
- border: 1px solid var(--td-component-border, #e7e7e7);
- background: var(--td-bg-color-secondarycontainer, #f5f5f5);
+ border: .5px solid var(--td-component-border, #e7e7e7);
transition: background 0.12s, border-color 0.12s;
cursor: pointer;
@@ -2615,7 +2613,7 @@ const getImgSrc = (url: string) => {
background: var(--td-bg-color-container, #fff);
border-radius: 10px;
box-shadow: var(--td-shadow-2, 0 6px 28px rgba(15, 23, 42, 0.08));
- border: 1px solid var(--td-component-border, #e7e9eb);
+ border: .5px solid var(--td-component-border, #e7e9eb);
overflow: hidden;
display: flex;
flex-direction: column;
@@ -2629,7 +2627,7 @@ const getImgSrc = (url: string) => {
align-items: center;
justify-content: space-between;
padding: 8px 12px;
- border-bottom: 1px solid var(--td-component-stroke, #f0f0f0);
+ border-bottom: .5px solid var(--td-component-stroke, #f0f0f0);
background: var(--td-bg-color-container, #fff);
font-size: 12px;
font-weight: 500;
@@ -2651,7 +2649,7 @@ const getImgSrc = (url: string) => {
gap: 4px;
padding: 2px 8px;
border-radius: 4px;
- border: 1px solid transparent;
+ border: .5px solid transparent;
background: transparent;
color: var(--td-brand-color, #07c05f);
font-size: 12px;
diff --git a/frontend/src/components/KnowledgeBaseSelector.vue b/frontend/src/components/KnowledgeBaseSelector.vue
index fbc5a601b..22de5d8c4 100644
--- a/frontend/src/components/KnowledgeBaseSelector.vue
+++ b/frontend/src/components/KnowledgeBaseSelector.vue
@@ -366,7 +366,7 @@ watch(() => props.visible, async (v) => {
.kb-dropdown {
position: fixed !important;
background: var(--td-bg-color-container);
- border: 1px solid var(--td-component-border);
+ border: .5px solid var(--td-component-border);
border-radius: 10px;
box-shadow: var(--td-shadow-2);
overflow: hidden;
@@ -382,13 +382,13 @@ watch(() => props.visible, async (v) => {
/* 宽度由 JS 控制(dropdownWidth),这里只做内部样式 */
.kb-search {
padding: 8px 10px;
- border-bottom: 1px solid var(--td-component-stroke);
+ border-bottom: .5px solid var(--td-component-stroke);
}
.kb-search-input {
width: 100%;
padding: 6px 10px;
font-size: 12px;
- border: 1px solid var(--td-component-stroke);
+ border: .5px solid var(--td-component-stroke);
border-radius: 6px;
background: var(--td-bg-color-secondarycontainer);
outline: none;
diff --git a/frontend/src/components/PromptTemplateSelector.vue b/frontend/src/components/PromptTemplateSelector.vue
index c5a5d20cf..c69b7aac3 100644
--- a/frontend/src/components/PromptTemplateSelector.vue
+++ b/frontend/src/components/PromptTemplateSelector.vue
@@ -145,12 +145,12 @@ onMounted(() => {
font-size: 12px;
height: 26px;
padding: 0 8px;
- background: rgba(255, 255, 255, 0.95);
-
+ background: var(--td-bg-color-container);
+
&:hover {
color: var(--td-brand-color);
border-color: var(--td-brand-color);
- background: var(--td-bg-color-container);
+ background: var(--td-bg-color-secondarycontainer);
}
:deep(.t-button__text) {
diff --git a/frontend/src/components/TenantSelector.vue b/frontend/src/components/TenantSelector.vue
index df19b42b3..399adb4d9 100644
--- a/frontend/src/components/TenantSelector.vue
+++ b/frontend/src/components/TenantSelector.vue
@@ -265,7 +265,7 @@ onUnmounted(() => {
cursor: pointer;
transition: all 0.2s;
background: var(--td-bg-color-secondarycontainer);
- border: 1px solid var(--td-component-stroke);
+ border: .5px solid var(--td-component-stroke);
&:hover {
background: var(--td-bg-color-container-hover);
@@ -323,7 +323,7 @@ onUnmounted(() => {
left: 0;
right: 0;
background: var(--td-bg-color-container);
- border: 1px solid var(--td-component-stroke);
+ border: .5px solid var(--td-component-stroke);
border-radius: 10px;
box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
z-index: 1000;
@@ -332,7 +332,7 @@ onUnmounted(() => {
.dropdown-header {
padding: 12px;
- border-bottom: 1px solid var(--td-component-stroke);
+ border-bottom: .5px solid var(--td-component-stroke);
}
.dropdown-title {
@@ -350,7 +350,7 @@ onUnmounted(() => {
padding: 7px 10px;
background: var(--td-bg-color-secondarycontainer);
border-radius: 6px;
- border: 1px solid transparent;
+ border: .5px solid transparent;
transition: all 0.2s;
&:focus-within {
diff --git a/frontend/src/views/agent/AgentList.vue b/frontend/src/views/agent/AgentList.vue
index e1d503f24..a9851f163 100644
--- a/frontend/src/views/agent/AgentList.vue
+++ b/frontend/src/views/agent/AgentList.vue
@@ -1188,7 +1188,7 @@ defineExpose({
/* 与知识库列表卡片统一尺寸:160px 高、18px 20px 内边距、12px 圆角 */
.agent-card {
- border: 1px solid var(--td-component-stroke);
+ border: .5px solid var(--td-component-stroke);
border-radius: 12px;
overflow: hidden;
box-sizing: border-box;
@@ -1469,7 +1469,7 @@ defineExpose({
justify-content: space-between;
margin-top: auto;
padding-top: 8px;
- border-top: 1px solid var(--td-component-stroke);
+ border-top: .5px solid var(--td-component-stroke);
}
.bottom-left {
diff --git a/frontend/src/views/chat/components/botmsg.vue b/frontend/src/views/chat/components/botmsg.vue
index 8eca110df..ac7637adf 100644
--- a/frontend/src/views/chat/components/botmsg.vue
+++ b/frontend/src/views/chat/components/botmsg.vue
@@ -310,8 +310,6 @@ onBeforeUnmount(() => {
background: var(--td-bg-color-container);
border-radius: 6px;
padding: 8px 12px;
- border: 1px solid var(--td-brand-color);
- box-shadow: 0 1px 3px rgba(7, 192, 95, 0.06);
transition: all 0.2s ease;
}
diff --git a/frontend/src/views/chat/components/deepThink.vue b/frontend/src/views/chat/components/deepThink.vue
index 01eec2b98..c9468ae09 100644
--- a/frontend/src/views/chat/components/deepThink.vue
+++ b/frontend/src/views/chat/components/deepThink.vue
@@ -3,7 +3,10 @@
<div class="think-header" @click="toggleFold">
<div class="think-title">
<span v-if="deepSession.thinking" class="thinking-status">
- <img class="thinking-gif" src="@/assets/img/think.gif" :alt="$t('chat.thinkingAlt')">
+ <span class="thinking-indicator">
+ <span class="indicator-dot"></span>
+ <span class="indicator-ring"></span>
+ </span>
<span class="thinking-text">{{ $t('chat.thinking') }}</span>
</span>
<span v-else class="done-status">
@@ -80,13 +83,13 @@ const toggleFold = () => {
// 安全地处理思考内容,防止XSS攻击
const safeProcessThinkContent = (content) => {
if (!content || typeof content !== 'string') return '';
-
+
// 先处理换行符
const contentWithBreaks = content.replace(/\n/g, '<br/>');
-
+
// 使用DOMPurify进行安全清理,允许基本的文本格式化标签
const cleanContent = sanitizeHTML(contentWithBreaks);
-
+
return cleanContent;
};
</script>
@@ -98,6 +101,7 @@ const safeProcessThinkContent = (content) => {
width: 100%;
border-radius: 8px;
background-color: var(--td-bg-color-container);
+ border: .5px solid var(--td-component-stroke);
box-shadow: 0 2px 4px rgba(7, 192, 95, 0.08);
overflow: hidden;
box-sizing: border-box;
@@ -126,13 +130,34 @@ const safeProcessThinkContent = (content) => {
.thinking-status {
display: flex;
align-items: center;
-
- .thinking-gif {
+
+ .thinking-indicator {
+ position: relative;
width: 16px;
height: 16px;
margin-right: 8px;
+ display: flex;
+ align-items: center;
+ justify-content: center;
+
+ .indicator-dot {
+ width: 6px;
+ height: 6px;
+ border-radius: 50%;
+ background: var(--td-brand-color);
+ animation: pulse-dot 1.8s ease-in-out infinite;
+ }
+
+ .indicator-ring {
+ position: absolute;
+ inset: 0;
+ border-radius: 50%;
+ border: 1.5px solid var(--td-brand-color);
+ opacity: 0;
+ animation: pulse-ring 1.8s ease-out infinite;
+ }
}
-
+
.thinking-text {
font-size: 12px;
color: var(--td-text-color-primary);
@@ -143,13 +168,13 @@ const safeProcessThinkContent = (content) => {
.done-status {
display: flex;
align-items: center;
-
+
.done-icon {
width: 16px;
height: 16px;
margin-right: 8px;
}
-
+
.done-text {
font-size: 12px;
color: var(--td-text-color-primary);
@@ -161,7 +186,7 @@ const safeProcessThinkContent = (content) => {
font-size: 14px;
padding: 0 2px 1px 2px;
color: var(--td-brand-color);
-
+
.toggle-icon {
transition: transform 0.2s;
}
@@ -170,7 +195,7 @@ const safeProcessThinkContent = (content) => {
.think-content {
border-top: 1px solid var(--td-bg-color-secondarycontainer);
-
+
.content-inner {
padding: 8px 14px;
font-size: 12px;
@@ -179,11 +204,11 @@ const safeProcessThinkContent = (content) => {
max-height: 200px;
overflow-y: auto;
word-break: break-word;
-
+
&::-webkit-scrollbar {
width: 4px;
}
-
+
&::-webkit-scrollbar-thumb {
background: rgba(0, 0, 0, 0.1);
border-radius: 2px;
@@ -191,4 +216,36 @@ const safeProcessThinkContent = (content) => {
}
}
}
+
+@keyframes pulse-dot {
+ 0%, 100% {
+ transform: scale(0.85);
+ opacity: 0.6;
+ }
+ 50% {
+ transform: scale(1.1);
+ opacity: 1;
+ }
+}
+
+@keyframes pulse-ring {
+ 0% {
+ transform: scale(0.5);
+ opacity: 0.6;
+ }
+ 100% {
+ transform: scale(1.2);
+ opacity: 0;
+ }
+}
+
+html[theme-mode="dark"] {
+ .deep-think {
+ .think-content .content-inner {
+ &::-webkit-scrollbar-thumb {
+ background: rgba(255, 255, 255, 0.15);
+ }
+ }
+ }
+}
</style>
diff --git a/frontend/src/views/chat/components/docInfo.vue b/frontend/src/views/chat/components/docInfo.vue
index 2a416176a..8b5695cf0 100644
--- a/frontend/src/views/chat/components/docInfo.vue
+++ b/frontend/src/views/chat/components/docInfo.vue
@@ -1,6 +1,6 @@
<template>
- <div class="refer">
- <div class="refer_header" @click="referBoxSwitch" v-if="session.knowledge_references && session.knowledge_references.length">
+ <div class="refer" v-if="session.knowledge_references && session.knowledge_references.length">
+ <div class="refer_header" @click="referBoxSwitch">
<div class="refer_title">
<img src="@/assets/img/ziliao.svg" :alt="$t('chat.referenceIconAlt')" />
<span>{{ headerText }}</span>
@@ -195,6 +195,7 @@ const getWebSearchDisplayText = (item) => {
width: 100%;
border-radius: 8px;
background-color: var(--td-bg-color-container);
+ border: .5px solid var(--td-component-stroke);
box-shadow: 0 2px 4px rgba(7, 192, 95, 0.08);
overflow: hidden;
box-sizing: border-box;
diff --git a/frontend/src/views/chat/components/tool-results/KnowledgeBaseList.vue b/frontend/src/views/chat/components/tool-results/KnowledgeBaseList.vue
index 7dca76ba2..921d2ce4b 100644
--- a/frontend/src/views/chat/components/tool-results/KnowledgeBaseList.vue
+++ b/frontend/src/views/chat/components/tool-results/KnowledgeBaseList.vue
@@ -54,7 +54,7 @@ const props = defineProps<{
.kb-card {
background: @card-bg;
- border: 1px solid @card-border;
+ border: .5px solid @card-border;
border-radius: @card-radius;
padding: 12px;
transition: all 0.2s ease;
diff --git a/frontend/src/views/chat/components/usermsg.vue b/frontend/src/views/chat/components/usermsg.vue
index 5f3f3a9a7..e932f7dc2 100644
--- a/frontend/src/views/chat/components/usermsg.vue
+++ b/frontend/src/views/chat/components/usermsg.vue
@@ -115,13 +115,20 @@ const props = defineProps({
gap: 4px;
flex: 1 0 0;
border-radius: 4px;
- background: var(--td-success-color);
+ background: #8CE97F;
margin-left: auto;
- color: var(--td-text-color-primary);
+ color: #000000e6;
font-size: 16px;
text-align: justify;
word-break: break-all;
max-width: 100%;
box-sizing: border-box;
}
+
+html[theme-mode="dark"] {
+ .user_msg {
+ background: var(--td-brand-color-3);
+ color: rgba(255, 255, 255, 0.9);
+ }
+}
</style>
diff --git a/frontend/src/views/knowledge/KnowledgeBaseList.vue b/frontend/src/views/knowledge/KnowledgeBaseList.vue
index 0d2630f70..be7ff9bad 100644
--- a/frontend/src/views/knowledge/KnowledgeBaseList.vue
+++ b/frontend/src/views/knowledge/KnowledgeBaseList.vue
@@ -1585,7 +1585,7 @@ const handleUploadFinishedEvent = (event: Event) => {
}
.kb-card {
- border: 1px solid var(--td-component-stroke);
+ border: .5px solid var(--td-component-stroke);
border-radius: 12px;
overflow: hidden;
box-sizing: border-box;
@@ -1832,7 +1832,7 @@ const handleUploadFinishedEvent = (event: Event) => {
justify-content: space-between;
margin-top: auto;
padding-top: 8px;
- border-top: 1px solid var(--td-component-stroke);
+ border-top: .5px solid var(--td-component-stroke);
}
.bottom-left {
diff --git a/frontend/src/views/organization/OrganizationList.vue b/frontend/src/views/organization/OrganizationList.vue
index 09f53f7c0..3a656e43f 100644
--- a/frontend/src/views/organization/OrganizationList.vue
+++ b/frontend/src/views/organization/OrganizationList.vue
@@ -1412,7 +1412,7 @@ onUnmounted(() => {
/* 与知识库列表卡片统一尺寸:160px 高、18px 20px 内边距、12px 圆角 */
.org-card {
- border: 1px solid var(--td-component-stroke);
+ border: .5px solid var(--td-component-stroke);
border-radius: 12px;
overflow: hidden;
box-sizing: border-box;
@@ -1626,7 +1626,7 @@ onUnmounted(() => {
justify-content: space-between;
margin-top: auto;
padding-top: 8px;
- border-top: 1px solid var(--td-component-stroke);
+ border-top: .5px solid var(--td-component-stroke);
}
.bottom-left {