mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
This commit is contained in:
@@ -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");
|
||||
|
||||
Reference in New Issue
Block a user