fixed:恢复版本检测功能

This commit is contained in:
djteang 2025-09-16 09:06:24 +08:00
parent 091ca9d2ff
commit 7b73c7c71d
4 changed files with 66 additions and 20 deletions

View File

@ -1,3 +1,47 @@
## [8.9.0] - 2025-09-15
### Added
- 机器识别码设定开关
- 配置文件去重添加
- 视频源编辑
- 单个视频源进行有效性检测
### Changed
- 聊天页面适配移动端
### Fixed
- 弹幕发送问题
- 播放页测速问题
## [8.8.9] - 2025-09-14
### Added
- 聊天,好友等功能
- 支持arm架构镜像
### Fixed
- 播放页面500问题
### Added
- 聊天,好友等功能
- 支持arm架构镜像
### Fixed
- 播放页面500问题
## [8.8.8] - 2025-09-12
### Added
- 新增短剧类目聚合
- 支持短剧类目搜索
- 弹幕功能
- 用户头像上传
- 设备识别码绑定用户
### Changed
- 美化界面
- 修改图标和标题
### Fixed
- 停用版本检查功能
## [100.0.0] - 2025-08-26
### Added

View File

@ -1 +1 @@
8.8.8
8.9.0

View File

@ -81,7 +81,7 @@ export const VersionPanel: React.FC<VersionPanelProps> = ({
const fetchRemoteChangelog = async () => {
try {
const response = await fetch(
'https://raw.githubusercontent.com/MoonTechLab/LunaTV/main/CHANGELOG'
'https://raw.githubusercontent.com/djteang/OrangeTV/refs/heads/main/CHANGELOG'
);
if (response.ok) {
const content = await response.text();
@ -363,7 +363,7 @@ export const VersionPanel: React.FC<VersionPanelProps> = ({
</div>
</div>
<a
href='https://github.com/MoonTechLab/LunaTV'
href='https://github.com/djteang/OrangeTV'
target='_blank'
rel='noopener noreferrer'
className='inline-flex items-center justify-center gap-2 px-3 py-2 bg-yellow-600 hover:bg-yellow-700 text-white text-xs sm:text-sm rounded-lg transition-colors shadow-sm w-full'

View File

@ -2,7 +2,7 @@
'use client';
import { CURRENT_VERSION } from "@/lib/version";
import { CURRENT_VERSION } from '@/lib/version';
// 版本检查结果枚举
export enum UpdateStatus {
@ -13,7 +13,7 @@ export enum UpdateStatus {
// 远程版本检查URL配置
const VERSION_CHECK_URLS = [
'https://raw.githubusercontent.com/MoonTechLab/LunaTV/main/VERSION.txt',
'https://raw.githubusercontent.com/djteang/OrangeTV/refs/heads/main/VERSION.txt',
];
/**
@ -89,13 +89,15 @@ async function fetchVersionFromUrl(url: string): Promise<string | null> {
*/
export function compareVersions(remoteVersion: string): UpdateStatus {
// 如果版本号相同,无需更新
if ('8.9.0' === CURRENT_VERSION) {
if (remoteVersion === CURRENT_VERSION) {
return UpdateStatus.NO_UPDATE;
}
try {
// 解析版本号为数字数组 [X, Y, Z]
const currentParts = (CURRENT_VERSION as string).split('.').map((part: string) => {
const currentParts = (CURRENT_VERSION as string)
.split('.')
.map((part: string) => {
const num = parseInt(part, 10);
if (isNaN(num) || num < 0) {
throw new Error(`无效的版本号格式: ${CURRENT_VERSION}`);