diff --git a/.gitignore b/.gitignore index 7647865be8..2373a66776 100644 --- a/.gitignore +++ b/.gitignore @@ -51,6 +51,7 @@ pnpm-debug.log* *.classpath *.project .settings/ +.lh package-lock.json diff --git a/backend/src/main/resources/db/migration/V26__de1.3.sql b/backend/src/main/resources/db/migration/V26__de1.3.sql index edbd2af260..df2cdc0db9 100644 --- a/backend/src/main/resources/db/migration/V26__de1.3.sql +++ b/backend/src/main/resources/db/migration/V26__de1.3.sql @@ -6,6 +6,36 @@ INSERT INTO `sys_msg_type` VALUES (7, 0, 'i18n_msg_type_ds_invalid', 'datasource INSERT INTO `sys_msg_type` VALUES (8, 7, 'i18n_msg_type_ds_invalid', 'datasource', 'to-msg-ds'); COMMIT; +-- ---------------------------- +-- Table structure for system_parameter +-- ---------------------------- +DROP TABLE IF EXISTS `system_parameter`; +CREATE TABLE `system_parameter` ( + `param_key` varchar(64) NOT NULL COMMENT 'Parameter name', + `param_value` varchar(255) DEFAULT NULL COMMENT 'Parameter value', + `type` varchar(100) NOT NULL DEFAULT 'text' COMMENT 'Parameter type', + `sort` int(5) DEFAULT NULL COMMENT 'Sort', + PRIMARY KEY (`param_key`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4; + +-- ---------------------------- +-- Records of system_parameter +-- ---------------------------- +BEGIN; +INSERT INTO `system_parameter` VALUES ('', NULL, 'text', NULL); +INSERT INTO `system_parameter` VALUES ('default.language', 'zh_CN', 'text', -1); +INSERT INTO `system_parameter` VALUES ('ui.favicon', NULL, 'file', -1); +INSERT INTO `system_parameter` VALUES ('ui.loginImage', NULL, 'file', 4); +INSERT INTO `system_parameter` VALUES ('ui.loginLogo', NULL, 'file', 5); +INSERT INTO `system_parameter` VALUES ('ui.loginTitle', NULL, 'text', 3); +INSERT INTO `system_parameter` VALUES ('ui.logo', NULL, 'file', 6); +INSERT INTO `system_parameter` VALUES ('ui.theme', NULL, 'text', 2); +INSERT INTO `system_parameter` VALUES ('ui.title', NULL, 'text', 1); +INSERT INTO `system_parameter` VALUES ('ui.topMenuActiveColor', NULL, 'text', 8); +INSERT INTO `system_parameter` VALUES ('ui.topMenuColor', NULL, 'text', 7); +INSERT INTO `system_parameter` VALUES ('ui.topMenuTextActiveColor', NULL, 'text', 10); +INSERT INTO `system_parameter` VALUES ('ui.topMenuTextColor', NULL, 'text', 9); +COMMIT; -- ---------------------------- -- Table structure for panel_pdf_template @@ -20,3 +50,4 @@ CREATE TABLE `panel_pdf_template` ( `sort` int(8) DEFAULT NULL COMMENT '排序', PRIMARY KEY (`id`) ) ENGINE=InnoDB DEFAULT CHARSET=utf8; + diff --git a/frontend/src/components/LangSelect/index.vue b/frontend/src/components/LangSelect/index.vue index a32137c94d..55b565ecb0 100644 --- a/frontend/src/components/LangSelect/index.vue +++ b/frontend/src/components/LangSelect/index.vue @@ -1,7 +1,7 @@ - + @@ -24,10 +24,18 @@ - - - - diff --git a/frontend/src/components/Settings/index.vue b/frontend/src/components/Settings/index.vue deleted file mode 100644 index 0fb565e14a..0000000000 --- a/frontend/src/components/Settings/index.vue +++ /dev/null @@ -1,107 +0,0 @@ - - - - {{ $t('settings.title') }} - - - {{ $t('settings.theme') }} - - - - - {{ $t('settings.fixedHeader') }} - - - - - {{ $t('settings.sidebarLogo') }} - - - - - - - - - - diff --git a/frontend/src/components/ThemePicker/index.vue b/frontend/src/components/ThemePicker/index.vue index 2fc497be2f..1bd21b4364 100644 --- a/frontend/src/components/ThemePicker/index.vue +++ b/frontend/src/components/ThemePicker/index.vue @@ -8,9 +8,9 @@ diff --git a/frontend/src/components/back-button/index.vue b/frontend/src/components/back-button/index.vue index 6d72ad6009..65f860fd03 100644 --- a/frontend/src/components/back-button/index.vue +++ b/frontend/src/components/back-button/index.vue @@ -31,8 +31,6 @@ export default { \ No newline at end of file + \ No newline at end of file diff --git a/frontend/src/icons/svg/language.svg b/frontend/src/icons/svg/language.svg index 312f4f3b54..143b3a6d73 100644 --- a/frontend/src/icons/svg/language.svg +++ b/frontend/src/icons/svg/language.svg @@ -1 +1 @@ - \ No newline at end of file + \ No newline at end of file diff --git a/frontend/src/lang/zh.js b/frontend/src/lang/zh.js index b0be043f8a..3f07babb7c 100644 --- a/frontend/src/lang/zh.js +++ b/frontend/src/lang/zh.js @@ -1250,7 +1250,16 @@ export default { loginImage: '登录页面右侧图片', loginTitle: '登录页面标题', title: '系统名称', - advice_size: '建议图片大小' + advice_size: '建议图片大小', + theme: '主题颜色', + + topMenuColor: '头部背景', + topMenuActiveColor: '头部选中背景', + + topMenuTextColor: '头部字体颜色', + + topMenuTextActiveColor: '头部字体选中颜色' + }, auth: { authConfig: '权限配置', diff --git a/frontend/src/layout/components/AppMain.vue b/frontend/src/layout/components/AppMain.vue index eaf39b016c..2e72540801 100644 --- a/frontend/src/layout/components/AppMain.vue +++ b/frontend/src/layout/components/AppMain.vue @@ -20,7 +20,6 @@ export default { diff --git a/frontend/src/layout/components/Sidebar/Logo.vue b/frontend/src/layout/components/Sidebar/Logo.vue index 10a077f73f..d48754cfee 100644 --- a/frontend/src/layout/components/Sidebar/Logo.vue +++ b/frontend/src/layout/components/Sidebar/Logo.vue @@ -53,8 +53,7 @@ export default { width: 100%; height: 50px; line-height: 50px; -// background: #2b2f3a; - background-color: $menuBg; + background-color: $topBarBg; text-align: center; overflow: hidden; diff --git a/frontend/src/layout/components/Sidebar/index.vue b/frontend/src/layout/components/Sidebar/index.vue index e2cd53868a..3bc0895e88 100644 --- a/frontend/src/layout/components/Sidebar/index.vue +++ b/frontend/src/layout/components/Sidebar/index.vue @@ -1,13 +1,10 @@ - + @@ -21,9 +18,12 @@ import { mapGetters } from 'vuex' import Logo from './Logo' import SidebarItem from './SidebarItem' import variables from '@/styles/variables.scss' +import { getThemeCluster } from '@/utils/style' export default { components: { SidebarItem, Logo }, + computed: { + ...mapGetters([ 'sidebar' ]), @@ -48,7 +48,38 @@ export default { }, isCollapse() { return false + }, + activeBg() { + const theme = this.$store.state.settings.theme + const styleCluster = getThemeCluster(theme.replace('#', '')) + if (styleCluster.length > 2) { + const len = styleCluster.length + const val = styleCluster[len - 2] + return val + } + return '' } } } + + diff --git a/frontend/src/layout/components/Topbar.vue b/frontend/src/layout/components/Topbar.vue index 3df7960cfb..451737667f 100644 --- a/frontend/src/layout/components/Topbar.vue +++ b/frontend/src/layout/components/Topbar.vue @@ -1,15 +1,17 @@ - + - @@ -22,19 +24,9 @@ - + - - - - - - - - @@ -45,7 +37,7 @@ - + {{ name }} @@ -61,9 +53,7 @@ {{ $t('user.change_password') }} - - - + {{ $t('commons.about_us') }} @@ -73,7 +63,9 @@ + +