From 38f0b0f469d1730fa10b2afd301ab7facd21b6b8 Mon Sep 17 00:00:00 2001 From: Vanessa Date: Mon, 13 Mar 2023 15:16:26 +0800 Subject: [PATCH] :art: fix https://github.com/siyuan-note/siyuan/issues/7640 --- app/src/dialog/processSystem.ts | 9 ++++++--- app/src/window/index.ts | 3 --- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/app/src/dialog/processSystem.ts b/app/src/dialog/processSystem.ts index d0b85f5a6..2e6fbe86f 100644 --- a/app/src/dialog/processSystem.ts +++ b/app/src/dialog/processSystem.ts @@ -319,11 +319,14 @@ export const setTitle = (title: string) => { }; export const downloadProgress = (data: { id: string, percent: number }) => { - const bazzarElement = document.getElementById("configBazaarReadme"); - if (!bazzarElement) { + const bazzarSideElement = document.querySelector("#configBazaarReadme .item__side"); + if (!bazzarSideElement) { return; } - const btnElement = bazzarElement.querySelector('[data-type="install"]') as HTMLElement; + if (data.id !== JSON.parse(bazzarSideElement.getAttribute("data-obj")).repoURL) { + return; + } + const btnElement = bazzarSideElement.querySelector('[data-type="install"]') as HTMLElement; if (btnElement) { if (data.percent >= 1) { btnElement.parentElement.classList.add("fn__none"); diff --git a/app/src/window/index.ts b/app/src/window/index.ts index e2ecc0ab9..c05b6ed5e 100644 --- a/app/src/window/index.ts +++ b/app/src/window/index.ts @@ -90,9 +90,6 @@ class App { case "statusbar": progressStatus(data); break; - case "downloadProgress": - downloadProgress(data.data); - break; case "txerr": transactionError(data); break;