fix: pass app origin to remove-installed ipc in UninstallConfirmModal

When triggering the uninstall process from the uninstall confirmation modal,
only the package name string was passed. This caused the backend to
default the origin to 'spark', which meant APM applications were incorrectly
attempted to be uninstalled using `aptss remove` instead of `apm remove`.

This commit changes the `remove-installed` ipc payload in
`UninstallConfirmModal.vue` to an object containing both `pkgname` and
`origin`, ensuring the backend correctly routes the uninstallation
through the APM package manager with `pkexec` when needed.
This commit is contained in:
vmomenv
2026-03-12 06:55:48 +00:00
parent c81871f00b
commit 3995d2bbc0

View File

@@ -143,7 +143,10 @@ const confirmUninstall = () => {
uninstalling.value = true;
logs.value = ["正在请求卸载: " + appPkg.value + "..."];
window.ipcRenderer.send("remove-installed", appPkg.value);
window.ipcRenderer.send("remove-installed", {
pkgname: appPkg.value,
origin: props.app?.origin || "spark",
});
};
// Listeners