mirror of
https://github.com/whyour/qinglong.git
synced 2026-07-17 17:54:32 +08:00
修改版本文件
This commit is contained in:
@@ -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>
|
||||
|
||||
@@ -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"
|
||||
>
|
||||
查看
|
||||
|
||||
@@ -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,
|
||||
}}
|
||||
|
||||
@@ -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
@@ -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',
|
||||
|
||||
@@ -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. 其他优化
|
||||
`;
|
||||
Reference in New Issue
Block a user