From da1f3566c2182332437ff16bd1c3b01f86d30e1a Mon Sep 17 00:00:00 2001 From: Julien Calixte Date: Mon, 23 Mar 2026 19:25:34 +0100 Subject: [PATCH] feat: turn into a pwa --- app/main.py | 20 ++++++++++++++++++++ app/static/icon-maskable.svg | 11 +++++++++++ app/static/icon.svg | 10 ++++++++++ app/static/index.html | 7 +++++++ app/static/manifest.json | 24 ++++++++++++++++++++++++ app/static/sw.js | 27 +++++++++++++++++++++++++++ 6 files changed, 99 insertions(+) create mode 100644 app/static/icon-maskable.svg create mode 100644 app/static/icon.svg create mode 100644 app/static/manifest.json create mode 100644 app/static/sw.js diff --git a/app/main.py b/app/main.py index ce78669..704373f 100644 --- a/app/main.py +++ b/app/main.py @@ -36,6 +36,26 @@ async def worker_js(): return FileResponse(STATIC_DIR / "worker.js", media_type="application/javascript") +@app.get("/sw.js") +async def sw_js(): + return FileResponse(STATIC_DIR / "sw.js", media_type="application/javascript") + + +@app.get("/manifest.json") +async def manifest(): + return FileResponse(STATIC_DIR / "manifest.json", media_type="application/manifest+json") + + +@app.get("/icon.svg") +async def icon(): + return FileResponse(STATIC_DIR / "icon.svg", media_type="image/svg+xml") + + +@app.get("/icon-maskable.svg") +async def icon_maskable(): + return FileResponse(STATIC_DIR / "icon-maskable.svg", media_type="image/svg+xml") + + @app.post("/extract-audio") async def extract_audio(body: ExtractAudioRequest, background_tasks: BackgroundTasks): try: diff --git a/app/static/icon-maskable.svg b/app/static/icon-maskable.svg new file mode 100644 index 0000000..5a67ca3 --- /dev/null +++ b/app/static/icon-maskable.svg @@ -0,0 +1,11 @@ + + + + + + + + + + + diff --git a/app/static/icon.svg b/app/static/icon.svg new file mode 100644 index 0000000..0884731 --- /dev/null +++ b/app/static/icon.svg @@ -0,0 +1,10 @@ + + + + + + + + + + diff --git a/app/static/index.html b/app/static/index.html index ffe50fc..365b141 100644 --- a/app/static/index.html +++ b/app/static/index.html @@ -4,6 +4,9 @@ Apoena Transcript + + +