refactor: migrate PDF export to desktop runtime abstraction

- Extract desktop-specific logic into src/services/desktop.ts
- Add runtime detection for Electron vs Tauri environments
- Simplify NoteEditor by delegating PDF export to desktop service
- Update printExport.ts to remove unused storage helpers
- Add Electron main process files in electron/ directory
- Update vite config and types for Electron integration
- Update .gitignore and package.json for Electron workflow
This commit is contained in:
drelich
2026-04-05 22:13:06 +02:00
parent e93ce566d3
commit 06b4cc4514
14 changed files with 2388 additions and 101 deletions

View File

@@ -3,9 +3,14 @@
"private": true,
"version": "0.2.2",
"type": "module",
"main": "electron/main.cjs",
"scripts": {
"dev": "vite",
"dev:renderer": "vite",
"dev:electron": "wait-on tcp:1420 && cross-env ELECTRON_RENDERER_URL=http://localhost:1420 electron .",
"dev:desktop": "concurrently -k \"npm:dev:renderer\" \"npm:dev:electron\"",
"build": "tsc && vite build",
"desktop": "electron .",
"preview": "vite preview",
"tauri": "tauri"
},
@@ -34,9 +39,13 @@
"@types/turndown": "^5.0.6",
"@vitejs/plugin-react": "^4.6.0",
"autoprefixer": "^10.4.27",
"concurrently": "^9.2.1",
"cross-env": "^10.1.0",
"electron": "^37.3.1",
"postcss": "^8.5.8",
"tailwindcss": "^3.4.19",
"typescript": "~5.8.3",
"vite": "^7.0.4"
"vite": "^7.0.4",
"wait-on": "^8.0.5"
}
}