feat: add PWA — mobile multi-model chat app (Vite + React)
- Vite + React + TypeScript + Tailwind v4 - vite-plugin-pwa for service worker and manifest - Dark mode, borderless design with glow effects - Reuses Elec components, adapted for mobile viewport - Standalone-ready: can install to phone home screen Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
This commit is contained in:
33
PWA/vite.config.ts
Normal file
33
PWA/vite.config.ts
Normal file
@@ -0,0 +1,33 @@
|
||||
import { defineConfig } from 'vite'
|
||||
import react from '@vitejs/plugin-react'
|
||||
import { VitePWA } from 'vite-plugin-pwa'
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [
|
||||
react(),
|
||||
VitePWA({
|
||||
registerType: 'autoUpdate',
|
||||
manifest: {
|
||||
name: 'Elec',
|
||||
short_name: 'Elec',
|
||||
description: '多模型AI对话',
|
||||
theme_color: '#000000',
|
||||
background_color: '#000000',
|
||||
display: 'standalone',
|
||||
orientation: 'portrait',
|
||||
icons: [
|
||||
{
|
||||
src: '/icon-192.png',
|
||||
sizes: '192x192',
|
||||
type: 'image/png'
|
||||
},
|
||||
{
|
||||
src: '/icon-512.png',
|
||||
sizes: '512x512',
|
||||
type: 'image/png'
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
]
|
||||
})
|
||||
Reference in New Issue
Block a user