Skip to content

Commit 4857de1

Browse files
committed
feat(ui): 重构登录页和主页UI设计,优化品牌信息配置
- 将登录背景图片移至public目录并更新引用路径 - 完全重构登录页面布局,分为图片区和表单区 - 优化主页布局,添加导航链接和底部版权信息 - 更新品牌信息配置,移除short_name字段 - 调整多个组件的样式和间距 - 更新README添加品牌配置说明
1 parent 24f3d03 commit 4857de1

File tree

14 files changed

+395
-151
lines changed

14 files changed

+395
-151
lines changed

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -220,6 +220,13 @@ docker compose up paddlex --build
220220
| 8081 | vLLM | 本地推理(可选)|
221221

222222

223+
### 品牌信息配置
224+
225+
在主页和登录页面的很多信息,比如 Logo,组织名称,版权信息等,都可以复制 [src/static/info.template.yaml](src/static/info.template.yaml),并新建一个 `src/static/info.local.yaml`,在这个文件中配置。在项目启动时,会加载这个文件,然后根据文件中的配置,渲染到前端页面中。如果 `src/static/info.local.yaml` 不存在,会使用 [src/static/info.template.yaml](src/static/info.template.yaml) 中的配置。
226+
227+
系统的配色方面,主要保存在 [web/src/assets/css/base.css](web/src/assets/css/base.css) 中。只要替换其中的 `--main-*` 相关的变量,就可以改变系统的配色。
228+
229+
223230
## ❓ 常见问题
224231

225232
暂无

server/routers/system_router.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ def load_info_config():
8787
# 检查文件是否存在
8888
if not config_path.exists():
8989
logger.debug(f"The config file {config_path} does not exist, using default config")
90-
return get_default_info_config()
90+
config_path = Path("src/static/info.template.yaml")
9191

9292
# 读取配置文件
9393
with open(config_path, encoding='utf-8') as file:
@@ -104,11 +104,11 @@ def get_default_info_config():
104104
return {
105105
"organization": {
106106
"name": "江南语析",
107-
"short_name": "语析",
108107
"logo": "/favicon.svg",
109108
"avatar": "/avatar.jpg"
110109
},
111110
"branding": {
111+
"name": "Yuxi-Know",
112112
"title": "Yuxi-Know",
113113
"subtitle": "大模型驱动的知识库管理工具",
114114
"description": "结合知识库与知识图谱,提供更准确、更全面的回答"
@@ -119,7 +119,7 @@ def get_default_info_config():
119119
"🤖 多模型支持"
120120
],
121121
"footer": {
122-
"copyright": "© 江南语析 2025 [WIP] v0.12.138"
122+
"copyright": "© 江南语析 2025 [WIP] v0.2.0"
123123
}
124124
}
125125

src/static/info.template.yaml

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,26 @@
11
# 单位信息配置文件
22
# 用于配置网站的基本信息、品牌信息等
3-
# 修改后需要重启服务生效
43

54
# 组织信息
65
organization:
76
name: "江南语析" # 完整组织名称
8-
short_name: "语析" # 简短名称
9-
logo: "/favicon.svg" # Logo文件路径
10-
avatar: "/avatar.jpg" # 头像文件路径
7+
logo: "/favicon.svg" # Logo文件路径(放在 web/public 目录下)
8+
avatar: "/avatar.jpg" # 头像文件路径(放在 web/public 目录下)
9+
login_bg: "/login-bg.jpg" # 登录背景图片路径(放在 web/public 目录下)
1110

12-
# 品牌信息
11+
# 项目信息
1312
branding:
14-
title: "Yuxi-Know" # 系统标题
13+
name: "Yuxi-Know"
14+
title: "Yuxi-Know: 更智能的知识库管理工具" # 系统标题
1515
subtitle: "大模型驱动的知识库管理工具" # 副标题
1616
description: "结合知识库与知识图谱,提供更准确、更全面的回答" # 描述信息
1717

1818
# 功能特性
1919
features:
2020
- "📚 灵活知识库"
2121
- "🕸️ 知识图谱集成"
22-
- "🤖 多模型支持"
22+
- "🤖 权限隔离"
2323

2424
# 页脚信息
2525
footer:
26-
copyright: "© 江南语析 2025 [WIP] v0.12.138"
26+
copyright: "© 江南语析 2025 v0.2.0"

web/public/login-bg.jpg

1.15 MB
Loading

web/src/assets/css/main.css

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
@import './shorts.css';
44

55
:root {
6-
--header-height: 60px;
6+
--header-height: 45px;
77
--min-width: 450px;
88
}
99

web/src/assets/pics/login_bg.jpg

-1.62 MB
Binary file not shown.

web/src/components/AgentChatComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1381,7 +1381,7 @@ const mergeMessageChunk = (chunks) => {
13811381
display: flex;
13821382
justify-content: space-between;
13831383
align-items: center;
1384-
padding: 1rem;
1384+
padding: 1rem 8px;
13851385
border-bottom: 1px solid var(--main-20);
13861386
13871387
.header__left, .header__right, .header__center {

web/src/components/ChatSidebarComponent.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -238,7 +238,7 @@ const toggleCollapse = () => {
238238
239239
.conversation-list-top {
240240
padding: 8px 12px;
241-
border-bottom: 1px solid var(--gray-200);
241+
// border-bottom: 1px solid var(--gray-200);
242242
243243
.new-chat-btn {
244244
width: 100%;

web/src/layouts/AppLayout.vue

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -113,7 +113,6 @@ const mainList = [{
113113
<div class="logo circle">
114114
<router-link to="/">
115115
<img :src="infoStore.organization.avatar">
116-
<span class="logo-text">{{ infoStore.organization.short_name }}</span>
117116
</router-link>
118117
</div>
119118
<div class="nav">
@@ -278,18 +277,14 @@ div.header, #app-router-view {
278277
.logo {
279278
width: 40px;
280279
height: 40px;
281-
margin: 14px 0 14px 0;
280+
margin: 8px 0 14px 0;
282281
283282
img {
284283
width: 100%;
285284
height: 100%;
286285
border-radius: 4px; // 50% for circle
287286
}
288287
289-
.logo-text {
290-
display: none;
291-
}
292-
293288
& > a {
294289
text-decoration: none;
295290
font-size: 24px;
@@ -464,14 +459,6 @@ div.header, #app-router-view {
464459
margin-right: 8px;
465460
}
466461
467-
.logo-text {
468-
display: block;
469-
font-size: 16px;
470-
font-weight: 600;
471-
letter-spacing: 0.5px;
472-
color: var(--main-color);
473-
white-space: nowrap;
474-
}
475462
}
476463
477464
.nav {

web/src/stores/info.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,13 +11,13 @@ export const useInfoStore = defineStore('info', () => {
1111
// 计算属性 - 组织信息
1212
const organization = computed(() => infoConfig.value.organization || {
1313
name: "江南语析",
14-
short_name: "语析",
1514
logo: "/favicon.svg",
1615
avatar: "/avatar.jpg"
1716
})
1817

1918
// 计算属性 - 品牌信息
2019
const branding = computed(() => infoConfig.value.branding || {
20+
name: "Yuxi-Know",
2121
title: "Yuxi-Know",
2222
subtitle: "大模型驱动的知识库管理工具",
2323
description: "结合知识库与知识图谱,提供更准确、更全面的回答"

0 commit comments

Comments
 (0)