mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-06 16:58:49 +01:00
🐛 toolbar
This commit is contained in:
parent
5162792372
commit
e323f07ccc
2 changed files with 7 additions and 3 deletions
|
|
@ -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") {
|
||||
|
|
|
|||
|
|
@ -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");
|
||||
}
|
||||
});
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue