From 6b6321786e0bb817e210843ca5d137cb9cbacb5c Mon Sep 17 00:00:00 2001 From: Claude Date: Thu, 23 Apr 2026 04:35:08 +0000 Subject: [PATCH] Add Quick Note PWA app shortcut Adds a shortcuts entry to the manifest so long-pressing the installed PWA icon on Android shows a "Quick Note" action that opens /?quick=1. https://claude.ai/code/session_01AeDjZauHMpEX5VsNM2bRYz --- vite.config.ts | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/vite.config.ts b/vite.config.ts index ea8ddfe..234b31e 100644 --- a/vite.config.ts +++ b/vite.config.ts @@ -6,6 +6,7 @@ import path from "path"; import { fileURLToPath } from "url"; const __dirname = path.dirname(fileURLToPath(import.meta.url)); +const basePath = process.env.VITE_BASE_PATH ?? '/'; export default defineConfig({ plugins: [ @@ -40,6 +41,21 @@ export default defineConfig({ purpose: "any", }, ], + shortcuts: [ + { + name: "Quick Note", + short_name: "Quick Note", + description: "Log a quick workout note with RPE and feel", + url: `${basePath}?quick=1`, + icons: [ + { + src: "pwa-192x192.png", + sizes: "192x192", + type: "image/png", + }, + ], + }, + ], }, workbox: { globPatterns: ["**/*.{js,css,html,ico,png,svg,woff2}"], @@ -47,7 +63,7 @@ export default defineConfig({ }, }), ], - base: process.env.VITE_BASE_PATH ?? '/', + base: basePath, resolve: { alias: { "@": path.resolve(__dirname, "client", "src"),