af9e7ce1af
- 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>
44 lines
1.5 KiB
JavaScript
44 lines
1.5 KiB
JavaScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
|
|
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: {
|
|
name: 'Осколкам.Нет',
|
|
short_name: 'Осколкам',
|
|
description: 'Панель управления — бронирование стекол',
|
|
theme_color: '#4361EE',
|
|
background_color: '#F5F7FA',
|
|
display: 'standalone',
|
|
start_url: '/admin/kanban',
|
|
scope: '/',
|
|
orientation: 'portrait-primary',
|
|
icons: [
|
|
{ src: 'pwa-64x64.png', sizes: '64x64', type: 'image/png' },
|
|
{ src: 'pwa-192x192.png', sizes: '192x192', type: 'image/png' },
|
|
{ src: 'pwa-512x512.png', sizes: '512x512', type: 'image/png' },
|
|
{ src: 'maskable-icon-512x512.png', sizes: '512x512', type: 'image/png', purpose: 'maskable' },
|
|
],
|
|
},
|
|
injectManifest: {
|
|
globPatterns: ['**/*.{js,css,html,ico,png,svg,woff2}'],
|
|
},
|
|
}),
|
|
],
|
|
test: {
|
|
environment: 'jsdom',
|
|
globals: true,
|
|
setupFiles: ['./src/test/setup.js'],
|
|
},
|
|
})
|