From e13d9ed51be230751055ecc47308e02b38a58af7 Mon Sep 17 00:00:00 2001 From: whyour Date: Mon, 24 Jan 2022 23:17:12 +0800 Subject: [PATCH] =?UTF-8?q?=E6=B7=BB=E5=8A=A0=E5=85=B3=E4=BA=8E=E9=A1=B5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- back/services/system.ts | 4 +-- src/pages/setting/about.tsx | 49 ++++++++++++++++++++++++++++++++++++ src/pages/setting/index.less | 20 +++++++++++++++ src/pages/setting/index.tsx | 7 ++++-- 4 files changed, 76 insertions(+), 4 deletions(-) create mode 100644 src/pages/setting/about.tsx diff --git a/back/services/system.ts b/back/services/system.ts index feb5a12e..59d05d55 100644 --- a/back/services/system.ts +++ b/back/services/system.ts @@ -86,9 +86,9 @@ export default class SystemService { let lastLog = ''; try { const result = await Promise.race([ - got.get(config.lastVersionFile, { timeout: 1000, retry: 0 }), + got.get(config.lastVersionFile, { timeout: 6000, retry: 0 }), got.get(`https://ghproxy.com/${config.lastVersionFile}`, { - timeout: 5000, + timeout: 6000, retry: 0, }), ]); diff --git a/src/pages/setting/about.tsx b/src/pages/setting/about.tsx new file mode 100644 index 00000000..b46ff18c --- /dev/null +++ b/src/pages/setting/about.tsx @@ -0,0 +1,49 @@ +import React, { useEffect, useState } from 'react'; +import { Typography, Input, Form, Button, message } from 'antd'; +import styles from './index.less'; + +const { Link } = Typography; + +const About = () => { + return ( +
+ logo +
+ 青龙 + + 支持python3、javaScript、shell、typescript 的定时任务管理面板(A timed + task management panel that supports typescript, javaScript, python3, + and shell.) + +
+ + Github + + + Telegram频道 + + + 提交BUG + +
+
+
+ ); +}; + +export default About; diff --git a/src/pages/setting/index.less b/src/pages/setting/index.less index e69de29b..3e02b2dc 100644 --- a/src/pages/setting/index.less +++ b/src/pages/setting/index.less @@ -0,0 +1,20 @@ +.container { + display: flex; + justify-content: center; + align-items: center; + padding: 50px 130px; + .right { + display: flex; + justify-content: center; + flex-direction: column; + + .title { + font-size: 25px; + margin-bottom: 10px; + } + + .desc { + margin-bottom: 10px; + } + } +} diff --git a/src/pages/setting/index.tsx b/src/pages/setting/index.tsx index 5d2de29e..f86d4b77 100644 --- a/src/pages/setting/index.tsx +++ b/src/pages/setting/index.tsx @@ -32,7 +32,7 @@ import SecuritySettings from './security'; import LoginLog from './loginLog'; import NotificationSetting from './notification'; import CheckUpdate from './checkUpdate'; -import { useForm } from 'antd/lib/form/Form'; +import About from './about'; const { Text } = Typography; const optionsWithDisabled = [ @@ -124,7 +124,7 @@ const Setting = ({ const [loginLogData, setLoginLogData] = useState([]); const [notificationInfo, setNotificationInfo] = useState(); const [logRemoveFrequency, setLogRemoveFrequency] = useState(); - const [form] = useForm(); + const [form] = Form.useForm(); const themeChange = (e: any) => { setTheme(e.target.value); @@ -381,6 +381,9 @@ const Setting = ({ + + +