Skip to content

Commit

Permalink
🎨 fix #8322
Browse files Browse the repository at this point in the history
  • Loading branch information
Vanessa219 committed May 22, 2023
1 parent 2c7a58d commit 7d41575
Show file tree
Hide file tree
Showing 5 changed files with 18 additions and 7 deletions.
2 changes: 1 addition & 1 deletion app/src/block/Panel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export class BlockPanel {
pinElement.classList.add("block__icon--active");
pinElement.setAttribute("aria-label", window.siyuan.languages.unpin);
this.element.setAttribute("data-pin", "true");
})
});
/// #endif
this.render();
}
Expand Down
13 changes: 12 additions & 1 deletion app/src/config/bazaar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -491,8 +491,19 @@ export const bazaar = {
});
return;
}
bazaar._genMyHTML(bazaarType, app);
bazaar._onBazaar(response, bazaarType, ["themes", "icons"].includes(bazaarType));
bazaar._genMyHTML(bazaarType, app);
if (bazaarType === "plugins") {
confirmDialog(window.siyuan.languages.confirm, window.siyuan.languages.enablePluginTip, () => {
fetchPost("/api/petal/setPetalEnabled", {
packageName: dataObj.name,
enabled: true,
}, (response) => {
loadPlugin(app, response.data);
bazaar._genMyHTML(bazaarType, app);
});
});
}
});
}
event.preventDefault();
Expand Down
6 changes: 3 additions & 3 deletions app/src/dialog/moveResize.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@ import {Constants} from "../constants";
export const moveResize = (element: HTMLElement, afterCB?: (type: string) => void) => {
element.addEventListener("mousedown", (event: MouseEvent & { target: HTMLElement }) => {
let iconsElement = hasClosestByClassName(event.target, "resize__move");
let x: number
let y: number
let x: number;
let y: number;
const elementRect = element.getBoundingClientRect();
if (!iconsElement) {
x = event.clientX;
Expand Down Expand Up @@ -124,4 +124,4 @@ export const moveResize = (element: HTMLElement, afterCB?: (type: string) => voi
}
};
});
}
};
2 changes: 1 addition & 1 deletion app/src/layout/dock/Tag.ts
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ export class Tag extends Model {
openGlobalSearch(app, `#${element.getAttribute("data-label")}#`, !window.siyuan.ctrlIsPressed);
},
rightClick: (element: HTMLElement, event: MouseEvent) => {
openTagMenu(element, event, element.getAttribute("data-label"))
openTagMenu(element, event, element.getAttribute("data-label"));
},
blockExtHTML: window.siyuan.config.readonly ? undefined : '<span class="b3-list-item__action"><svg><use xlink:href="#iconMore"></use></svg></span>',
topExtHTML: window.siyuan.config.readonly ? undefined : '<span class="b3-list-item__action"><svg><use xlink:href="#iconMore"></use></svg></span>'
Expand Down
2 changes: 1 addition & 1 deletion app/src/util/mount.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ import {showMessage} from "../dialog/message";
import {isMobile} from "./functions";
import {fetchPost} from "./fetch";
import {Dialog} from "../dialog";
import {getNotebookName, getOpenNotebookCount} from "./pathName";
import {getOpenNotebookCount} from "./pathName";
import {validateName} from "../editor/rename";
import {setStorageVal} from "../protyle/util/compatibility";

Expand Down

0 comments on commit 7d41575

Please sign in to comment.