在网页添加后端异常的提示
This commit is contained in:
parent
5c9d4b21cf
commit
07b1763e99
@ -18,6 +18,7 @@ import {
|
||||
ProjectOutlined,
|
||||
StarFilled,
|
||||
StarOutlined,
|
||||
ExclamationCircleOutlined,
|
||||
} from '@ant-design/icons-vue'
|
||||
import { themeConfig } from '@/assets/theme'
|
||||
import { useConfigStore } from '@/stores/config'
|
||||
@ -101,6 +102,13 @@ console.log(route)
|
||||
<component class="icon" :is="route.path.startsWith('/tools') ? StarFilled: StarOutlined" />
|
||||
<span class="text">工具</span>
|
||||
</RouterLink>
|
||||
<a-tooltip placement="right">
|
||||
<template #title>后端疑似没有正常启动,请刷新一下或者检查 docker logs api-dev</template>
|
||||
<div class="nav-item warning" v-if="!configStore.config._config_items">
|
||||
<component class="icon" :is="ExclamationCircleOutlined" />
|
||||
<span class="text">警告</span>
|
||||
</div>
|
||||
</a-tooltip>
|
||||
</div>
|
||||
<div class="fill" style="flex-grow: 1;"></div>
|
||||
<div class="github nav-item">
|
||||
@ -182,7 +190,7 @@ div.header, #app-router-view {
|
||||
img {
|
||||
width: 100%;
|
||||
height: 100%;
|
||||
border-radius: 4px; // 50% for circle
|
||||
border-radius: 4px; // 50% for circle
|
||||
}
|
||||
|
||||
.logo-text {
|
||||
@ -235,6 +243,10 @@ div.header, #app-router-view {
|
||||
border: 1px solid white;
|
||||
}
|
||||
|
||||
&.warning {
|
||||
color: red;
|
||||
}
|
||||
|
||||
&:hover {
|
||||
background-color: rgba(255, 255, 255, 0.8);
|
||||
backdrop-filter: blur(10px);
|
||||
|
||||
@ -80,7 +80,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting" v-if="state.section == 'model'">
|
||||
<div class="setting" v-if="state.section === 'model'">
|
||||
<h3>模型配置</h3>
|
||||
<p>请在 <code>src/.env</code> 文件中配置对应的 APIKEY</p>
|
||||
<div class="model-provider-card">
|
||||
@ -169,7 +169,7 @@
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
<div class="setting" v-if="state.section =='path'">
|
||||
<div class="setting" v-if="state.section ==='path'">
|
||||
<p>暂无配置</p>
|
||||
</div>
|
||||
</div>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user