diff --git a/.env.development b/.env.development index e9224a19de305318f0f6e7b2bb169a9006e5547a..24a66be225a4975018cef456f58d28fc8e7aba1a 100644 --- a/.env.development +++ b/.env.development @@ -12,4 +12,7 @@ VITE_API_WS_URL = 'ws://localhost:8000' VITE_BASE = '/' # 是否开启开发者工具 -VITE_OPEN_DEVTOOLS = false \ No newline at end of file +VITE_OPEN_DEVTOOLS = false + +# 应用配置面板 +VITE_APP_SETTING = true \ No newline at end of file diff --git a/.env.production b/.env.production index 7236d2e1ce73c35f38b3942b3053e504421c606d..1c5abb9b191bae7db453bbdbcb88152761ade020 100644 --- a/.env.production +++ b/.env.production @@ -8,4 +8,7 @@ VITE_API_BASE_URL = 'https://api.continew.top' VITE_API_WS_URL = 'wss://api.continew.top' # 地址前缀 -VITE_BASE = '/' \ No newline at end of file +VITE_BASE = '/' + +# 应用配置面板 +VITE_APP_SETTING = false \ No newline at end of file diff --git a/.env.test b/.env.test index 3660da199574c56f01e0a567f18b28e8d1c884f3..68c14e1b7907b5b040749ca303e7ec5d8ff7d4e7 100644 --- a/.env.test +++ b/.env.test @@ -13,4 +13,7 @@ VITE_API_BASE_URL = 'http://localhost:8000' VITE_BASE = '/test' # 是否开启开发者工具 -VITE_OPEN_DEVTOOLS = true \ No newline at end of file +VITE_OPEN_DEVTOOLS = true + +# 应用配置面板 +VITE_APP_SETTING = false \ No newline at end of file diff --git a/src/config/setting.json b/src/config/setting.json deleted file mode 100644 index 77c77d3725154663668767ba8faad73eb4fc42cf..0000000000000000000000000000000000000000 --- a/src/config/setting.json +++ /dev/null @@ -1,13 +0,0 @@ -{ - "theme": "light", - "themeColor": "#165DFF", - "tab": true, - "tabMode": "card-gutter", - "animate": false, - "animateMode": "zoom-fade", - "menuCollapse": true, - "menuAccordion": true, - "menuDark": false, - "copyrightDisplay": true, - "layout": "left" -} diff --git a/src/config/setting.ts b/src/config/setting.ts new file mode 100644 index 0000000000000000000000000000000000000000..a9f81ee44e840b8be2d0e0303763e2b821c538f0 --- /dev/null +++ b/src/config/setting.ts @@ -0,0 +1,19 @@ +export const defaultSettings: App.AppSettings = { + theme: 'light', + themeColor: '#165DFF', + tab: true, + tabMode: 'card-gutter', + animate: false, + animateMode: 'zoom-fade', + menuCollapse: true, + menuAccordion: true, + menuDark: false, + copyrightDisplay: true, + layout: 'left', + enableColorWeaknessMode: false, + enableMourningMode: false, +} +// 根据环境返回配置 +export const getSettings = (): App.AppSettings => { + return defaultSettings +} diff --git a/src/layout/components/HeaderRightBar/SettingDrawer.vue b/src/layout/components/HeaderRightBar/SettingDrawer.vue index 3ed98e8bef71082a7a6bf0c5c76483d3b608f8c7..df7a8fc3fe7d680e3decbb801135ac8d2d4fbc35 100644 --- a/src/layout/components/HeaderRightBar/SettingDrawer.vue +++ b/src/layout/components/HeaderRightBar/SettingDrawer.vue @@ -1,8 +1,11 @@