🚨
This commit is contained in:
parent
125aa092c6
commit
259198a3d5
8 changed files with 10 additions and 11 deletions
|
@ -213,11 +213,11 @@ export const setTitle = (title: string) => {
|
|||
const versionTitle = title + " v" + Constants.SIYUAN_VERSION;
|
||||
document.title = versionTitle;
|
||||
dragElement.textContent = versionTitle;
|
||||
dragElement.setAttribute("title", versionTitle)
|
||||
dragElement.setAttribute("title", versionTitle);
|
||||
} else {
|
||||
document.title = title + " - " + window.siyuan.languages.siyuanNote + " v" + Constants.SIYUAN_VERSION;
|
||||
dragElement.textContent = title;
|
||||
dragElement.setAttribute("title", title)
|
||||
dragElement.setAttribute("title", title);
|
||||
}
|
||||
};
|
||||
|
||||
|
|
|
@ -381,7 +381,7 @@ export class Wnd {
|
|||
event.preventDefault();
|
||||
});
|
||||
}
|
||||
const containerElement = this.element.querySelector(".layout-tab-container")
|
||||
const containerElement = this.element.querySelector(".layout-tab-container");
|
||||
if (!containerElement.querySelector(".fn__flex-1")) {
|
||||
// empty center
|
||||
containerElement.append(tab.panelElement);
|
||||
|
|
|
@ -2,7 +2,6 @@ import {hasClosestByAttribute} from "../util/hasClosest";
|
|||
import {fetchPost} from "../../util/fetch";
|
||||
import {processRender} from "../util/processCode";
|
||||
import {highlightRender} from "./highlightRender";
|
||||
import {mediaRender} from "./mediaRender";
|
||||
import {Constants} from "../../constants";
|
||||
|
||||
export const blockRender = (protyle: IProtyle, element: Element) => {
|
||||
|
|
|
@ -1054,7 +1054,7 @@ export class Toolbar {
|
|||
languageElement.textContent = this.subElement.querySelector(".b3-list-item--focus").textContent;
|
||||
localStorage.setItem(Constants.LOCAL_CODELANG, languageElement.textContent);
|
||||
const editElement = getContenteditableElement(nodeElement);
|
||||
const lineNumber = nodeElement.getAttribute("linenumber")
|
||||
const lineNumber = nodeElement.getAttribute("linenumber");
|
||||
if (lineNumber === "true" || (lineNumber !== "false" && window.siyuan.config.editor.codeSyntaxHighlightLineNum)) {
|
||||
editElement.classList.add("protyle-linenumber");
|
||||
} else {
|
||||
|
@ -1120,7 +1120,7 @@ export class Toolbar {
|
|||
const nodeElement = hasClosestBlock(languageElement);
|
||||
if (nodeElement) {
|
||||
const editElement = getContenteditableElement(nodeElement);
|
||||
const lineNumber = nodeElement.getAttribute("linenumber")
|
||||
const lineNumber = nodeElement.getAttribute("linenumber");
|
||||
if (lineNumber === "true" || (lineNumber !== "false" && window.siyuan.config.editor.codeSyntaxHighlightLineNum)) {
|
||||
editElement.classList.add("protyle-linenumber");
|
||||
} else {
|
||||
|
|
|
@ -197,7 +197,7 @@ export class WYSIWYG {
|
|||
if (!nodeElement) {
|
||||
return;
|
||||
}
|
||||
const selectImgElement = nodeElement.querySelector(".img--select")
|
||||
const selectImgElement = nodeElement.querySelector(".img--select");
|
||||
let selectElements = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));
|
||||
if (selectElements.length === 0 && range.toString() === "" && !range.cloneContents().querySelector("img") &&
|
||||
!selectImgElement) {
|
||||
|
@ -266,7 +266,7 @@ export class WYSIWYG {
|
|||
if (!nodeElement) {
|
||||
return;
|
||||
}
|
||||
const selectImgElement = nodeElement.querySelector(".img--select")
|
||||
const selectImgElement = nodeElement.querySelector(".img--select");
|
||||
let selectElements = Array.from(protyle.wysiwyg.element.querySelectorAll(".protyle-wysiwyg--select"));
|
||||
if (selectElements.length === 0 && range.toString() === "" && !range.cloneContents().querySelector("img") &&
|
||||
!selectImgElement) {
|
||||
|
|
|
@ -465,7 +465,7 @@ export const keydown = (protyle: IProtyle, editorElement: HTMLElement) => {
|
|||
if (matchHotKey("⌘/", event)) {
|
||||
event.stopPropagation();
|
||||
event.preventDefault();
|
||||
const inlineElement = hasClosestByAttribute(range.startContainer, "data-type", null)
|
||||
const inlineElement = hasClosestByAttribute(range.startContainer, "data-type", null);
|
||||
if (inlineElement) {
|
||||
const type = inlineElement.getAttribute("data-type");
|
||||
if (type === "block-ref") {
|
||||
|
|
|
@ -179,7 +179,7 @@ const updateEmbed = (protyle: IProtyle, operation: IOperation) => {
|
|||
processRender(protyle.wysiwyg.element);
|
||||
highlightRender(protyle.wysiwyg.element);
|
||||
}
|
||||
}
|
||||
};
|
||||
|
||||
export const promiseTransactions = () => {
|
||||
window.siyuan.transactionsTimeout = window.setInterval(() => {
|
||||
|
|
|
@ -57,7 +57,7 @@ export class Tree {
|
|||
} else if (item.type === "backlink") {
|
||||
iconHTML = `<svg class="b3-list-item__graphic popover__block" data-id="${item.id}"><use xlink:href="#${getIconByType(item.nodeType, item.subType)}"></use></svg>`;
|
||||
} else if (item.type === "NodeHeading") {
|
||||
iconHTML = `<svg class="b3-list-item__graphic popover__block" data-id="${item.id}"><use xlink:href="#${getIconByType(item.type, item.subType)}"></use></svg>`
|
||||
iconHTML = `<svg class="b3-list-item__graphic popover__block" data-id="${item.id}"><use xlink:href="#${getIconByType(item.type, item.subType)}"></use></svg>`;
|
||||
}
|
||||
let countHTML = "";
|
||||
if (item.count) {
|
||||
|
|
Loading…
Add table
Reference in a new issue