feat(frontend): use Wails bindings for file I/O
Replace hidden file inputs and anchor downloads with native open/save dialogs via a thin platform layer. WAV export sends base64 audio data to the Go backend for writing to the user-chosen path. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -4,6 +4,7 @@ import { fileURLToPath } from 'node:url'
|
||||
import type { IncomingMessage, ServerResponse } from 'node:http'
|
||||
import { defineConfig, type Connect, type Plugin } from 'vite'
|
||||
import { svelte } from '@sveltejs/vite-plugin-svelte'
|
||||
import wails from '@wailsio/runtime/plugins/vite'
|
||||
|
||||
const repoRoot = resolve(fileURLToPath(import.meta.url), '../..')
|
||||
const assetsDir = resolve(repoRoot, 'assets')
|
||||
@@ -49,8 +50,11 @@ function serveRepoAssets(): Plugin {
|
||||
}
|
||||
|
||||
export default defineConfig({
|
||||
plugins: [svelte(), serveRepoAssets()],
|
||||
plugins: [svelte(), wails('./bindings'), serveRepoAssets()],
|
||||
server: {
|
||||
host: '127.0.0.1',
|
||||
port: Number(process.env.WAILS_VITE_PORT) || 5173,
|
||||
strictPort: true,
|
||||
fs: {
|
||||
allow: [repoRoot],
|
||||
},
|
||||
|
||||
Reference in New Issue
Block a user