Migrate app from Tauri to Electron

Replace the Tauri/sidecar architecture with an Electron main process. Adds an electron/ directory (main, preload, handlers, core integrations for @xmcl/*), electron-builder.yml, TypeScript electron config and declarations, and updated IPC utilities (ipc.ts) so frontend uses ipcRenderer/ipcMain. Removes Tauri sidecar and src-tauri artifacts, deletes sidecar sources and keys, updates .gitignore, VSCode recommendations, package scripts and icons, and updates documentation (README, AGENTS, DEV) and frontend stores/apis to reflect the Electron-based architecture and config/auth persistence changes.
This commit is contained in:
2026-06-28 03:37:07 +08:00
parent 5b2e2860de
commit 9cb6a6e571
152 changed files with 8449 additions and 9562 deletions
+2 -6
View File
@@ -4,14 +4,13 @@ import {
downloadAndInstall,
type DownloadProgress,
} from "../api/update";
import type { Update } from "@tauri-apps/plugin-updater";
interface UpdateState {
checking: boolean;
downloading: boolean;
installed: boolean;
progress: DownloadProgress | null;
update: Update | null;
update: { version: string; releaseNotes?: string } | null;
error: string | null;
check: () => Promise<void>;
install: () => Promise<void>;
@@ -37,12 +36,9 @@ export const useUpdateStore = create<UpdateState>((set, get) => ({
},
install: async () => {
const { update } = get();
if (!update) return;
set({ downloading: true, error: null, progress: null });
try {
await downloadAndInstall(update, (progress) => {
await downloadAndInstall((progress) => {
set({ progress });
});
set({ downloading: false, installed: true });