feat: push notifications, calendar view, photo attachments
- Push notifications: custom SW (injectManifest), usePushNotifications hook, push-notify Edge Function, push_subscriptions migration, bell toggle in header - Calendar view: month-grid CalendarPage + useCalendar hook, scheduled_at column migration, datetime field in OrderModal, CalendarDays nav item + route - Photo attachments: useOrderPhotos hook, photo gallery/upload in OrderModal (edit mode), order-photos Storage bucket migration with RLS policies Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
+6
-8
@@ -6,6 +6,11 @@ export default defineConfig({
|
||||
plugins: [
|
||||
react(),
|
||||
VitePWA({
|
||||
// injectManifest lets us supply our own src/sw.js so we can add
|
||||
// push/notificationclick handlers alongside Workbox precaching.
|
||||
strategies: 'injectManifest',
|
||||
srcDir: 'src',
|
||||
filename: 'sw.js',
|
||||
registerType: 'autoUpdate',
|
||||
includeAssets: ['favicon.svg', 'favicon.ico', 'apple-touch-icon-180x180.png'],
|
||||
manifest: {
|
||||
@@ -25,15 +30,8 @@ export default defineConfig({
|
||||
{ src: 'maskable-icon-512x512.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' },
|
||||
],
|
||||
},
|
||||
workbox: {
|
||||
injectManifest: {
|
||||
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2}'],
|
||||
runtimeCaching: [
|
||||
{
|
||||
urlPattern: /^https:\/\/fonts\.googleapis\.com\/.*/i,
|
||||
handler: 'CacheFirst',
|
||||
options: { cacheName: 'google-fonts-cache', expiration: { maxEntries: 10, maxAgeSeconds: 60 * 60 * 24 * 365 } },
|
||||
},
|
||||
],
|
||||
},
|
||||
}),
|
||||
],
|
||||
|
||||
Reference in New Issue
Block a user