GWS : version de la carte lue en direct (0.6.0), API en meme origine

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Cette révision appartient à :
Theo GastineletClaude Opus 5.5 a révisé 2026-10-15 13:09:24 +02:00
1 Parent c0e59d8195
révision d37f6dc23b
1 fichier modifié
+14 -5
+14 -5
Voir le fichier
@@ -2155,7 +2155,7 @@ body.spa-nav-hidden .spa-nav { display:none; }
<img src="assets/apps/gastinel-weather-studio/icone.webp" alt="Icône Gastinel Weather Studio" class="gws-featured-icon" width="56" height="56" loading="lazy">
<div>
<div class="gws-featured-tag-row">
<span class="gws-badge-status available"><span class="badge-dot"></span>Version 0.5.0 disponible</span>
<span class="gws-badge-status available"><span class="badge-dot"></span><span id="gwsCarteVersion">Version 0.6.0 disponible</span></span>
<span class="gws-badge-arch">Windows 10 / 11 (64-bit)</span>
</div>
<h3 class="gws-featured-title">Gastinel Weather Studio</h3>
@@ -3426,8 +3426,8 @@ var Modules={
},
gws:function(root){
var API_URL = 'https://gastinel.me/gws/api/v1/update/windows/x86_64/0.0.0';
var DEFAULT_VERSION = '0.5.0';
var API_URL = '/gws/api/v1/update/windows/x86_64/0.0.0';
var DEFAULT_VERSION = '0.6.0';
function copyText(text, cb) {
if (navigator.clipboard && window.isSecureContext) {
@@ -3959,8 +3959,17 @@ function boot(){
Promise.all(waits).then(hideLoader,hideLoader);
}
}
if(document.readyState!=='loading') boot();
else document.addEventListener('DOMContentLoaded',boot);
// Badge de la carte GWS (Mes applications) : version stable lue en direct.
function majVersionGws(){
var el=document.getElementById('gwsCarteVersion');
if(!el||!window.fetch) return;
fetch('/gws/api/v1/update/windows/x86_64/0.0.0',{cache:'no-cache'})
.then(function(r){ return r.ok&&r.status!==204?r.json():null; })
.then(function(d){ if(d&&/^v?\d+\.\d+\.\d+$/.test(d.version||'')) el.textContent='Version '+d.version.replace(/^v/i,'')+' disponible'; })
.catch(function(){});
}
if(document.readyState!=='loading'){ boot(); majVersionGws(); }
else { document.addEventListener('DOMContentLoaded',boot); document.addEventListener('DOMContentLoaded',majVersionGws); }
})();
</script>
</body>