Skip to content

Commit 7ae81e1

Browse files
committed
feat(appearance): appearance set
1 parent 244e88f commit 7ae81e1

File tree

28 files changed

+304
-186
lines changed

28 files changed

+304
-186
lines changed

frontend/src/components/about/index.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ defineExpose({
202202
.color-overlay {
203203
border-top-left-radius: 6px;
204204
border-top-right-radius: 6px;
205-
background: #1cba901a;
205+
background: var(--ed-color-primary-1a, #1cba901a);
206206
border: 1px solid #dee0e3;
207207
border-bottom: 0;
208208
height: 180px;

frontend/src/components/layout/Menu.vue

Lines changed: 19 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import { ElMenu } from 'element-plus-secondary'
44
import { useRoute, useRouter } from 'vue-router'
55
import MenuItem from './MenuItem.vue'
66
import { useUserStore } from '@/stores/user'
7+
import { routes } from '@/router'
78
const userStore = useUserStore()
89
const router = useRouter()
910
defineProps({
@@ -21,9 +22,25 @@ const showSysmenu = computed(() => {
2122
return route.path.includes('/system')
2223
})
2324
25+
const formatRoute = (arr: any, parentPath = '') => {
26+
return arr.map((element: any) => {
27+
let children: any = []
28+
const path = `${parentPath ? parentPath + '/' : ''}${element.path}`
29+
if (element.children?.length) {
30+
children = formatRoute(element.children, path)
31+
}
32+
return {
33+
...element,
34+
path,
35+
children,
36+
}
37+
})
38+
}
39+
2440
const routerList = computed(() => {
2541
if (showSysmenu.value) {
26-
return router.getRoutes().filter((route) => route.path.includes('/system') && !route.redirect)
42+
const [sysRouter] = formatRoute(routes.filter((route) => route.path.includes('/system')))
43+
return sysRouter.children
2744
}
2845
const list = router.getRoutes().filter((route) => {
2946
return (
@@ -71,7 +88,7 @@ const routerList = computed(() => {
7188
7289
.ed-sub-menu.is-active {
7390
.ed-sub-menu__title {
74-
color: #1cba90 !important;
91+
color: var(--ed-color-primary) !important;
7592
}
7693
}
7794

frontend/src/components/layout/Person.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ const logout = () => {
118118
<icon_translate_outlined></icon_translate_outlined>
119119
</el-icon>
120120
<div class="datasource-name">{{ $t('common.language') }}</div>
121-
<el-icon style="transform: scale(1.33)" class="right" size="16">
121+
<el-icon class="right" size="16">
122122
<icon_right_outlined></icon_right_outlined>
123123
</el-icon>
124124
</div>

frontend/src/i18n/en.json

Lines changed: 32 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -567,5 +567,36 @@
567567
"license": {
568568
"error_tips": "Do you want to refresh the page?",
569569
"offline_tips": "The service has been offline, please contact the administrator to restart the service!"
570+
},
571+
"system": {
572+
"system_settings": "System Settings",
573+
"appearance_settings": "Appearance Settings",
574+
"platform_display_theme": "Platform Display Theme",
575+
"default_turquoise": "Default (Turquoise)",
576+
"tech_blue": "Tech Blue",
577+
"custom": "Custom",
578+
"platform_login_settings": "Platform Login Settings",
579+
"page_preview": "Page Preview",
580+
"restore_default": "Restore Default",
581+
"website_logo": "Website Logo",
582+
"tab": "Tab",
583+
"replace_image": "Replace Image",
584+
"larger_than_200kb": "Logo displayed at the top of the website: Recommended size: 48 x 48 pixels, supports JPG, PNG, and SVG, and no larger than 200KB",
585+
"login_logo": "Login Logo",
586+
"larger_than_200kb_de": "Logo on the right side of the login page: Recommended size: 204 x 52 pixels, supports JPG, PNG, and SVG, and no larger than 200KB",
587+
"login_background_image": "Login Background Image",
588+
"larger_than_5mb": "Background image on the left: Recommended size: 576 x 900 for vector images, 1152 x 1800 for bitmap images, supports JPG, PNG, and SVG, and no larger than 5MB",
589+
"website_name": "Website Name",
590+
"on_webpage_tabs": "Platform name displayed on webpage tabs",
591+
"welcome_message": "Welcome Message",
592+
"the_product_logo": "Welcome Message below the product logo",
593+
"screen_customization_supported": "Defaults to the SQLBot login screen; customization supported",
594+
"platform_settings": "Platform Settings",
595+
"help_documentation": "Help Documentation",
596+
"show_about": "Show About",
597+
"abort_update": "Abort Update",
598+
"save_and_apply": "Save and Apply",
599+
"setting_successfully": "Setting Successfully",
600+
"customize_theme_color": "Customize theme color"
570601
}
571-
}
602+
}

frontend/src/i18n/zh-CN.json

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -567,5 +567,36 @@
567567
"license": {
568568
"error_tips": "是否刷新页面?",
569569
"offline_tips": "服务已经下线,请联系管理员重启服务!"
570+
},
571+
"system": {
572+
"system_settings": "系统设置",
573+
"appearance_settings": "外观设置",
574+
"platform_display_theme": "平台显示主题",
575+
"default_turquoise": "默认 (松石绿)",
576+
"tech_blue": "科技蓝",
577+
"custom": "自定义",
578+
"platform_login_settings": "平台登录设置",
579+
"page_preview": "页面预览",
580+
"restore_default": "恢复默认",
581+
"website_logo": "网站 Logo",
582+
"tab": "页签",
583+
"replace_image": "替换图片",
584+
"larger_than_200kb": "顶部网站显示的 Logo,建议尺寸 48 x 48,支持 JPG、PNG、SVG,大小不超过 200KB",
585+
"login_logo": "登录 Logo",
586+
"larger_than_200kb_de": "登录页面右侧 Logo,建议尺寸 204*52,支持 JPG、PNG、SVG,大小不超过 200KB",
587+
"login_background_image": "登录背景图",
588+
"larger_than_5mb": "左侧背景图,矢量图建议尺寸 576*900,位图建议尺寸 1152*1800;支持 JPG、PNG、SVG,大小不超过 5M",
589+
"website_name": "网站名称",
590+
"on_webpage_tabs": "显示在网页 Tab 的平台名称",
591+
"welcome_message": "欢迎语",
592+
"the_product_logo": "产品 Logo 下的 欢迎语",
593+
"screen_customization_supported": "默认为 SQLBot 登录界面,支持自定义设置",
594+
"platform_settings": "平台设置",
595+
"help_documentation": "帮助文档",
596+
"show_about": "显示关于",
597+
"abort_update": "放弃更新",
598+
"save_and_apply": "保存并应用",
599+
"setting_successfully": "设置成功",
600+
"customize_theme_color": "自定义主题色"
570601
}
571602
}

0 commit comments

Comments
 (0)