feat: change repo links
This commit is contained in:
@@ -34,20 +34,19 @@ function VersionDisplay() {
|
||||
return (
|
||||
<button
|
||||
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'
|
||||
>
|
||||
<span className='font-mono'>v{CURRENT_VERSION}</span>
|
||||
{!isChecking && updateStatus !== UpdateStatus.FETCH_FAILED && (
|
||||
<div
|
||||
className={`flex items-center gap-1.5 ${
|
||||
updateStatus === UpdateStatus.HAS_UPDATE
|
||||
className={`flex items-center gap-1.5 ${updateStatus === UpdateStatus.HAS_UPDATE
|
||||
? 'text-yellow-600 dark:text-yellow-400'
|
||||
: updateStatus === UpdateStatus.NO_UPDATE
|
||||
? 'text-green-600 dark:text-green-400'
|
||||
: ''
|
||||
}`}
|
||||
? 'text-green-600 dark:text-green-400'
|
||||
: ''
|
||||
}`}
|
||||
>
|
||||
{updateStatus === UpdateStatus.HAS_UPDATE && (
|
||||
<>
|
||||
|
||||
@@ -58,7 +58,7 @@ export const VersionPanel: React.FC<VersionPanelProps> = ({
|
||||
const fetchRemoteChangelog = async () => {
|
||||
try {
|
||||
const response = await fetch(
|
||||
'https://raw.githubusercontent.com/LunaTechLab/MoonTV/main/CHANGELOG'
|
||||
'https://codeberg.org/LunaTechLab/MoonTV/raw/branch/main/CHANGELOG'
|
||||
);
|
||||
if (response.ok) {
|
||||
const content = await response.text();
|
||||
@@ -164,13 +164,12 @@ export const VersionPanel: React.FC<VersionPanelProps> = ({
|
||||
return (
|
||||
<div
|
||||
key={entry.version}
|
||||
className={`p-4 rounded-lg border ${
|
||||
isCurrentVersion
|
||||
? 'bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800'
|
||||
: isUpdate
|
||||
className={`p-4 rounded-lg border ${isCurrentVersion
|
||||
? 'bg-blue-50 dark:bg-blue-900/20 border-blue-200 dark:border-blue-800'
|
||||
: isUpdate
|
||||
? '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'
|
||||
}`}
|
||||
}`}
|
||||
>
|
||||
{/* 版本标题 */}
|
||||
<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>
|
||||
<a
|
||||
href='https://github.com/LunaTechLab/MoonTV'
|
||||
href='https://github.com/MoonTechLab/LunaTV'
|
||||
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'
|
||||
@@ -351,7 +350,7 @@ export const VersionPanel: React.FC<VersionPanelProps> = ({
|
||||
</div>
|
||||
</div>
|
||||
<a
|
||||
href='https://github.com/LunaTechLab/MoonTV'
|
||||
href='https://github.com/MoonTechLab/LunaTV'
|
||||
target='_blank'
|
||||
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'
|
||||
@@ -402,11 +401,10 @@ export const VersionPanel: React.FC<VersionPanelProps> = ({
|
||||
.map((entry, index) => (
|
||||
<div
|
||||
key={index}
|
||||
className={`p-4 rounded-lg border ${
|
||||
entry.version === latestVersion
|
||||
? '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'
|
||||
}`}
|
||||
className={`p-4 rounded-lg border ${entry.version === latestVersion
|
||||
? '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'
|
||||
}`}
|
||||
>
|
||||
<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'>
|
||||
|
||||
@@ -13,8 +13,7 @@ export enum UpdateStatus {
|
||||
|
||||
// 远程版本检查URL配置
|
||||
const VERSION_CHECK_URLS = [
|
||||
'https://raw.githubusercontent.com/LunaTechLab/MoonTV/main/VERSION.txt',
|
||||
'https://cdn.jsdelivr.net/gh/LunaTechLab/moontv/VERSION.txt',
|
||||
'https://codeberg.org/LunaTechLab/MoonTV/raw/branch/main/VERSION.txt',
|
||||
];
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user