aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDanilo M. <danix@danix.xyz>2026-11-09 20:01:41 +0100
committerDanilo M. <danix@danix.xyz>2026-11-09 20:01:41 +0100
commitd107596f6c277d6aa4616616cc4fe176f339a8f5 (patch)
tree3b0fecc9aab164cd4318610a232363ee4c8dfc5e
parentddc62adc923b2668207c4c7a527ed221c9ba9393 (diff)
downloaddeck-it-d107596f6c277d6aa4616616cc4fe176f339a8f5.tar.gz
deck-it-d107596f6c277d6aa4616616cc4fe176f339a8f5.zip
feat: PWA manifest so Chrome installs deck-it fullscreen
-rw-r--r--static/icon-192.pngbin0 -> 936 bytes
-rw-r--r--static/icon-512.pngbin0 -> 3206 bytes
-rw-r--r--static/index.html3
-rw-r--r--static/manifest.json14
-rw-r--r--tests/test_frontend.py9
5 files changed, 26 insertions, 0 deletions
diff --git a/static/icon-192.png b/static/icon-192.png
new file mode 100644
index 0000000..30e1c5d
--- /dev/null
+++ b/static/icon-192.png
Binary files differ
diff --git a/static/icon-512.png b/static/icon-512.png
new file mode 100644
index 0000000..8126f4d
--- /dev/null
+++ b/static/icon-512.png
Binary files differ
diff --git a/static/index.html b/static/index.html
index 958580f..434e496 100644
--- a/static/index.html
+++ b/static/index.html
@@ -8,6 +8,9 @@
<meta name="apple-mobile-web-app-status-bar-style" content="black-translucent">
<meta name="apple-mobile-web-app-title" content="deck-it">
<meta name="theme-color" content="#24273a">
+<link rel="manifest" href="manifest.json">
+<link rel="icon" href="icon-192.png">
+<link rel="apple-touch-icon" href="icon-192.png">
<link rel="stylesheet" href="vendor/gridstack/gridstack.min.css">
<link rel="stylesheet" href="theme.css">
<link rel="stylesheet" href="deck.css">
diff --git a/static/manifest.json b/static/manifest.json
new file mode 100644
index 0000000..1813283
--- /dev/null
+++ b/static/manifest.json
@@ -0,0 +1,14 @@
+{
+ "name": "deck-it",
+ "short_name": "deck-it",
+ "description": "Tablet dashboard and stream-deck for this desktop.",
+ "start_url": "./",
+ "scope": "./",
+ "display": "fullscreen",
+ "background_color": "#24273a",
+ "theme_color": "#24273a",
+ "icons": [
+ { "src": "icon-192.png", "sizes": "192x192", "type": "image/png" },
+ { "src": "icon-512.png", "sizes": "512x512", "type": "image/png" }
+ ]
+}
diff --git a/tests/test_frontend.py b/tests/test_frontend.py
index d86468d..1111f89 100644
--- a/tests/test_frontend.py
+++ b/tests/test_frontend.py
@@ -4,6 +4,7 @@ from pathlib import Path
sys.path.insert(0, str(Path(__file__).resolve().parent.parent))
import http.client
+import json
import os
import socket
import tempfile
@@ -55,6 +56,14 @@ class Frontend(unittest.TestCase):
for asset in ("app.js", "deck.css", "vendor/gridstack/gridstack-all.js"):
self.assertIn(asset, text)
+ def test_pwa_manifest(self):
+ self.assertIn(b'rel="manifest"', self.get("/")[1])
+ manifest = json.loads(self.get("/manifest.json")[1])
+ self.assertEqual(manifest["display"], "fullscreen")
+ self.assertEqual(manifest["start_url"], "./")
+ for size in (192, 512):
+ self.assertEqual(self.get(f"/icon-{size}.png")[0], 200)
+
def test_vendor_assets_served(self):
for path in ("/vendor/gridstack/gridstack-all.js", "/vendor/gridstack/gridstack.min.css"):
self.assertEqual(self.get(path)[0], 200, path)