Skip to content

Commit 41f0757

Browse files
committed
fix: bug fix
1 parent 4d71bfb commit 41f0757

File tree

3 files changed

+24
-0
lines changed

3 files changed

+24
-0
lines changed

frontend/src/i18n/en.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"AI Model Configuration": "AI Model Configuration"
77
},
88
"common": {
9+
"no_model_yet": "No model yet",
910
"intelligent_questioning_platform": "Welcome to the SQLBot Intelligent Questioning Platform",
1011
"login": "Login",
1112
"login_": "Login",

frontend/src/i18n/zh-CN.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
"AI Model Configuration": "模型配置"
77
},
88
"common": {
9+
"no_model_yet": "暂无模型",
910
"intelligent_questioning_platform": "欢迎使用 SQLBot 智能问数平台",
1011
"login": "账号登录",
1112
"login_": "登录",

frontend/src/views/system/model/Model.vue

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,22 @@ const submit = (item: any) => {
367367
</el-col>
368368
</el-row>
369369
</div>
370+
<template v-if="!keywords && !modelListWithSearch.length && !searchLoading">
371+
<EmptyBackground
372+
class="datasource-yet"
373+
:description="$t('common.no_model_yet')"
374+
img-type="noneWhite"
375+
/>
376+
377+
<div style="text-align: center; margin-top: -10px">
378+
<el-button type="primary" @click="handleAddModel">
379+
<template #icon>
380+
<icon_add_outlined></icon_add_outlined>
381+
</template>
382+
{{ t('model.add_model') }}
383+
</el-button>
384+
</div>
385+
</template>
370386
<el-drawer
371387
v-model="modelConfigvVisible"
372388
:close-on-click-modal="false"
@@ -424,6 +440,12 @@ const submit = (item: any) => {
424440
.model-config {
425441
height: calc(100% - 16px);
426442
padding: 16px 0 16px 0;
443+
444+
.datasource-yet {
445+
padding-bottom: 0;
446+
height: auto;
447+
padding-top: 200px;
448+
}
427449
.model-methods {
428450
display: flex;
429451
align-items: center;

0 commit comments

Comments
 (0)