mirror of
https://github.com/MoonTechLab/LunaTV.git
synced 2026-05-19 04:17:29 +08:00
feat: change repo links
This commit is contained in:
@@ -34,20 +34,19 @@ function VersionDisplay() {
|
|||||||
return (
|
return (
|
||||||
<button
|
<button
|
||||||
onClick={() =>
|
onClick={() =>
|
||||||
window.open('https://github.com/LunaTechLab/MoonTV', '_blank')
|
window.open('https://github.com/MoonTechLab/LunaTV', '_blank')
|
||||||
}
|
}
|
||||||
className='absolute bottom-4 left-1/2 transform -translate-x-1/2 flex items-center gap-2 text-xs text-gray-500 dark:text-gray-400 transition-colors cursor-pointer'
|
className='absolute bottom-4 left-1/2 transform -translate-x-1/2 flex items-center gap-2 text-xs text-gray-500 dark:text-gray-400 transition-colors cursor-pointer'
|
||||||
>
|
>
|
||||||
<span className='font-mono'>v{CURRENT_VERSION}</span>
|
<span className='font-mono'>v{CURRENT_VERSION}</span>
|
||||||
{!isChecking && updateStatus !== UpdateStatus.FETCH_FAILED && (
|
{!isChecking && updateStatus !== UpdateStatus.FETCH_FAILED && (
|
||||||
<div
|
<div
|
||||||
className={`flex items-center gap-1.5 ${
|
className={`flex items-center gap-1.5 ${updateStatus === UpdateStatus.HAS_UPDATE
|
||||||
updateStatus === UpdateStatus.HAS_UPDATE
|
|
||||||
? 'text-yellow-600 dark:text-yellow-400'
|
? 'text-yellow-600 dark:text-yellow-400'
|
||||||
: updateStatus === UpdateStatus.NO_UPDATE
|
: updateStatus === UpdateStatus.NO_UPDATE
|
||||||
? 'text-green-600 dark:text-green-400'
|
? 'text-green-600 dark:text-green-400'
|
||||||
: ''
|
: ''
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{updateStatus === UpdateStatus.HAS_UPDATE && (
|
{updateStatus === UpdateStatus.HAS_UPDATE && (
|
||||||
<>
|
<>
|
||||||
|
|||||||
@@ -58,7 +58,7 @@ export const VersionPanel: React.FC<VersionPanelProps> = ({
|
|||||||
const fetchRemoteChangelog = async () => {
|
const fetchRemoteChangelog = async () => {
|
||||||
try {
|
try {
|
||||||
const response = await fetch(
|
const response = await fetch(
|
||||||
'https://raw.githubusercontent.com/LunaTechLab/MoonTV/main/CHANGELOG'
|
'https://codeberg.org/LunaTechLab/MoonTV/raw/branch/main/CHANGELOG'
|
||||||
);
|
);
|
||||||
if (response.ok) {
|
if (response.ok) {
|
||||||
const content = await response.text();
|
const content = await response.text();
|
||||||
@@ -164,13 +164,12 @@ export const VersionPanel: React.FC<VersionPanelProps> = ({
|
|||||||
return (
|
return (
|
||||||
<div
|
<div
|
||||||
key={entry.version}
|
key={entry.version}
|
||||||
className={`p-4 rounded-lg border ${
|
className={`p-4 rounded-lg border ${isCurrentVersion
|
||||||
isCurrentVersion
|
? 'bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800'
|
||||||
? 'bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800'
|
: isUpdate
|
||||||
: isUpdate
|
|
||||||
? 'bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800'
|
? 'bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800'
|
||||||
: 'bg-gray-50 dark:bg-gray-800/60 border-gray-200 dark:border-gray-700'
|
: 'bg-gray-50 dark:bg-gray-800/60 border-gray-200 dark:border-gray-700'
|
||||||
}`}
|
}`}
|
||||||
>
|
>
|
||||||
{/* 版本标题 */}
|
{/* 版本标题 */}
|
||||||
<div className='flex flex-col sm:flex-row sm:items-center justify-between gap-2 mb-3'>
|
<div className='flex flex-col sm:flex-row sm:items-center justify-between gap-2 mb-3'>
|
||||||
@@ -321,7 +320,7 @@ export const VersionPanel: React.FC<VersionPanelProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a
|
<a
|
||||||
href='https://github.com/LunaTechLab/MoonTV'
|
href='https://github.com/MoonTechLab/LunaTV'
|
||||||
target='_blank'
|
target='_blank'
|
||||||
rel='noopener noreferrer'
|
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'
|
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'
|
||||||
@@ -351,7 +350,7 @@ export const VersionPanel: React.FC<VersionPanelProps> = ({
|
|||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
<a
|
<a
|
||||||
href='https://github.com/LunaTechLab/MoonTV'
|
href='https://github.com/MoonTechLab/LunaTV'
|
||||||
target='_blank'
|
target='_blank'
|
||||||
rel='noopener noreferrer'
|
rel='noopener noreferrer'
|
||||||
className='inline-flex items-center justify-center gap-2 px-3 py-2 bg-green-600 hover:bg-green-700 text-white text-xs sm:text-sm rounded-lg transition-colors shadow-sm w-full'
|
className='inline-flex items-center justify-center gap-2 px-3 py-2 bg-green-600 hover:bg-green-700 text-white text-xs sm:text-sm rounded-lg transition-colors shadow-sm w-full'
|
||||||
@@ -402,11 +401,10 @@ export const VersionPanel: React.FC<VersionPanelProps> = ({
|
|||||||
.map((entry, index) => (
|
.map((entry, index) => (
|
||||||
<div
|
<div
|
||||||
key={index}
|
key={index}
|
||||||
className={`p-4 rounded-lg border ${
|
className={`p-4 rounded-lg border ${entry.version === latestVersion
|
||||||
entry.version === latestVersion
|
? 'bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800'
|
||||||
? 'bg-yellow-50 dark:bg-yellow-900/20 border-yellow-200 dark:border-yellow-800'
|
: 'bg-gray-50 dark:bg-gray-800/60 border-gray-200 dark:border-gray-700'
|
||||||
: 'bg-gray-50 dark:bg-gray-800/60 border-gray-200 dark:border-gray-700'
|
}`}
|
||||||
}`}
|
|
||||||
>
|
>
|
||||||
<div className='flex flex-col sm:flex-row sm:items-center justify-between gap-2 mb-3'>
|
<div className='flex flex-col sm:flex-row sm:items-center justify-between gap-2 mb-3'>
|
||||||
<div className='flex flex-wrap items-center gap-2'>
|
<div className='flex flex-wrap items-center gap-2'>
|
||||||
|
|||||||
@@ -13,8 +13,7 @@ export enum UpdateStatus {
|
|||||||
|
|
||||||
// 远程版本检查URL配置
|
// 远程版本检查URL配置
|
||||||
const VERSION_CHECK_URLS = [
|
const VERSION_CHECK_URLS = [
|
||||||
'https://raw.githubusercontent.com/LunaTechLab/MoonTV/main/VERSION.txt',
|
'https://codeberg.org/LunaTechLab/MoonTV/raw/branch/main/VERSION.txt',
|
||||||
'https://cdn.jsdelivr.net/gh/LunaTechLab/moontv/VERSION.txt',
|
|
||||||
];
|
];
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Reference in New Issue
Block a user