forked from test2/Amnezia-Web-Panel-main
Point update checker to git.evilfox.cc instead of GitHub.
Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -597,7 +597,7 @@
|
|||||||
<span id="checkUpdateBtnText">🔄 {{ _('check_updates') }}</span>
|
<span id="checkUpdateBtnText">🔄 {{ _('check_updates') }}</span>
|
||||||
<div class="spinner hidden" id="checkUpdateSpinner" style="width:14px; height:14px;"></div>
|
<div class="spinner hidden" id="checkUpdateSpinner" style="width:14px; height:14px;"></div>
|
||||||
</button>
|
</button>
|
||||||
<a href="https://github.com/PRVTPRO/Amnezia-Web-Panel/releases" target="_blank" class="btn btn-primary hidden" id="downloadUpdateBtn" style="flex:1; text-decoration: none; justify-content: center;">
|
<a href="https://git.evilfox.cc/test2/Amnezia-Web-Panel-main/releases" target="_blank" class="btn btn-primary hidden" id="downloadUpdateBtn" style="flex:1; text-decoration: none; justify-content: center;">
|
||||||
⬇️ {{ _('download_update') }}
|
⬇️ {{ _('download_update') }}
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
@@ -1425,7 +1425,7 @@
|
|||||||
downloadBtn.classList.add('hidden');
|
downloadBtn.classList.add('hidden');
|
||||||
|
|
||||||
try {
|
try {
|
||||||
const response = await fetch('https://api.github.com/repos/PRVTPRO/Amnezia-Web-Panel/releases/latest');
|
const response = await fetch('https://git.evilfox.cc/api/v1/repos/test2/Amnezia-Web-Panel-main/releases/latest');
|
||||||
if (!response.ok) throw new Error('API Error');
|
if (!response.ok) throw new Error('API Error');
|
||||||
const data = await response.json();
|
const data = await response.json();
|
||||||
|
|
||||||
@@ -1437,7 +1437,7 @@
|
|||||||
if (latestVersion !== currentVersion && latestVersion) {
|
if (latestVersion !== currentVersion && latestVersion) {
|
||||||
statusDiv.innerHTML = `<span style="color: var(--success); font-weight: bold;">{{ _('update_available')|default('Update available') }}: ${latestVersion}</span>`;
|
statusDiv.innerHTML = `<span style="color: var(--success); font-weight: bold;">{{ _('update_available')|default('Update available') }}: ${latestVersion}</span>`;
|
||||||
statusDiv.style.border = '1px solid var(--success)';
|
statusDiv.style.border = '1px solid var(--success)';
|
||||||
downloadBtn.href = data.html_url;
|
downloadBtn.href = data.html_url || 'https://git.evilfox.cc/test2/Amnezia-Web-Panel-main/releases';
|
||||||
downloadBtn.classList.remove('hidden');
|
downloadBtn.classList.remove('hidden');
|
||||||
} else {
|
} else {
|
||||||
statusDiv.innerHTML = `<span style="color: var(--text-muted);">{{ _('up_to_date')|default('Up to date') }}</span>`;
|
statusDiv.innerHTML = `<span style="color: var(--text-muted);">{{ _('up_to_date')|default('Up to date') }}</span>`;
|
||||||
|
|||||||
Reference in New Issue
Block a user