diff --git a/web/css/styles.css b/web/css/styles.css index 51eda75..9d3959a 100644 --- a/web/css/styles.css +++ b/web/css/styles.css @@ -25,7 +25,12 @@ body { background-color: var(--bg-color); color: var(--fg-color); min-height: 100vh; + min-height: 100dvh; overflow-x: hidden; + /* Safe area for notched devices */ + padding-top: env(safe-area-inset-top); + padding-left: env(safe-area-inset-left); + padding-right: env(safe-area-inset-right); } /* Header */ @@ -109,6 +114,7 @@ body { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 1rem; padding: 1rem; + padding-bottom: calc(1rem + env(safe-area-inset-bottom)); } .macro-card { @@ -405,7 +411,7 @@ body { /* Status/Toast Messages */ .toast-container { position: fixed; - bottom: 1rem; + bottom: calc(1rem + env(safe-area-inset-bottom)); right: 1rem; z-index: 300; } diff --git a/web/index.html b/web/index.html index 82de50c..32db8da 100644 --- a/web/index.html +++ b/web/index.html @@ -2,18 +2,26 @@ - + + + + + + + MacroPad + + diff --git a/web/manifest.json b/web/manifest.json index dcad7c3..f2a0b7d 100644 --- a/web/manifest.json +++ b/web/manifest.json @@ -1,8 +1,10 @@ { + "id": "/", "name": "MacroPad Server", "short_name": "MacroPad", "description": "Remote macro control for your desktop", "start_url": "/", + "scope": "/", "display": "standalone", "background_color": "#2e2e2e", "theme_color": "#007acc", @@ -12,14 +14,27 @@ "src": "/static/icons/icon-192.png", "sizes": "192x192", "type": "image/png", - "purpose": "any maskable" + "purpose": "any" + }, + { + "src": "/static/icons/icon-192.png", + "sizes": "192x192", + "type": "image/png", + "purpose": "maskable" }, { "src": "/static/icons/icon-512.png", "sizes": "512x512", "type": "image/png", - "purpose": "any maskable" + "purpose": "any" + }, + { + "src": "/static/icons/icon-512.png", + "sizes": "512x512", + "type": "image/png", + "purpose": "maskable" } ], - "categories": ["utilities", "productivity"] + "categories": ["utilities", "productivity"], + "prefer_related_applications": false } diff --git a/web/service-worker.js b/web/service-worker.js index 4590ddf..4aacc0e 100644 --- a/web/service-worker.js +++ b/web/service-worker.js @@ -1,5 +1,5 @@ // MacroPad PWA Service Worker -const CACHE_NAME = 'macropad-v1'; +const CACHE_NAME = 'macropad-v2'; const ASSETS_TO_CACHE = [ '/', '/static/css/styles.css',