updated ui & fixed download release

This commit is contained in:
2026-08-26 20:32:21 -07:00
parent 2291e2d13f
commit ddaa71dda8
11 changed files with 69 additions and 90 deletions

View File

@@ -241,7 +241,9 @@
<header role="banner">
<nav class="nav" role="navigation" aria-label="Main navigation">
<div class="nav-container">
<a href="/" class="logo" aria-label="Vyla Home - Home">Vyla Home</a>
<div class="logo-image">
<img src="/assets/images/icons/logo_white.png" alt="Vyla Home">
</div>
<div class="nav-links">
<a href="#features">Features</a>
<a href="#testimonials">Testimonials</a>
@@ -353,7 +355,6 @@
btn.textContent = `Download Release ${version}`;
} catch (error) {
console.error("Failed to resolve latest release:", error);
btn.textContent = "Download Latest Release";
}
}
@@ -500,21 +501,6 @@
</div>
</section>
<!--
<section id="showcases" class="showcases-section">
<div class="container showcases-heading reveal">
<h2 class="section-title-lg">Advanced Player Engine</h2>
<p class="section-subtitle">Isolated playback sandbox with custom subtitle decoders and a responsive
video pipeline.</p>
</div>
<div class="showcase-viewport">
<div class="showcase-track" id="showcase-track"></div>
</div>
</section>
-->
<section id="testimonials" class="section testimonials-section" aria-labelledby="testimonials-heading">
<div class="container testimonials-container">
<header class="testimonials-heading reveal">
@@ -569,24 +555,37 @@
];
try {
const project = "vyla-entertainment%2Fhome";
const response = await fetch(
"https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/releases/permalink/latest"
`https://gitlab.com/api/v4/projects/${project}/releases/permalink/latest`
);
if (!response.ok) throw new Error("Failed to fetch latest release");
if (!response.ok) {
throw new Error(`Failed to fetch latest release: ${response.status}`);
}
const release = await response.json();
const version = release.tag_name;
const fileVersion = version.replace(/^v/, "");
const downloadUrl =
`https://gitlab.com/api/v4/projects/vyla-entertainment%2Fhome/packages/generic/vyla-home/${version}/Vyla-Home_${fileVersion}_x64-setup.exe`;
const asset = release.assets?.links?.find(link =>
link.name?.toLowerCase().endsWith(".exe")
);
if (!asset?.url) {
throw new Error("No .exe asset found in latest release");
}
buttons.forEach(button => {
if (button) button.href = downloadUrl;
if (button) {
button.href = asset.url;
}
});
} catch (error) {
console.error("Failed to resolve latest release:", error);
buttons.forEach(button => {
if (button) {
button.textContent = "Download Latest Release";
}
});
}
}