Migrate to Electron and implement native PDF export
Major changes: - Migrate from Tauri to Electron as primary desktop runtime - Implement native print dialog for PDF export via Electron webview - Add desktop runtime abstraction layer (supports both Electron and Tauri) - Implement task list rendering in preview mode - Add favorite notes sorting to display starred notes at top - Add attachment upload functionality with file picker - Improve sync reliability and Unicode filename support - Add category color sync across devices via WebDAV - Update documentation for Electron workflow Technical improvements: - Add Electron main process and preload bridge - Create desktop service layer for runtime-agnostic operations - Implement runtimeFetch for proxying network requests through Electron - Add PrintView component for native print rendering - Extract print/PDF utilities to shared module - Update build configuration for Electron integration
This commit is contained in:
@@ -5,8 +5,9 @@ import react from "@vitejs/plugin-react";
|
||||
const host = process.env.TAURI_DEV_HOST;
|
||||
|
||||
// https://vite.dev/config/
|
||||
export default defineConfig(async () => ({
|
||||
export default defineConfig(async ({ command }) => ({
|
||||
plugins: [react()],
|
||||
base: command === "build" ? "./" : "/",
|
||||
|
||||
// Vite options tailored for Tauri development and only applied in `tauri dev` or `tauri build`
|
||||
//
|
||||
@@ -17,6 +18,10 @@ export default defineConfig(async () => ({
|
||||
port: 1420,
|
||||
strictPort: true,
|
||||
host: host || false,
|
||||
headers: {
|
||||
"Content-Security-Policy":
|
||||
"default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data: blob: https: http:; font-src 'self' data:; connect-src 'self' https: http: ws: wss:; object-src 'none'; base-uri 'self'; frame-ancestors 'none'",
|
||||
},
|
||||
hmr: host
|
||||
? {
|
||||
protocol: "ws",
|
||||
|
||||
Reference in New Issue
Block a user