mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 09:20:18 +08:00
fix:修复商店无法调起apm软件的问题
This commit is contained in:
@@ -913,12 +913,12 @@ const closeDownloadDetail = () => {
|
||||
currentDownload.value = null;
|
||||
};
|
||||
|
||||
const openDownloadedApp = (pkgname: string) => {
|
||||
const openDownloadedApp = (pkgname: string, origin?: "spark" | "apm") => {
|
||||
// const encodedPkg = encodeURIComponent(download.pkgname);
|
||||
// openApmStoreUrl(`apmstore://launch?pkg=${encodedPkg}`, {
|
||||
// fallbackText: `打开应用: ${download.pkgname}`
|
||||
// });
|
||||
window.ipcRenderer.invoke("launch-app", pkgname);
|
||||
window.ipcRenderer.invoke("launch-app", { pkgname, origin });
|
||||
};
|
||||
|
||||
const loadCategories = async () => {
|
||||
|
||||
@@ -109,7 +109,7 @@
|
||||
<button
|
||||
type="button"
|
||||
class="inline-flex items-center gap-2 rounded-2xl bg-gradient-to-r from-brand to-brand-dark px-4 py-2 text-sm font-semibold text-white shadow-lg transition hover:-translate-y-0.5"
|
||||
@click="emit('open-app', displayApp?.pkgname || '')"
|
||||
@click="emit('open-app', displayApp?.pkgname || '', displayApp?.origin)"
|
||||
>
|
||||
<i class="fas fa-external-link-alt"></i>
|
||||
<span>打开</span>
|
||||
@@ -273,7 +273,7 @@ const emit = defineEmits<{
|
||||
(e: "install", app: App): void;
|
||||
(e: "remove", app: App): void;
|
||||
(e: "open-preview", index: number): void;
|
||||
(e: "open-app", pkgname: string): void;
|
||||
(e: "open-app", pkgname: string, origin?: "spark" | "apm"): void;
|
||||
(e: "check-install", app: App): void;
|
||||
}>();
|
||||
|
||||
|
||||
@@ -223,7 +223,7 @@ const emit = defineEmits<{
|
||||
(e: "resume", download: DownloadItem): void;
|
||||
(e: "cancel", download: DownloadItem): void;
|
||||
(e: "retry", download: DownloadItem): void;
|
||||
(e: "open-app", download: string): void;
|
||||
(e: "open-app", pkgname: string, origin?: "spark" | "apm"): void;
|
||||
}>();
|
||||
|
||||
const close = () => {
|
||||
@@ -248,7 +248,7 @@ const retry = () => {
|
||||
|
||||
const openApp = () => {
|
||||
if (props.download) {
|
||||
emit("open-app", props.download.pkgname);
|
||||
emit("open-app", props.download.pkgname, props.download.origin);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user