diff --git a/src/layouts/index.tsx b/src/layouts/index.tsx index 8c5e8e2e..69530854 100644 --- a/src/layouts/index.tsx +++ b/src/layouts/index.tsx @@ -13,9 +13,9 @@ import config from '@/utils/config'; import { request } from '@/utils/http'; import './index.less'; import vhCheck from 'vh-check'; -import { version, changeLog } from '../version'; +import { version, changeLogLink, changeLog } from '../version'; import { useCtx, useTheme } from '@/utils/hooks'; -import { message, Badge, Typography } from 'antd'; +import { message, Badge, Modal } from 'antd'; export default function (props: any) { const ctx = useCtx(); @@ -88,6 +88,38 @@ export default function (props: any) { } }; + const showNewVersionModal = () => { + Modal.confirm({ + width: 500, + title: ( + <> +
更新可用
+
+ 新版本5.8.0 (1780)可用。你使用的版本为{version}。 +
+ + ), + content: ( +
+          {changeLog}
+        
+ ), + okText: '更新', + cancelText: '以后再说', + onOk() { + console.log('ok'); + }, + }); + }; + useEffect(() => { vhCheck(); }, []); @@ -144,13 +176,9 @@ export default function (props: any) { title={ <> 控制面板 - { - alert('yes'); - }} - > + { @@ -176,7 +204,7 @@ export default function (props: any) { letterSpacing: isQQBrowser ? -2 : 0, }} > - {version} + v{version} diff --git a/src/version.ts b/src/version.ts index b68d7d52..1d9ff038 100644 --- a/src/version.ts +++ b/src/version.ts @@ -1,2 +1,7 @@ -export const version = 'v2.9.7'; -export const changeLog = 'https://t.me/jiao_long/184'; +export const version = '2.9.7'; +export const changeLogLink = 'https://t.me/jiao_long/184'; +export const changeLog = `2.9.7版本说明 +1. 重构初始化流程,可直接在初始化过程中设置账户信息和通知方式 +2. 增加企业微信机器人推送的python版本,感谢 https://github.com/Sowevo PR +3. 修复ql repo可能无法拉取最新代码 +`;