v0.3.0 — mise à jour in-app pour Android
- Server : GET /api/version (version + APK URL + taille), GET /download/latest.apk - Server : releases/latest.apk servi avec Content-Type APK - Web : checkForUpdate() compare version locale vs serveur au démarrage - Web : modale de mise à jour (télécharger + installer, ou plus tard) - Web : version affichée dans l'onglet Plus - Vite : __APP_VERSION__ injecté au build depuis shared/APP_VERSION - Workflow : bump APP_VERSION → build APK → copier vers server/releases/latest.apk
This commit is contained in:
parent
246f989bdc
commit
90adee1eae
9 changed files with 220 additions and 3 deletions
|
|
@ -7,6 +7,8 @@ import { renderRadar } from './views/radar'
|
|||
import { renderMap } from './views/map'
|
||||
import { renderPlus } from './views/plus'
|
||||
import { getBaseUrl } from './config'
|
||||
import { checkForUpdate } from './update'
|
||||
import { showUpdateModal } from './update-modal'
|
||||
|
||||
type Tab = 'meteo' | 'radar' | 'carte' | 'plus'
|
||||
|
||||
|
|
@ -105,5 +107,12 @@ subscribe(renderApp)
|
|||
|
||||
void bootstrap().then(() => {
|
||||
renderApp()
|
||||
console.log(`Météo Exam — serveur : ${getBaseUrl()}`)
|
||||
console.log(`Météo Exam — v${__APP_VERSION__} — serveur : ${getBaseUrl()}`)
|
||||
|
||||
// Vérification de mise à jour (Android natif uniquement).
|
||||
void checkForUpdate().then((update) => {
|
||||
if (update) {
|
||||
showUpdateModal(update, () => renderApp())
|
||||
}
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue