fix(frontend): polish model settings UI and fix disabled brand color

- Fix global `--td-brand-color-disabled` to use correct muted green instead of bright green
- Unify `variant="text"` buttons (refresh, download, check dimension) in model settings to inherit standard TDesign styles
- Adjust WeKnora Cloud credential status layout and change reconfigure button to outline
- Fix font size of external doc links in model settings hint blocks
- Increase font weight of KB chunking debug trigger for better visibility
This commit is contained in:
wizardchen
2026-05-07 21:48:55 +08:00
committed by lyingbug
parent c77cef5a69
commit 6019c4b661
6 changed files with 59 additions and 47 deletions
@@ -368,6 +368,7 @@ const tierTheme = (tier: StrategyTier) => {
--td-bg-color-container-hover: transparent;
padding-left: 0;
padding-right: 0;
font-weight: 600;
&:hover,
&:focus,
@@ -475,6 +475,10 @@ onMounted(() => {
color: var(--td-text-color-secondary);
}
.builtin-models-hint .doc-link {
font-size: 13px;
}
.section-header__top {
display: flex;
align-items: flex-start;
+11 -3
View File
@@ -48,7 +48,7 @@
</t-tag>
<t-button
size="small"
variant="outline"
variant="text"
:loading="testing"
@click="testConnection"
>
@@ -109,13 +109,16 @@
:placeholder="$t('ollamaSettings.download.placeholder')"
style="flex: 1;"
/>
<t-button
theme="primary"
<t-button
variant="base"
theme="default"
size="small"
class="download-btn"
:loading="downloading"
:disabled="!downloadModelName.trim()"
@click="downloadModel"
>
<template #icon><t-icon name="download" /></template>
{{ $t('ollamaSettings.download.download') }}
</t-button>
</div>
@@ -557,6 +560,11 @@ onMounted(async () => {
display: flex;
gap: 8px;
align-items: center;
.download-btn {
flex-shrink: 0;
height: 32px;
}
}
.download-progress {
@@ -2,16 +2,18 @@
<div class="weknoracloud-settings">
<div class="section-header">
<h2>{{ $t('settings.weknoraCloud.title') }}</h2>
<p class="section-description">{{ $t('settings.weknoraCloud.description') }}</p>
<a
class="doc-link"
href="https://developers.weixin.qq.com/doc/aispeech/knowledge/atomic_capability/atomic_interface.html"
target="_blank"
rel="noopener noreferrer"
>
{{ $t('settings.weknoraCloud.viewDocs') }}
<t-icon name="link" class="link-icon" />
</a>
<p class="section-description">
{{ $t('settings.weknoraCloud.description') }}
<a
class="doc-link"
href="https://developers.weixin.qq.com/doc/aispeech/knowledge/atomic_capability/atomic_interface.html"
target="_blank"
rel="noopener noreferrer"
>
{{ $t('settings.weknoraCloud.viewDocs') }}
<t-icon name="link" class="link-icon" />
</a>
</p>
</div>
<!-- 未配置 -->
@@ -31,15 +33,16 @@
<!-- 已配置正常 -->
<div v-else-if="credentialState === 'configured'" class="credential-status success">
<t-icon name="check-circle" style="font-size: 16px; color: var(--td-success-color); flex-shrink: 0;" />
<t-icon name="check-circle" style="font-size: 16px; color: var(--td-brand-color); flex-shrink: 0;" />
<span class="status-text">{{ $t('settings.weknoraCloud.configured') }}</span>
<t-button
v-if="!formExpanded"
variant="text"
variant="outline"
theme="default"
size="small"
theme="primary"
@click="formExpanded = true"
>
<template #icon><t-icon name="edit" /></template>
{{ $t('settings.weknoraCloud.reconfigure') }}
</t-button>
</div>
@@ -224,9 +227,10 @@ onMounted(() => {
}
&.success {
background: var(--td-success-color-light);
border: 1px solid var(--td-success-color-focus);
color: var(--td-success-color);
padding: 0;
background: transparent;
border: none;
color: var(--td-text-color-secondary);
}
.status-text {