mirror of
https://gitee.com/spark-store-project/spark-store
synced 2026-04-26 09:20:18 +08:00
feat: 修改应用信息界面,对于已安装应用,安装按钮变为打开按钮,并添加卸载按钮
This commit is contained in:
@@ -12,7 +12,7 @@ export function removeDownloadItem(pkgname: string) {
|
||||
}
|
||||
}
|
||||
|
||||
export function watchDownloadsChange(cb: () => void) {
|
||||
export function watchDownloadsChange(cb: (pkgname: string) => void) {
|
||||
const statusById = new Map<number, DownloadItemStatus>();
|
||||
|
||||
for (const item of downloads.value) {
|
||||
@@ -25,7 +25,7 @@ export function watchDownloadsChange(cb: () => void) {
|
||||
for (const item of list) {
|
||||
const prevStatus = statusById.get(item.id);
|
||||
if (item.status === "completed" && prevStatus !== "completed") {
|
||||
cb();
|
||||
cb(item.pkgname);
|
||||
}
|
||||
statusById.set(item.id, item.status);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user