Compare commits

..

No commits in common. "c462e1c2b5354a0415f4ad68d9841647e7233de4" and "f3138e9681ab6ac0363e7ee07b314dc91caa38fd" have entirely different histories.

2 changed files with 9 additions and 23 deletions

View File

@ -88,17 +88,9 @@ export const VersionPanel: React.FC<VersionPanelProps> = ({
const parsed = parseChangelog(content); const parsed = parseChangelog(content);
setRemoteChangelog(parsed); setRemoteChangelog(parsed);
// 检查是否有更新 - 基于日期而非版本号数字大小来确定最新版本 // 检查是否有更新
if (parsed.length > 0) { if (parsed.length > 0) {
// 按日期排序,找到真正的最新版本 const latest = parsed[0];
const sortedByDate = [...parsed].sort((a, b) => {
// 解析日期进行比较
const dateA = new Date(a.date);
const dateB = new Date(b.date);
return dateB.getTime() - dateA.getTime(); // 降序排列,最新的在前
});
const latest = sortedByDate[0];
setLatestVersion(latest.version); setLatestVersion(latest.version);
setIsHasUpdate( setIsHasUpdate(
compareVersions(latest.version) === UpdateStatus.HAS_UPDATE compareVersions(latest.version) === UpdateStatus.HAS_UPDATE
@ -449,12 +441,6 @@ export const VersionPanel: React.FC<VersionPanelProps> = ({
); );
return !localVersions.includes(entry.version); return !localVersions.includes(entry.version);
}) })
.sort((a, b) => {
// 按日期排序,确保最新的版本在前面显示
const dateA = new Date(a.date);
const dateB = new Date(b.date);
return dateB.getTime() - dateA.getTime(); // 降序排列,最新的在前
})
.map((entry, index) => ( .map((entry, index) => (
<div <div
key={index} key={index}

View File

@ -1,6 +1,6 @@
/* eslint-disable no-console */ /* eslint-disable no-console */
const CURRENT_VERSION = '8.9.5'; const CURRENT_VERSION = '8.9.0';
// 导出当前版本号供其他地方使用 // 导出当前版本号供其他地方使用
export { CURRENT_VERSION }; export { CURRENT_VERSION };