19c686b4be
- user-select:none global (index.css) + reset sur input/textarea/select - ItemRow: swipe gauche → édition (fond bleu), suppression long press, bouton ✕ toujours visible sur mobile - SwipeableRow: prop onSwipeLeft, révèle rightContent entre seuil/2 et seuil, déclenche onSwipeLeft au seuil complet - TodosPage: onSwipeLeft → édition (remplace double-tap) - inputMode=decimal sur tous les champs quantité et prix - formatQty: affiche "2" au lieu de "2.000" - Versionnage: __APP_VERSION__ injecté par Vite depuis package.json v0.4.0 - HomePage: version affichée à côté du titre (v0.4.0) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
50 lines
1.4 KiB
TypeScript
50 lines
1.4 KiB
TypeScript
import { defineConfig } from 'vite'
|
|
import react from '@vitejs/plugin-react'
|
|
import { VitePWA } from 'vite-plugin-pwa'
|
|
import pkg from './package.json'
|
|
|
|
export default defineConfig({
|
|
define: {
|
|
__APP_VERSION__: JSON.stringify(pkg.version),
|
|
},
|
|
plugins: [
|
|
react(),
|
|
VitePWA({
|
|
registerType: 'autoUpdate',
|
|
workbox: {
|
|
globPatterns: ['**/*.{js,css,html,ico,png,svg,webp,woff2}'],
|
|
runtimeCaching: [
|
|
{
|
|
urlPattern: /^\/api\//,
|
|
handler: 'NetworkFirst',
|
|
options: {
|
|
cacheName: 'api-cache',
|
|
expiration: { maxEntries: 100, maxAgeSeconds: 86400 },
|
|
},
|
|
},
|
|
],
|
|
},
|
|
manifest: {
|
|
name: 'HomeHub',
|
|
short_name: 'HomeHub',
|
|
description: 'Organisation personnelle auto-hébergée',
|
|
theme_color: '#fe8019',
|
|
background_color: '#2a231d',
|
|
display: 'standalone',
|
|
orientation: 'portrait-primary',
|
|
start_url: '/',
|
|
icons: [
|
|
{ src: '/icons/icon-192.png', sizes: '192x192', type: 'image/png' },
|
|
{ src: '/icons/icon-512.png', sizes: '512x512', type: 'image/png', purpose: 'any maskable' },
|
|
],
|
|
},
|
|
}),
|
|
],
|
|
server: {
|
|
proxy: {
|
|
'/api': { target: 'http://localhost:8000', changeOrigin: true },
|
|
'/media': { target: 'http://localhost:8000', changeOrigin: true },
|
|
},
|
|
},
|
|
})
|