mirror of
https://github.com/dream-pep/koring-launcher.git
synced 2026-09-12 05:45:18 +08:00
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:
@@ -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 });
|
||||
|
||||
Reference in New Issue
Block a user