// GET /api/jex/latest app.get('/api/jex/latest', (req, res) => const latestVersion = '2.5.0'; const releaseDate = '2026-04-10'; res.json( version: latestVersion, releaseDate, releaseNotes: [ "✨ New dark mode UI", "⚡ 30% faster sync", "🐛 Fixed connection timeout bug" ], downloads: windows: https://cdn.jex.com/client/$latestVersion/Jex-Setup-$latestVersion.exe , mac: https://cdn.jex.com/client/$latestVersion/Jex-$latestVersion.dmg , "mac-arm": https://cdn.jex.com/client/$latestVersion/Jex-$latestVersion-arm64.dmg , linux: https://cdn.jex.com/client/$latestVersion/jex_$latestVersion_amd64.deb
if (platform.includes('win')) return 'windows'; if (platform.includes('mac')) if (platform.includes('linux')) return 'linux'; return null;
<details class="release-notes"> <summary>📝 Release Notes v2.5.0</summary> <ul> <li>✨ New dark mode UI</li> <li>⚡ 30% faster sync</li> <li>🐛 Fixed connection timeout bug</li> </ul> </details> </div> // Download URLs mapping const downloadUrls = windows: 'https://cdn.jex.com/client/latest/Jex-Setup-2.5.0.exe', mac: 'https://cdn.jex.com/client/latest/Jex-2.5.0.dmg', 'mac-arm': 'https://cdn.jex.com/client/latest/Jex-2.5.0-arm64.dmg', linux: 'https://cdn.jex.com/client/latest/jex_2.5.0_amd64.deb', 'linux-rpm': 'https://cdn.jex.com/client/latest/jex-2.5.0-1.x86_64.rpm' ; // Detect OS function detectOS() const platform = navigator.platform.toLowerCase(); const userAgent = navigator.userAgent.toLowerCase();
// Trigger download function downloadClient(osKey) const url = downloadUrls[osKey]; if (!url) alert('Download not available for this OS yet.'); return;
.toast-notification position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: #1e293b; color: white; padding: 10px 20px; border-radius: 40px; font-size: 0.9rem; z-index: 1000; animation: fadeInOut 3s ease;
// Run when DOM ready document.addEventListener('DOMContentLoaded', initJexDownload); .jex-download-card max-width: 500px; margin: 2rem auto; padding: 1.8rem; background: #ffffff; border-radius: 24px; box-shadow: 0 8px 20px rgba(0,0,0,0.1); font-family: system-ui, -apple-system, sans-serif;