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:
@@ -13,7 +13,7 @@
|
||||
<!-- 模型来源 -->
|
||||
<div class="form-item">
|
||||
<label class="form-label required">{{ $t('model.editor.sourceLabel') }}</label>
|
||||
<t-radio-group v-model="formData.source">
|
||||
<t-radio-group v-model="formData.source" class="source-select">
|
||||
<t-radio-button
|
||||
value="local"
|
||||
:disabled="ollamaServiceStatus === false || modelType === 'rerank'"
|
||||
@@ -36,10 +36,10 @@
|
||||
<t-button
|
||||
variant="text"
|
||||
size="small"
|
||||
theme="primary"
|
||||
@click="goToOllamaSettings"
|
||||
class="tip-link"
|
||||
>
|
||||
<template #icon><t-icon name="jump" /></template>
|
||||
{{ $t('model.editor.goToOllamaSettings') }}
|
||||
</t-button>
|
||||
</div>
|
||||
@@ -168,10 +168,10 @@
|
||||
<t-button
|
||||
variant="text"
|
||||
size="small"
|
||||
theme="primary"
|
||||
@click="goToWeKnoraCloudSettings"
|
||||
style="padding: 0; height: auto;"
|
||||
>
|
||||
<template #icon><t-icon name="jump" /></template>
|
||||
{{ $t('settings.weknoraCloud.goToSettings') }}
|
||||
</t-button>
|
||||
</div>
|
||||
@@ -298,7 +298,7 @@
|
||||
<!-- Ollama 本地模型:自动检测维度按钮 -->
|
||||
<t-button
|
||||
v-if="formData.source === 'local' && formData.modelName"
|
||||
variant="outline"
|
||||
variant="text"
|
||||
size="small"
|
||||
:loading="checking"
|
||||
@click="checkOllamaDimension"
|
||||
@@ -1275,7 +1275,7 @@ const handleCancel = () => {
|
||||
|
||||
// 表单项样式
|
||||
.form-item {
|
||||
margin-bottom: 20px;
|
||||
margin-bottom: 16px;
|
||||
|
||||
&:last-child {
|
||||
margin-bottom: 0;
|
||||
@@ -1284,8 +1284,8 @@ const handleCancel = () => {
|
||||
|
||||
.form-label {
|
||||
display: block;
|
||||
margin-bottom: 8px;
|
||||
font-size: 14px;
|
||||
margin-bottom: 6px;
|
||||
font-size: 13px;
|
||||
font-weight: 500;
|
||||
color: var(--td-text-color-primary);
|
||||
|
||||
@@ -1293,7 +1293,18 @@ const handleCancel = () => {
|
||||
content: '*';
|
||||
color: var(--td-error-color);
|
||||
margin-left: 4px;
|
||||
font-weight: 600;
|
||||
font-weight: 500;
|
||||
}
|
||||
}
|
||||
|
||||
// 模型来源分段:两个选项等分宽度
|
||||
.source-select {
|
||||
display: flex;
|
||||
width: 100%;
|
||||
|
||||
:deep(.t-radio-button) {
|
||||
flex: 1;
|
||||
text-align: center;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -1483,25 +1494,10 @@ const handleCancel = () => {
|
||||
.t-select {
|
||||
flex: 1;
|
||||
}
|
||||
|
||||
:deep(.t-button) {
|
||||
height: 32px;
|
||||
font-size: 13px;
|
||||
border-radius: 6px;
|
||||
flex-shrink: 0;
|
||||
}
|
||||
}
|
||||
|
||||
.refresh-btn {
|
||||
margin-top: 0;
|
||||
font-size: 13px;
|
||||
color: var(--td-text-color-secondary);
|
||||
flex-shrink: 0;
|
||||
|
||||
&:hover {
|
||||
color: var(--td-brand-color);
|
||||
background: rgba(7, 192, 95, 0.04);
|
||||
}
|
||||
}
|
||||
|
||||
@keyframes spin {
|
||||
@@ -1522,7 +1518,6 @@ const handleCancel = () => {
|
||||
|
||||
.dimension-check-btn {
|
||||
flex-shrink: 0;
|
||||
font-size: 12px;
|
||||
}
|
||||
|
||||
.dimension-hint {
|
||||
|
||||
Reference in New Issue
Block a user