Skip to content

Commit 165efaa

Browse files
feat: layout
1 parent 345e588 commit 165efaa

File tree

8 files changed

+325
-2
lines changed

8 files changed

+325
-2
lines changed
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
·
2+
<template>
3+
<div class="app-top-bar-container border-b flex-center">
4+
<div class="logo">
5+
<LogoFull />
6+
</div>
7+
<div class="flex-between w-full">
8+
<div><el-divider direction="vertical" />{{ $t('views.system.title') }}</div>
9+
<TopAbout></TopAbout>
10+
</div>
11+
<Avatar></Avatar>
12+
</div>
13+
</template>
14+
<script setup lang="ts">
15+
import TopMenu from './top-menu/index.vue'
16+
import Avatar from './avatar/index.vue'
17+
import TopAbout from './top-about/index.vue'
18+
import { useRouter } from 'vue-router'
19+
20+
const router = useRouter()
21+
</script>
22+
<style lang="scss" scoped>
23+
.app-top-bar-container {
24+
height: var(--app-header-height);
25+
box-sizing: border-box;
26+
padding: var(--app-header-padding);
27+
}
28+
</style>
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
<template>
2+
<div class="app-layout">
3+
<div class="app-header">
4+
<SystemHeader />
5+
</div>
6+
<div class="app-main">
7+
<layout-container>
8+
<template #left>
9+
<Sidebar />
10+
</template>
11+
<AppMain />
12+
</layout-container>
13+
</div>
14+
</div>
15+
</template>
16+
<script setup lang="ts">
17+
import SystemHeader from '@/layout/layout-header/SystemHeader.vue'
18+
import Sidebar from '@/layout/components/sidebar/index.vue'
19+
import AppMain from '@/layout/app-main/index.vue'
20+
import useStore from '@/stores'
21+
const { user } = useStore()
22+
</script>
23+
<style lang="scss" scoped>
24+
@use './index.scss';
25+
</style>

ui/src/locales/lang/zh-CN/views/index.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,12 @@ import model from './model'
33
import knowledge from './knowledge'
44
import tool from './tool'
55
import document from './document'
6+
import system from './system'
7+
import userManage from './user-manage'
68
// import notFound from './404'
79
// import application from './application'
810
// import applicationOverview from './application-overview'
911

10-
// import system from './system'
1112
// import user from './user'
1213
// import team from './team'
1314

@@ -23,10 +24,12 @@ export default {
2324
knowledge,
2425
tool,
2526
document,
27+
system,
28+
userManage,
2629
// notFound,
2730
// application,
2831
// applicationOverview,
29-
// system,
32+
3033
// user,
3134
// team,
3235
// paragraph,
Lines changed: 152 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,152 @@
1+
export default {
2+
title: '系统管理',
3+
subTitle: '系统设置',
4+
test: '测试连接',
5+
testSuccess: '测试连接成功',
6+
testFailed: '测试连接失败',
7+
password: '密码',
8+
authentication: {
9+
title: '登录认证',
10+
ldap: {
11+
title: 'LDAP',
12+
address: 'LDAP 地址',
13+
serverPlaceholder: '请输入LDAP 地址',
14+
bindDN: '绑定DN',
15+
bindDNPlaceholder: '请输入绑定 DN',
16+
ou: '用户OU',
17+
ouPlaceholder: '请输入用户 OU',
18+
ldap_filter: '用户过滤器',
19+
ldap_filterPlaceholder: '请输入用户过滤器',
20+
ldap_mapping: 'LDAP 属性映射',
21+
ldap_mappingPlaceholder: '请输入 LDAP 属性映射',
22+
enableAuthentication: '启用 LDAP 认证'
23+
},
24+
cas: {
25+
title: 'CAS',
26+
ldpUri: 'ldpUri',
27+
ldpUriPlaceholder: '请输入ldpUri',
28+
validateUrl: '验证地址',
29+
validateUrlPlaceholder: '请输入验证地址',
30+
redirectUrl: '回调地址',
31+
redirectUrlPlaceholder: '请输入回调地址',
32+
enableAuthentication: '启用 CAS 认证'
33+
},
34+
oidc: {
35+
title: 'OIDC',
36+
authEndpoint: '授权端地址',
37+
authEndpointPlaceholder: '请输入授权端地址',
38+
tokenEndpoint: 'Token端地址',
39+
tokenEndpointPlaceholder: '请输入 Token 端地址',
40+
userInfoEndpoint: '用户信息端地址',
41+
userInfoEndpointPlaceholder: '请输入用户信息端地址',
42+
scopePlaceholder: '请输入连接范围',
43+
clientId: '客户端 ID',
44+
clientIdPlaceholder: '请输入客户端 ID',
45+
clientSecret: '客户端密钥',
46+
clientSecretPlaceholder: '请输入客户端密钥',
47+
logoutEndpoint: '注销端地址',
48+
logoutEndpointPlaceholder: '请输入注销端地址',
49+
redirectUrl: '回调地址',
50+
redirectUrlPlaceholder: '请输入回调地址',
51+
enableAuthentication: '启用 OIDC 认证'
52+
},
53+
54+
oauth2: {
55+
title: 'OAuth2',
56+
authEndpoint: '授权端地址',
57+
authEndpointPlaceholder: '请输入授权端地址',
58+
tokenEndpoint: 'Token 端地址',
59+
tokenEndpointPlaceholder: '请输入 Token 端地址',
60+
userInfoEndpoint: '用户信息端地址',
61+
userInfoEndpointPlaceholder: '请输入用户信息端地址',
62+
scope: '连接范围',
63+
scopePlaceholder: '请输入连接范围',
64+
clientId: '客户端 ID',
65+
clientIdPlaceholder: '请输入客户端 ID',
66+
clientSecret: '客户端密钥',
67+
clientSecretPlaceholder: '请输入客户端密钥',
68+
redirectUrl: '回调地址',
69+
redirectUrlPlaceholder: '请输入回调地址',
70+
filedMapping: '字段映射',
71+
filedMappingPlaceholder: '请输入字段映射',
72+
enableAuthentication: '启用 OAuth2 认证'
73+
},
74+
scanTheQRCode: {
75+
title: '扫码登录',
76+
wecom: '企业微信',
77+
dingtalk: '钉钉',
78+
lark: '飞书',
79+
effective: '有效',
80+
alreadyTurnedOn: '已开启',
81+
notEnabled: '未开启',
82+
validate: '校验',
83+
validateSuccess: '校验成功',
84+
validateFailed: '校验失败',
85+
validateFailedTip: '请填写所有必填项并确保格式正确',
86+
appKeyPlaceholder: '请输入 App Key',
87+
appSecretPlaceholder: '请输入 App Secret',
88+
corpIdPlaceholder: '请输入 Corp Id',
89+
agentIdPlaceholder: '请输入 Agent Id',
90+
callbackWarning: '请输入有效的 URL 地址',
91+
larkQrCode: '飞书扫码登录',
92+
dingtalkQrCode: '钉钉扫码登录',
93+
setting: '设置',
94+
access: '接入'
95+
}
96+
},
97+
theme: {
98+
title: '外观设置',
99+
platformDisplayTheme: '平台显示主题',
100+
customTheme: '自定义主题',
101+
platformLoginSettings: '平台登录设置',
102+
custom: '自定义',
103+
pagePreview: '页面预览',
104+
default: '默认',
105+
restoreDefaults: '恢复默认',
106+
orange: '活力橙',
107+
green: '松石绿',
108+
purple: '神秘紫',
109+
red: '胭脂红',
110+
loginBackground: '登录背景图',
111+
loginLogo: '登录 Logo',
112+
websiteLogo: '网站 Logo',
113+
replacePicture: '替换图片',
114+
websiteLogoTip: '顶部网站显示的 Logo,建议尺寸 48*48,支持 JPG、PNG、GIF,大小不超过 10MB',
115+
loginLogoTip: '登录页面右侧 Logo,建议尺寸 204*52,支持 JPG、PNG、GIF,大小不超过 10 MB',
116+
loginBackgroundTip:
117+
'左侧背景图,矢量图建议尺寸 576*900,位图建议尺寸 1152*1800;支持 JPG、PNG、GIF,大小不超过 10 MB',
118+
websiteName: '网站名称',
119+
websiteNamePlaceholder: '请输入网站名称',
120+
websiteNameTip: '显示在网页 Tab 的平台名称',
121+
websiteSlogan: '欢迎语',
122+
websiteSloganPlaceholder: '请输入欢迎语',
123+
websiteSloganTip: '产品 Logo 下的欢迎语',
124+
defaultSlogan: '欢迎使用 MaxKB 开源 AI 助手',
125+
logoDefaultTip: '默认为 MaxKB 登录界面,支持自定义设置',
126+
defaultTip: '默认为 MaxKB 平台界面,支持自定义设置',
127+
platformSetting: '平台设置',
128+
showUserManual: '显示用户手册',
129+
showForum: '显示论坛求助',
130+
showProject: '显示项目地址',
131+
urlPlaceholder: '请输入 URL 地址',
132+
abandonUpdate: '放弃更新',
133+
saveAndApply: '保存并应用',
134+
fileMessageError: '文件大小超过 10M',
135+
saveSuccess: '外观设置成功'
136+
},
137+
email: {
138+
title: '邮箱设置',
139+
smtpHost: 'SMTP Host',
140+
smtpHostPlaceholder: '请输入 SMTP Host',
141+
smtpPort: 'SMTP Port',
142+
smtpPortPlaceholder: '请输入 SMTP Port',
143+
smtpUser: 'SMTP 账户',
144+
smtpUserPlaceholder: '请输入 SMTP 账户',
145+
sendEmail: '发件人邮箱',
146+
sendEmailPlaceholder: '请输入发件人邮箱',
147+
smtpPassword: '发件人密码',
148+
smtpPasswordPlaceholder: '请输入发件人密码',
149+
enableSSL: '启用 SSL(如果 SMTP 端口是 465,通常需要启用 SSL)',
150+
enableTLS: '启用 TLS(如果 SMTP 端口是 587,通常需要启用 TLS)'
151+
}
152+
}
Lines changed: 72 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,72 @@
1+
export default {
2+
title: '用户管理',
3+
createUser: '创建用户',
4+
editUser: '编辑用户',
5+
setting: {
6+
updatePwd: '修改用户密码'
7+
},
8+
tip: {
9+
professionalMessage: '社区版最多支持 2 个用户,如需拥有更多用户,请升级为专业版。',
10+
updatePwdSuccess: '修改用户密码成功'
11+
},
12+
delete: {
13+
confirmTitle: '是否删除用户:',
14+
confirmMessage: '删除用户,该用户创建的资源(应用、知识库、模型)都会删除,请谨慎操作。'
15+
},
16+
disabled: {
17+
confirmTitle: '是否禁用函数:',
18+
confirmMessage: '禁用后,引用了该函数的应用提问时会报错 ,请谨慎操作。'
19+
},
20+
userForm: {
21+
form: {
22+
username: {
23+
label: '用户名',
24+
placeholder: '请输入用户名',
25+
requiredMessage: '请输入用户名',
26+
lengthMessage: '长度在 6 到 20 个字符'
27+
},
28+
captcha: {
29+
label: '验证码',
30+
placeholder: '请输入验证码'
31+
},
32+
nick_name: {
33+
label: '姓名',
34+
placeholder: '请输入姓名'
35+
},
36+
email: {
37+
label: '邮箱',
38+
placeholder: '请输入邮箱',
39+
requiredMessage: '请输入邮箱',
40+
validatorEmail: '请输入有效邮箱格式!'
41+
},
42+
phone: {
43+
label: '手机号',
44+
placeholder: '请输入手机号'
45+
},
46+
password: {
47+
label: '登录密码',
48+
placeholder: '请输入密码',
49+
requiredMessage: '请输入密码',
50+
lengthMessage: '长度在 6 到 20 个字符'
51+
},
52+
new_password: {
53+
label: '新密码',
54+
placeholder: '请输入新密码',
55+
requiredMessage: '请输入新密码'
56+
},
57+
re_password: {
58+
label: '确认密码',
59+
placeholder: '请输入确认密码',
60+
requiredMessage: '请输入确认密码',
61+
validatorMessage: '密码不一致'
62+
}
63+
}
64+
},
65+
source: {
66+
label: '用户类型',
67+
local: '系统用户',
68+
wecom: '企业微信',
69+
lark: '飞书',
70+
dingtalk: '钉钉'
71+
}
72+
}

ui/src/router/modules/system.ts

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
import { Role, ComplexPermission } from '@/utils/permission/type'
2+
const systemRouter = {
3+
path: '/system',
4+
name: 'system',
5+
meta: { title: 'views.system.title', permission: 'USER_MANAGEMENT:READ' },
6+
hidden: true,
7+
component: () => import('@/layout/layout-template/SystemMainLayout.vue'),
8+
children: [
9+
{
10+
path: '/system/user',
11+
name: 'user',
12+
meta: {
13+
icon: 'User',
14+
iconActive: 'UserFilled',
15+
title: 'views.userManage.title',
16+
activeMenu: '/system',
17+
parentPath: '/system',
18+
parentName: 'system',
19+
},
20+
component: () => import('@/views/user-manage/index.vue'),
21+
},
22+
],
23+
}
24+
25+
export default systemRouter
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<template>111</template>
2+
3+
<script lang="ts" setup>
4+
import { onMounted, ref, reactive, watch } from 'vue'
5+
6+
onMounted(() => {})
7+
</script>
8+
9+
<style lang="scss" scoped></style>

ui/src/views/user-manage/index.vue

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
<template>111</template>
2+
3+
<script lang="ts" setup>
4+
import { onMounted, ref, reactive, watch } from 'vue'
5+
6+
onMounted(() => {})
7+
</script>
8+
9+
<style lang="scss" scoped></style>

0 commit comments

Comments
 (0)