This commit is contained in:
Vanessa 2023-03-13 15:16:26 +08:00
parent 002b5adf16
commit 38f0b0f469
2 changed files with 6 additions and 6 deletions

View file

@ -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");