mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-06-25 15:43:49 +08:00
feat: 添加APM安装确认弹窗并重构APM检查流程
1. 新增全局状态控制APM安装弹窗显示 2. 新建ApmInstallConfirmModal弹窗组件 3. 将主进程的APM安装弹窗逻辑迁移到前端Vue组件 4. 更新package.json版本到5.1.0 5. 简化安装和升级流程中的APM检查逻辑
This commit is contained in:
@@ -5,6 +5,7 @@ import {
|
||||
currentApp,
|
||||
currentAppSparkInstalled,
|
||||
currentAppApmInstalled,
|
||||
showApmInstallDialog,
|
||||
} from "../global/storeConfig";
|
||||
import { APM_STORE_BASE_URL } from "../global/storeConfig";
|
||||
import { downloads, getNextDownloadId } from "../global/downloadStatus";
|
||||
@@ -28,14 +29,8 @@ export const handleInstall = async (appObj?: App) => {
|
||||
if (targetApp.origin === "apm") {
|
||||
const hasApm = await window.ipcRenderer.invoke("check-apm-available");
|
||||
if (!hasApm) {
|
||||
// 发送事件到主进程显示 APM 安装对话框
|
||||
const { success, cancelled } = await window.ipcRenderer.invoke(
|
||||
"show-apm-install-dialog",
|
||||
);
|
||||
if (!success || cancelled) {
|
||||
// 用户取消或未安装成功,不继续安装应用
|
||||
return;
|
||||
}
|
||||
showApmInstallDialog.value = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
@@ -119,14 +114,8 @@ export const handleUpgrade = async (app: App) => {
|
||||
if (app.origin === "apm") {
|
||||
const hasApm = await window.ipcRenderer.invoke("check-apm-available");
|
||||
if (!hasApm) {
|
||||
// 发送事件到主进程显示 APM 安装对话框
|
||||
const { success, cancelled } = await window.ipcRenderer.invoke(
|
||||
"show-apm-install-dialog",
|
||||
);
|
||||
if (!success || cancelled) {
|
||||
// 用户取消或未安装成功,不继续更新应用
|
||||
return;
|
||||
}
|
||||
showApmInstallDialog.value = true;
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user