feat: integrate Tauri v2 with Android widget and voice assistant
- Add Tauri v2 shell (Cargo, tauri.conf.json, capabilities, plugins) - Migrate all fetch() calls to apiFetch() for Tauri-aware HTTP - Migrate WebSocket endpoints to resolveEndpoints() for dynamic URLs - Add ServerConfigDialog for remote server URL configuration - Add tauri.ts lib with isTauri detection, apiFetch wrapper, plugin helpers - Add server-config Pinia store with persistence via plugin-store - Conditional PWA (disabled in Tauri builds) - Android: home screen transcript widget (last 5 messages, 30s refresh) - Android: voice command / share activity (SpeechRecognizer + WebSocket) - Android: signed release APK with auto-copy to installers/ - Remove stale frontend/src-tauri directory
This commit is contained in:
@@ -6,7 +6,10 @@ import path from 'path'
|
||||
|
||||
const __dirname = path.dirname(fileURLToPath(import.meta.url))
|
||||
|
||||
const isTauri = !!process.env.TAURI_ENV_PLATFORM
|
||||
|
||||
export default defineConfig({
|
||||
envPrefix: ['VITE_', 'TAURI_ENV_'],
|
||||
resolve: {
|
||||
alias: {
|
||||
'@': path.resolve(__dirname, 'src'),
|
||||
@@ -16,7 +19,8 @@ export default defineConfig({
|
||||
},
|
||||
plugins: [
|
||||
vue(),
|
||||
VitePWA({
|
||||
// PWA only in web builds (not Tauri)
|
||||
...(!isTauri ? [VitePWA({
|
||||
registerType: 'autoUpdate',
|
||||
includeAssets: ['favicon.svg', 'icons/*.svg', 'icons/*.png'],
|
||||
devOptions: {
|
||||
@@ -67,7 +71,7 @@ export default defineConfig({
|
||||
}
|
||||
]
|
||||
}
|
||||
})
|
||||
})] : [])
|
||||
],
|
||||
server: {
|
||||
port: 4100,
|
||||
|
||||
Reference in New Issue
Block a user