diff --git a/src/layouts/index.less b/src/layouts/index.less index 0a59c478..93a5acbb 100644 --- a/src/layouts/index.less +++ b/src/layouts/index.less @@ -8,7 +8,7 @@ body { .code-mirror-wrapper .CodeMirror { position: absolute; - height: calc(100% - 48px); + height: calc(100% - 64px); width: 100%; } @@ -19,7 +19,7 @@ body { overflow: auto; height: calc(100vh - 96px); background-color: #fff; - padding: 24px; + padding: 16px; } } diff --git a/src/pages/setting/index.tsx b/src/pages/setting/index.tsx index 6c22ad81..45acdd43 100644 --- a/src/pages/setting/index.tsx +++ b/src/pages/setting/index.tsx @@ -1,5 +1,5 @@ import React, { useState, useEffect } from 'react'; -import { Button, notification, Input, Form, Radio, Tabs } from 'antd'; +import { Button, Input, Form, Radio, Tabs } from 'antd'; import config from '@/utils/config'; import { PageContainer } from '@ant-design/pro-layout'; import { request } from '@/utils/http'; @@ -28,7 +28,7 @@ const Password = () => { const handleOk = (values: any) => { request - .post(`${config.apiPrefix}user?t=${Date.now()}`, { + .post(`${config.apiPrefix}user`, { data: { username: values.username, password: values.password, @@ -48,6 +48,12 @@ const Password = () => { localStorage.setItem('qinglong_dark_theme', e.target.value); }; + const importJob = () => { + request.get(`${config.apiPrefix}crons/import`).then((data: any) => { + console.log(data); + }); + }; + useEffect(() => { if (document.body.clientWidth < 768) { setWdith('auto'); @@ -63,11 +69,19 @@ const Password = () => { useEffect(() => { setFetchMethod(window.fetch); if (theme === 'dark') { - enableDarkMode({ darkSchemeTextColor: '#fff' }); + enableDarkMode({ + brightness: 100, + contrast: 90, + sepia: 10, + }); } else if (theme === 'light') { disableDarkMode(); } else { - followSystemColorScheme({ darkSchemeTextColor: '#fff' }); + followSystemColorScheme({ + brightness: 100, + contrast: 90, + sepia: 10, + }); } }, [theme]); @@ -94,7 +108,7 @@ const Password = () => {