系统设置增加依赖代理和镜像设置

This commit is contained in:
whyour
2023-11-25 21:49:33 +08:00
parent 9b7d4cb8fe
commit 3777a4e7b4
13 changed files with 455 additions and 156 deletions
+9
View File
@@ -15,6 +15,7 @@ import CodeMirror from '@uiw/react-codemirror';
import { useOutletContext } from '@umijs/max';
import { SharedContext } from '@/layouts';
import { langs } from '@uiw/codemirror-extensions-langs';
import { useHotkeys } from 'react-hotkeys-hook';
const Config = () => {
const { headerStyle, isPhone, theme } = useOutletContext<SharedContext>();
@@ -68,6 +69,14 @@ const Config = () => {
getConfig(node.value);
};
useHotkeys(
'meta+s',
(e) => {
updateConfig();
},
{ enableOnFormTags: ['textarea'], preventDefault: true },
);
useEffect(() => {
getFiles();
getConfig('config.sh');