修改版本文件

This commit is contained in:
whyour
2022-12-28 11:06:47 +08:00
parent 3570cddce0
commit 0ab756665e
16 changed files with 70 additions and 91 deletions
+5 -4
View File
@@ -13,7 +13,6 @@ import config from '@/utils/config';
import { request } from '@/utils/http';
import './index.less';
import vhCheck from 'vh-check';
import { version, changeLogLink, changeLog } from '../version';
import { useCtx, useTheme } from '@/utils/hooks';
import {
message,
@@ -52,6 +51,8 @@ interface TSystemInfo {
lastCommitId: string;
lastCommitTime: number;
version: string;
changeLog: string;
changeLogLink: string;
}
export default function () {
@@ -89,6 +90,7 @@ export default function () {
if (!data.isInitialized) {
history.push('/initialization');
} else {
init(data.version);
getUser();
}
}
@@ -143,7 +145,6 @@ export default function () {
useEffect(() => {
vhCheck();
init();
const _theme = localStorage.getItem('qinglong_dark_theme') || 'auto';
if (typeof window === 'undefined') return;
@@ -269,7 +270,7 @@ export default function () {
<>
<span style={{ fontSize: 16 }}></span>
<a
href={changeLogLink}
href={systemInfo?.changeLogLink}
target="_blank"
rel="noopener noreferrer"
onClick={(e) => {
@@ -289,7 +290,7 @@ export default function () {
letterSpacing: isQQBrowser ? -2 : 0,
}}
>
v{version}
v{systemInfo?.version}
</span>
</Badge>
</Tooltip>
+1 -1
View File
@@ -40,7 +40,7 @@ const About = ({ systemInfo }: { systemInfo: SharedContext['systemInfo'] }) => {
</Descriptions.Item>
<Descriptions.Item label="更新日志" span={3}>
<Link
href={`https://qn.whyour.cn/version.ts?t=${Date.now()}`}
href={`https://qn.whyour.cn/version.yaml?t=${Date.now()}`}
target="_blank"
>
+5 -7
View File
@@ -2,11 +2,10 @@ import React, { useEffect, useState, useRef } from 'react';
import { Statistic, Modal, Tag, Button, Spin, message } from 'antd';
import { request } from '@/utils/http';
import config from '@/utils/config';
import { version } from '../../version';
const { Countdown } = Statistic;
const CheckUpdate = ({ socketMessage }: any) => {
const CheckUpdate = ({ socketMessage, systemInfo }: any) => {
const [updateLoading, setUpdateLoading] = useState(false);
const [value, setValue] = useState('');
const modalRef = useRef<any>();
@@ -23,7 +22,7 @@ const CheckUpdate = ({ socketMessage }: any) => {
if (data.hasNewVersion) {
showConfirmUpdateModal(data);
} else {
showForceUpdateModal();
showForceUpdateModal(data);
}
}
})
@@ -36,7 +35,7 @@ const CheckUpdate = ({ socketMessage }: any) => {
});
};
const showForceUpdateModal = () => {
const showForceUpdateModal = (data: any) => {
Modal.confirm({
width: 500,
title: '更新',
@@ -44,7 +43,7 @@ const CheckUpdate = ({ socketMessage }: any) => {
<>
<div></div>
<div style={{ fontSize: 12, fontWeight: 400, marginTop: 5 }}>
{version}
{data.lastVersion}
</div>
</>
),
@@ -70,14 +69,13 @@ const CheckUpdate = ({ socketMessage }: any) => {
<>
<div></div>
<div style={{ fontSize: 12, fontWeight: 400, marginTop: 5 }}>
{lastVersion}使{version}
{lastVersion} 使 {systemInfo.version}
</div>
</>
),
content: (
<pre
style={{
paddingTop: 15,
fontSize: 12,
fontWeight: 400,
}}
+4 -1
View File
@@ -416,7 +416,10 @@ const Setting = () => {
</Input.Group>
</Form.Item>
<Form.Item label="检查更新" name="update">
<CheckUpdate socketMessage={socketMessage} />
<CheckUpdate
systemInfo={systemInfo}
socketMessage={socketMessage}
/>
</Form.Item>
</Form>
),
+1 -2
View File
@@ -1,9 +1,8 @@
import * as Sentry from '@sentry/react';
import { Integrations } from '@sentry/tracing';
import { loader } from '@monaco-editor/react';
import { version } from '../version';
export function init() {
export function init(version: string) {
// sentry监控 init
Sentry.init({
dsn: 'https://3406424fb1dc4813a62d39e844a9d0ac@o1098464.ingest.sentry.io/6122818',
-10
View File
@@ -1,10 +0,0 @@
export const version = '2.15.3';
export const changeLogLink = 'https://t.me/jiao_long/354';
export const changeLog = `2.15.3 版本说明
1. 任务视图增加标签筛选
2. 修改默认镜像python版本为3.10
3. 修复notify.js中智能微秘书,感谢 https://github.com/CoolClash
4. 修复超时任务日志打印
5. 修复调试脚本页保存脚本父目录
6. 其他优化
`;