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:
@@ -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;
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user