diff --git a/backend/agileboot-common/src/main/java/com/agileboot/common/enums/common/ConfigKeyEnum.java b/backend/agileboot-common/src/main/java/com/agileboot/common/enums/common/ConfigKeyEnum.java index 7f22fd2..0d7e61f 100644 --- a/backend/agileboot-common/src/main/java/com/agileboot/common/enums/common/ConfigKeyEnum.java +++ b/backend/agileboot-common/src/main/java/com/agileboot/common/enums/common/ConfigKeyEnum.java @@ -3,18 +3,13 @@ package com.agileboot.common.enums.common; import com.agileboot.common.enums.BasicEnum; /** - * 系统配置 + * 系统配置,对应 sys_config 表的 config_key 字段。 + * * @author valarchie - * 对应 sys_config表的config_key字段 */ public enum ConfigKeyEnum implements BasicEnum { - /** - * 菜单类型 - */ - SKIN_THEME("sys.index.skinName", "系统皮肤主题"), INIT_PASSWORD("sys.user.initPassword", "初始密码"), - SIDE_BAR_THEME("sys.index.sideTheme", "侧边栏开关"), CAPTCHA("sys.account.captchaOnOff", "验证码开关"), REGISTER("sys.account.registerUser", "注册开放功能"); @@ -36,5 +31,4 @@ public enum ConfigKeyEnum implements BasicEnum { return description; } - } diff --git a/backend/agileboot-infrastructure/src/main/resources/h2sql/agileboot_data.sql b/backend/agileboot-infrastructure/src/main/resources/h2sql/agileboot_data.sql index b3b5b5a..f78a07e 100644 --- a/backend/agileboot-infrastructure/src/main/resources/h2sql/agileboot_data.sql +++ b/backend/agileboot-infrastructure/src/main/resources/h2sql/agileboot_data.sql @@ -19,9 +19,7 @@ Date: 2022-10-07 16:05:40 -- ---------------------------- -- Records of sys_config -- ---------------------------- -INSERT INTO `sys_config` VALUES ('1', '主框架页-默认皮肤样式名称', 'sys.index.skinName', '["skin-blue","skin-green","skin-purple","skin-red","skin-yellow"]', 'skin-blue', '1', null, null, '2022-08-28 22:12:19', '2022-05-21 08:30:55', '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow', '0'); INSERT INTO `sys_config` VALUES ('2', '用户管理-账号初始密码', 'sys.user.initPassword', '', '1234567', '1', null, null, '2022-08-28 21:54:19', '2022-05-21 08:30:55', '初始化密码 123456', '0'); -INSERT INTO `sys_config` VALUES ('3', '主框架页-侧边栏主题', 'sys.index.sideTheme', '["theme-dark","theme-light"]', 'theme-dark', '1', null, null, '2022-08-28 22:12:15', '2022-08-20 08:30:55', '深色主题theme-dark,浅色主题theme-light', '0'); INSERT INTO `sys_config` VALUES ('4', '账号自助-验证码开关', 'sys.account.captchaOnOff', '["true","false"]', 'false', '0', null, null, '2022-08-28 22:03:37', '2022-05-21 08:30:55', '是否开启验证码功能(true开启,false关闭)', '0'); INSERT INTO `sys_config` VALUES ('5', '账号自助-是否开启用户注册功能', 'sys.account.registerUser', '["true","false"]', 'true', '0', null, '1', '2022-10-05 22:18:57', '2022-05-21 08:30:55', '是否开启注册用户功能(true开启,false关闭)', '0'); diff --git a/backend/agileboot-infrastructure/src/main/resources/pgsql/agileboot_data.sql b/backend/agileboot-infrastructure/src/main/resources/pgsql/agileboot_data.sql index 22fdc95..8a46a54 100644 --- a/backend/agileboot-infrastructure/src/main/resources/pgsql/agileboot_data.sql +++ b/backend/agileboot-infrastructure/src/main/resources/pgsql/agileboot_data.sql @@ -1,8 +1,6 @@ -INSERT INTO app.sys_config (config_id, config_name, config_key, config_options, config_value, is_allow_change, creator_id, updater_id, update_time, create_time, remark, deleted) VALUES (1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', '["skin-blue","skin-green","skin-purple","skin-red","skin-yellow"]', 'skin-blue', true, null, null, '2022-08-28 22:12:19', '2022-05-21 08:30:55', '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow', 0); INSERT INTO app.sys_config (config_id, config_name, config_key, config_options, config_value, is_allow_change, creator_id, updater_id, update_time, create_time, remark, deleted) VALUES (2, '用户管理-账号初始密码', 'sys.user.initPassword', '', '123456', true, null, 1, '2023-07-20 14:42:08', '2022-05-21 08:30:55', '初始化密码 123456', 0); -INSERT INTO app.sys_config (config_id, config_name, config_key, config_options, config_value, is_allow_change, creator_id, updater_id, update_time, create_time, remark, deleted) VALUES (3, '主框架页-侧边栏主题', 'sys.index.sideTheme', '["theme-dark","theme-light"]', 'theme-dark', true, null, null, '2022-08-28 22:12:15', '2022-08-20 08:30:55', '深色主题theme-dark,浅色主题theme-light', 0); INSERT INTO app.sys_config (config_id, config_name, config_key, config_options, config_value, is_allow_change, creator_id, updater_id, update_time, create_time, remark, deleted) VALUES (4, '账号自助-验证码开关', 'sys.account.captchaOnOff', '["true","false"]', 'false', false, null, 1, '2023-07-20 14:39:36', '2022-05-21 08:30:55', '是否开启验证码功能(true开启,false关闭)', 0); INSERT INTO app.sys_config (config_id, config_name, config_key, config_options, config_value, is_allow_change, creator_id, updater_id, update_time, create_time, remark, deleted) VALUES (5, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', '["true","false"]', 'true', false, null, 1, '2022-10-05 22:18:57', '2022-05-21 08:30:55', '是否开启注册用户功能(true开启,false关闭)', 0); diff --git a/backend/sql/agileboot.sql b/backend/sql/agileboot.sql index 336b949..70b0715 100644 --- a/backend/sql/agileboot.sql +++ b/backend/sql/agileboot.sql @@ -23,9 +23,7 @@ create table sys_config ) comment '参数配置表'; -INSERT INTO sys_config (config_id, config_name, config_key, config_options, config_value, is_allow_change, creator_id, updater_id, update_time, create_time, remark, deleted) VALUES (1, '主框架页-默认皮肤样式名称', 'sys.index.skinName', '["skin-blue","skin-green","skin-purple","skin-red","skin-yellow"]', 'skin-blue', 1, null, null, '2022-08-28 22:12:19', '2022-05-21 08:30:55', '蓝色 skin-blue、绿色 skin-green、紫色 skin-purple、红色 skin-red、黄色 skin-yellow', 0); INSERT INTO sys_config (config_id, config_name, config_key, config_options, config_value, is_allow_change, creator_id, updater_id, update_time, create_time, remark, deleted) VALUES (2, '用户管理-账号初始密码', 'sys.user.initPassword', '', '123456', 1, null, 1, '2023-07-20 14:42:08', '2022-05-21 08:30:55', '初始化密码 123456', 0); -INSERT INTO sys_config (config_id, config_name, config_key, config_options, config_value, is_allow_change, creator_id, updater_id, update_time, create_time, remark, deleted) VALUES (3, '主框架页-侧边栏主题', 'sys.index.sideTheme', '["theme-dark","theme-light"]', 'theme-dark', 1, null, null, '2022-08-28 22:12:15', '2022-08-20 08:30:55', '深色主题theme-dark,浅色主题theme-light', 0); INSERT INTO sys_config (config_id, config_name, config_key, config_options, config_value, is_allow_change, creator_id, updater_id, update_time, create_time, remark, deleted) VALUES (4, '账号自助-验证码开关', 'sys.account.captchaOnOff', '["true","false"]', 'false', 0, null, 1, '2023-07-20 14:39:36', '2022-05-21 08:30:55', '是否开启验证码功能(true开启,false关闭)', 0); INSERT INTO sys_config (config_id, config_name, config_key, config_options, config_value, is_allow_change, creator_id, updater_id, update_time, create_time, remark, deleted) VALUES (5, '账号自助-是否开启用户注册功能', 'sys.account.registerUser', '["true","false"]', 'true', 0, null, 1, '2022-10-05 22:18:57', '2022-05-21 08:30:55', '是否开启注册用户功能(true开启,false关闭)', 0); diff --git a/frontend/web/package.json b/frontend/web/package.json index 60ed4f2..4172517 100644 --- a/frontend/web/package.json +++ b/frontend/web/package.json @@ -3,7 +3,7 @@ "version": "1.0.0", "private": true, "scripts": { - "dev": "NODE_OPTIONS=--max-old-space-size=4096 vite", + "dev": "vite", "serve": "pnpm dev", "build": "rimraf dist && NODE_OPTIONS=--max-old-space-size=8192 vite build", "build:staging": "rimraf dist && vite build --mode staging", diff --git a/frontend/web/public/serverConfig.json b/frontend/web/public/serverConfig.json index 4aaef6f..089f977 100644 --- a/frontend/web/public/serverConfig.json +++ b/frontend/web/public/serverConfig.json @@ -8,13 +8,8 @@ "Layout": "vertical", "Theme": "default", "DarkMode": false, - "Grey": false, - "Weak": false, - "HideTabs": false, "SidebarStatus": true, "EpThemeColor": "#409EFF", - "ShowLogo": true, - "ShowModel": "smart", "MenuArrowIconNoTransition": true, "CachingAsyncRoutes": false, "TooltipEffect": "light", diff --git a/frontend/web/src/layout/components/appMain.vue b/frontend/web/src/layout/components/appMain.vue index 3f2a244..b0791d4 100644 --- a/frontend/web/src/layout/components/appMain.vue +++ b/frontend/web/src/layout/components/appMain.vue @@ -8,7 +8,7 @@ const props = defineProps({ fixedHeader: Boolean }); -const { $storage, $config } = useGlobal(); +const { $config } = useGlobal(); const keepAlive = computed(() => { return $config?.KeepAlive; @@ -20,22 +20,8 @@ const transitions = computed(() => { }; }); -const hideTabs = computed(() => { - return $storage?.configure.hideTabs; -}); - -const layout = computed(() => { - return $storage?.layout.layout === "vertical"; -}); - const getSectionStyle = computed(() => { - return [ - hideTabs.value && layout ? "padding-top: 48px;" : "", - !hideTabs.value && layout ? "padding-top: 85px;" : "", - hideTabs.value && !layout.value ? "padding-top: 48px" : "", - !hideTabs.value && !layout.value ? "padding-top: 85px;" : "", - props.fixedHeader ? "" : "padding-top: 0;" - ]; + return ["padding-top: 85px;", props.fixedHeader ? "" : "padding-top: 0;"]; }); const transitionMain = defineComponent({ diff --git a/frontend/web/src/layout/components/headerDarkSwitch.vue b/frontend/web/src/layout/components/headerDarkSwitch.vue new file mode 100644 index 0000000..7889e50 --- /dev/null +++ b/frontend/web/src/layout/components/headerDarkSwitch.vue @@ -0,0 +1,29 @@ + + + + + diff --git a/frontend/web/src/layout/components/navbar.vue b/frontend/web/src/layout/components/navbar.vue index 557d033..a5c6de5 100644 --- a/frontend/web/src/layout/components/navbar.vue +++ b/frontend/web/src/layout/components/navbar.vue @@ -2,18 +2,17 @@ import Search from "./search/index.vue"; import Notice from "./notice/index.vue"; import mixNav from "./sidebar/mixNav.vue"; +import HeaderDarkSwitch from "./headerDarkSwitch.vue"; import { useNav } from "@/layout/hooks/useNav"; import Breadcrumb from "./sidebar/breadCrumb.vue"; import topCollapse from "./sidebar/topCollapse.vue"; import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line"; -import Setting from "@iconify-icons/ri/settings-3-line"; const { layout, device, logout, userProfile, - onPanel, pureApp, username, userAvatar, @@ -41,11 +40,9 @@ const {
- - - + @@ -72,13 +69,6 @@ const { - - -
diff --git a/frontend/web/src/layout/components/panel/index.vue b/frontend/web/src/layout/components/panel/index.vue deleted file mode 100644 index 59001f0..0000000 --- a/frontend/web/src/layout/components/panel/index.vue +++ /dev/null @@ -1,158 +0,0 @@ - - - - - - - diff --git a/frontend/web/src/layout/components/setting/index.vue b/frontend/web/src/layout/components/setting/index.vue deleted file mode 100644 index 6543f65..0000000 --- a/frontend/web/src/layout/components/setting/index.vue +++ /dev/null @@ -1,529 +0,0 @@ - - - - - diff --git a/frontend/web/src/layout/components/sidebar/horizontal.vue b/frontend/web/src/layout/components/sidebar/horizontal.vue index 1271998..16c0706 100644 --- a/frontend/web/src/layout/components/sidebar/horizontal.vue +++ b/frontend/web/src/layout/components/sidebar/horizontal.vue @@ -2,12 +2,12 @@ import Search from "../search/index.vue"; import Notice from "../notice/index.vue"; import SidebarItem from "./sidebarItem.vue"; +import HeaderDarkSwitch from "../headerDarkSwitch.vue"; import { isAllEmpty } from "@pureadmin/utils"; import { ref, nextTick, computed } from "vue"; import { useNav } from "@/layout/hooks/useNav"; import { usePermissionStoreHook } from "@/store/modules/permission"; import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line"; -import Setting from "@iconify-icons/ri/settings-3-line"; const menuRef = ref(); @@ -16,7 +16,6 @@ const { title, logout, backTopMenu, - onPanel, username, userAvatar, avatarsStyle @@ -55,11 +54,9 @@ nextTick(() => { />
- - - + @@ -77,13 +74,6 @@ nextTick(() => { - - -
diff --git a/frontend/web/src/layout/components/sidebar/mixNav.vue b/frontend/web/src/layout/components/sidebar/mixNav.vue index 31dd25f..eca84e6 100644 --- a/frontend/web/src/layout/components/sidebar/mixNav.vue +++ b/frontend/web/src/layout/components/sidebar/mixNav.vue @@ -2,6 +2,7 @@ import extraIcon from "./extraIcon.vue"; import Search from "../search/index.vue"; import Notice from "../notice/index.vue"; +import HeaderDarkSwitch from "../headerDarkSwitch.vue"; import { isAllEmpty } from "@pureadmin/utils"; import { useNav } from "@/layout/hooks/useNav"; import { ref, toRaw, watch, onMounted, nextTick } from "vue"; @@ -9,7 +10,6 @@ import { useRenderIcon } from "@/components/ReIcon/src/hooks"; import { getParentPaths, findRouteByPath } from "@/router/utils"; import { usePermissionStoreHook } from "@/store/modules/permission"; import LogoutCircleRLine from "@iconify-icons/ri/logout-circle-r-line"; -import Setting from "@iconify-icons/ri/settings-3-line"; const menuRef = ref(); const defaultActive = ref(null); @@ -18,7 +18,6 @@ const { route, device, logout, - onPanel, resolvePath, username, userAvatar, @@ -28,7 +27,6 @@ const { function getDefaultActive(routePath) { const wholeMenus = usePermissionStoreHook().wholeMenus; - /** 当前路由的父级路径 */ const parentRoutes = getParentPaths(routePath, wholeMenus)[0]; defaultActive.value = !isAllEmpty(route.meta?.activePath) ? route.meta.activePath @@ -54,8 +52,8 @@ watch( - - - diff --git a/frontend/web/src/layout/components/sidebar/vertical.vue b/frontend/web/src/layout/components/sidebar/vertical.vue index b2ce4f2..4b42f75 100644 --- a/frontend/web/src/layout/components/sidebar/vertical.vue +++ b/frontend/web/src/layout/components/sidebar/vertical.vue @@ -1,23 +1,15 @@