Fix: SW-Update nuklear (unregister all), touch-action pan-y für Scroll, /force-update Route, Geburtstags-KI user_id, konto-loeschen Import (SW by-v791)
This commit is contained in:
parent
f73a2bdeab
commit
97a03ce006
12 changed files with 69 additions and 15 deletions
|
|
@ -327,7 +327,7 @@ MEDIA_DIR = os.getenv("MEDIA_DIR", "/data/media")
|
|||
os.makedirs(MEDIA_DIR, exist_ok=True)
|
||||
app.mount("/media", StaticFiles(directory=MEDIA_DIR), name="media")
|
||||
|
||||
APP_VER = "786" # muss mit APP_VER in app.js übereinstimmen
|
||||
APP_VER = "791" # muss mit APP_VER in app.js übereinstimmen
|
||||
|
||||
@app.get("/.well-known/assetlinks.json")
|
||||
async def assetlinks():
|
||||
|
|
@ -1546,6 +1546,7 @@ async def presse():
|
|||
|
||||
@app.get("/konto-loeschen")
|
||||
async def konto_loeschen():
|
||||
from fastapi.responses import HTMLResponse
|
||||
html = """<!DOCTYPE html>
|
||||
<html lang="de">
|
||||
<head>
|
||||
|
|
@ -1594,6 +1595,36 @@ async def konto_loeschen():
|
|||
return HTMLResponse(content=html, headers={"Cache-Control": "max-age=3600"})
|
||||
|
||||
|
||||
# /force-update — SW + Cache-Killer für hartnäckige alte Versionen
|
||||
# ------------------------------------------------------------------
|
||||
@app.get("/force-update")
|
||||
async def force_update():
|
||||
from fastapi.responses import HTMLResponse
|
||||
html = """<!DOCTYPE html><html><head><meta charset="UTF-8">
|
||||
<meta name="viewport" content="width=device-width,initial-scale=1">
|
||||
<title>Ban Yaro — Update</title>
|
||||
<style>body{font-family:sans-serif;display:flex;align-items:center;justify-content:center;
|
||||
height:100vh;margin:0;background:#0f1623;color:#fff;flex-direction:column;gap:16px}
|
||||
p{color:#94a3b8;font-size:14px}</style></head>
|
||||
<body>
|
||||
<div>⏳ Aktualisiere Ban Yaro…</div>
|
||||
<p id="s">Service Worker wird entfernt…</p>
|
||||
<script>
|
||||
(async()=>{
|
||||
document.getElementById('s').textContent='Caches werden geleert…';
|
||||
try{
|
||||
const regs=await navigator.serviceWorker.getRegistrations();
|
||||
await Promise.all(regs.map(r=>r.unregister()));
|
||||
const keys=await caches.keys();
|
||||
await Promise.all(keys.map(k=>caches.delete(k)));
|
||||
}catch(e){}
|
||||
document.getElementById('s').textContent='Fertig — weiterleiten…';
|
||||
setTimeout(()=>location.replace('/'),800);
|
||||
})();
|
||||
</script></body></html>"""
|
||||
return HTMLResponse(content=html, headers={"Cache-Control": "no-store"})
|
||||
|
||||
|
||||
# /partner — Influencer-Landingpage
|
||||
# ------------------------------------------------------------------
|
||||
@app.get("/partner")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue