chore(gh-pages): add crowdin-ignore class (#3747)

This commit is contained in:
ReenigneArcher
2025-03-23 10:21:04 -04:00
committed by GitHub
parent 5da5293471
commit e6fbd24001

View File

@@ -538,11 +538,11 @@ ext-js:
<div class="card-footer p-3 px-4"> <div class="card-footer p-3 px-4">
<a class="latest-button btn btn-outline-light me-3 mb-3 d-none" href="https://github.com/LizardByte/Sunshine/releases/latest" target="_blank"> <a class="latest-button btn btn-outline-light me-3 mb-3 d-none" href="https://github.com/LizardByte/Sunshine/releases/latest" target="_blank">
<i class="fa-fw fab fa-github"></i> <i class="fa-fw fab fa-github"></i>
Latest: <span id="latest-version"></span> Latest: <span id="latest-version" class="crowdin-ignore"></span>
</a> </a>
<a class="beta-button btn btn-outline-light me-3 mb-3 d-none" href="#" target="_blank"> <a class="beta-button btn btn-outline-light me-3 mb-3 d-none" href="#" target="_blank">
<i class="fa-fw fas fa-flask"></i> <i class="fa-fw fas fa-flask"></i>
Beta: <span id="beta-version"></span> Beta: <span id="beta-version" class="crowdin-ignore"></span>
</a> </a>
<a class="btn btn-outline-light me-3 mb-3" href="https://github.com/LizardByte/pacman-repo" target="_blank"> <a class="btn btn-outline-light me-3 mb-3" href="https://github.com/LizardByte/pacman-repo" target="_blank">
<i class="fa-fw fab fa-linux"></i> <i class="fa-fw fab fa-linux"></i>
@@ -577,16 +577,21 @@ ext-js:
// Filter the releases to get only the stable releases // Filter the releases to get only the stable releases
const stableReleases = data.filter(release => !release.prerelease); const stableReleases = data.filter(release => !release.prerelease);
const latestButton = document.querySelector('.latest-button');
const latestVersion = document.querySelector('#latest-version');
const betaButton = document.querySelector('.beta-button');
const betaVersion = document.querySelector('#beta-version');
// If there are no stable releases, hide the latest download button // If there are no stable releases, hide the latest download button
if (stableReleases.length === 0) { if (stableReleases.length === 0) {
document.querySelector('.latest-button').classList.add('d-none'); latestButton.classList.add('d-none');
} else { } else {
// Show the latest download button // Show the latest download button
document.querySelector('.latest-button').classList.remove('d-none'); latestButton.classList.remove('d-none');
// Get the latest stable release // Get the latest stable release
const latestStableRelease = stableReleases[0]; const latestStableRelease = stableReleases[0];
document.querySelector('#latest-version').textContent = latestStableRelease.tag_name; latestVersion.textContent = latestStableRelease.tag_name;
// If there is a pre-release, update the href attribute of the anchor tag // If there is a pre-release, update the href attribute of the anchor tag
if (preReleases.length > 0) { if (preReleases.length > 0) {
@@ -598,16 +603,16 @@ ext-js:
// If the pre-release is newer, update the href attribute of the anchor tag // If the pre-release is newer, update the href attribute of the anchor tag
if (preReleaseDate > stableReleaseDate) { if (preReleaseDate > stableReleaseDate) {
document.querySelector('.beta-button').href = latestPreRelease.html_url; betaButton.href = latestPreRelease.html_url;
document.querySelector('#beta-version').textContent = latestPreRelease.tag_name; betaVersion.textContent = latestPreRelease.tag_name;
document.querySelector('.beta-button').classList.remove('d-none'); betaButton.classList.remove('d-none');
} else { } else {
// If the pre-release is older, hide the button // If the pre-release is older, hide the button
document.querySelector('.beta-button').classList.add('d-none'); betaButton.classList.add('d-none');
} }
} else { } else {
// If there is no pre-release, hide the button // If there is no pre-release, hide the button
document.querySelector('.beta-button').classList.add('d-none'); betaButton.classList.add('d-none');
} }
} }
}); });