fix(admin): Scan-App-Download-Link liest Version aus version.json
Portal-Link war fest auf v0.5.apk verlinkt, dadurch nach dem v0.6.0-Build stale. Liest jetzt zur Laufzeit /downloads/version.json (dieselbe Quelle wie der In-App-Update-Check) statt einer fest hinterlegten Versionsnummer im Link - bleibt bei jedem künftigen APK-Build automatisch aktuell. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01CVgbozhYmuEhiEJHffRXCV
This commit is contained in:
1 parent
d53c9a57d1
commit
973bf35514
2 files changed
+34
-6
No files matched your search
@@ -90,6 +90,13 @@ Build-Host, kein Dauerbetrieb der App dort (App läuft auf Endgeräten).
|
||||
— ein normaler Frontend-Deploy mit `rsync --delete` hätte den Ordner sonst
|
||||
gelöscht, real passiert und behoben). Download-Link im Portal nur für
|
||||
Administrator sichtbar (`AdminPage.tsx`).
|
||||
- **Bugfix 2026-09-10:** Portal-Link war fest auf `v0.5.apk` verlinkt,
|
||||
dadurch nach dem v0.6.0-Build stale (zeigte auf eine ältere Version, ohne
|
||||
dass ein Frontend-Deploy das automatisch mitbekommen hätte).
|
||||
`ScanAppDownloadHinweis` liest jetzt zur Laufzeit `/downloads/
|
||||
version.json` (dieselbe Quelle wie der In-App-Update-Check) statt eine
|
||||
Versionsnummer im Link fest zu hinterlegen — bleibt bei jedem künftigen
|
||||
APK-Build automatisch aktuell.
|
||||
- **2026-09-10:** `/opt/flutter-projects` auf `192.168.1.236` lag auf dem
|
||||
Root-Volume — nach `/mnt/projekte/flutter` (eigener ZFS-Mount, mehr
|
||||
Platz) verschoben, `/opt/flutter-projects` ist jetzt ein Symlink dorthin.
|
||||
|
||||
@@ -360,12 +360,33 @@ export function AdminPage() {
|
||||
</>
|
||||
)}
|
||||
{aktiverTab === null && <p className="text-muted">Keine Bereiche für deine Rolle verfügbar.</p>}
|
||||
{istAdmin && (
|
||||
<p className="text-muted" style={{ marginTop: "2rem", fontSize: "0.85rem" }}>
|
||||
<a href="/downloads/mabea-scan-prototyp-v0.5.apk">MABEA Scan-App (Android, Prototyp)</a> herunterladen —
|
||||
FLUT-001-Sondierung, kein Produktivstand.
|
||||
</p>
|
||||
)}
|
||||
{istAdmin && <ScanAppDownloadHinweis />}
|
||||
</main>
|
||||
);
|
||||
}
|
||||
|
||||
// FLUT-001: Version/APK-URL werden zur Laufzeit aus version.json gelesen
|
||||
// (statt fest verlinkt) - sonst veraltet der Link bei jedem neuen APK-Build
|
||||
// im Portal, ohne dass ein Frontend-Deploy das mitbekommt (genau das ist
|
||||
// vorher passiert: Link zeigte noch auf v0.5, obwohl v0.6.0 längst live war).
|
||||
function ScanAppDownloadHinweis() {
|
||||
const [info, setInfo] = useState<{ version: string; apk_url: string } | null>(null);
|
||||
|
||||
useEffect(() => {
|
||||
fetch("/downloads/version.json")
|
||||
.then((r) => (r.ok ? r.json() : null))
|
||||
.then((daten) => setInfo(daten))
|
||||
.catch(() => setInfo(null));
|
||||
}, []);
|
||||
|
||||
return (
|
||||
<p className="text-muted" style={{ marginTop: "2rem", fontSize: "0.85rem" }}>
|
||||
{info ? (
|
||||
<a href={info.apk_url}>MABEA Scan-App (Android, Prototyp) v{info.version}</a>
|
||||
) : (
|
||||
"MABEA Scan-App (Android, Prototyp)"
|
||||
)}{" "}
|
||||
herunterladen — FLUT-001-Sondierung, kein Produktivstand.
|
||||
</p>
|
||||
);
|
||||
}
|
||||
Reference in new issue
Block a user