🐛 toolbar

This commit is contained in:
Vanessa 2022-09-26 22:02:05 +08:00
parent 5162792372
commit e323f07ccc
2 changed files with 7 additions and 3 deletions

View file

@ -86,7 +86,7 @@ const renderPDF = (id: string) => {
webSecurity: false,
},
});
window.siyuan.printWin.webContents.userAgent = 'SiYuan/' + app.getVersion() + ' https://b3log.org/siyuan Electron'
window.siyuan.printWin.webContents.userAgent = `SiYuan/${app.getVersion()} https://b3log.org/siyuan Electron`
let pdfWidth = "";
if (localData.pageSize === "A3") {

View file

@ -127,10 +127,14 @@ export class Toolbar {
});
const types = this.getCurrentType();
types.forEach(item => {
if (["search-mark", "a", "block-ref", "virtual-block-ref", "text", "file-annotation-ref", "inline-math", "inline-memo", ""].includes(item)) {
if (["search-mark", "a", "block-ref", "virtual-block-ref", "text", "file-annotation-ref", "inline-math",
"inline-memo", "", "backslash"].includes(item)) {
return;
}
this.element.querySelector(`[data-type="${item}"]`).classList.add("protyle-toolbar__item--current");
const itemElement = this.element.querySelector(`[data-type="${item}"]`);
if (itemElement) {
itemElement.classList.add("protyle-toolbar__item--current");
}
});
}