mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-03 11:20:16 +01:00
This commit is contained in:
parent
fddb7a8e72
commit
a655a02ce4
6 changed files with 107 additions and 33 deletions
|
|
@ -314,12 +314,12 @@ export const disabledProtyle = (protyle: IProtyle) => {
|
|||
if (protyle.breadcrumb) {
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="readonly"] use').setAttribute("xlink:href", "#iconLock");
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="readonly"]').setAttribute("aria-label", window.siyuan.config.editor.readOnly ? window.siyuan.languages.tempUnlock : window.siyuan.languages.unlockEdit);
|
||||
const undoElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="undo"]')
|
||||
const undoElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="undo"]');
|
||||
if (undoElement && !undoElement.classList.contains("fn__none")) {
|
||||
undoElement.classList.add("fn__none")
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="redo"]').classList.add("fn__none")
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="indent"]').classList.add("fn__none")
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="outdent"]').classList.add("fn__none")
|
||||
undoElement.classList.add("fn__none");
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="redo"]').classList.add("fn__none");
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="indent"]').classList.add("fn__none");
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="outdent"]').classList.add("fn__none");
|
||||
}
|
||||
}
|
||||
hideTooltip();
|
||||
|
|
@ -364,12 +364,12 @@ export const enableProtyle = (protyle: IProtyle) => {
|
|||
if (protyle.breadcrumb) {
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="readonly"] use').setAttribute("xlink:href", "#iconUnlock");
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="readonly"]').setAttribute("aria-label", window.siyuan.config.editor.readOnly ? window.siyuan.languages.cancelTempUnlock : window.siyuan.languages.lockEdit);
|
||||
const undoElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="undo"]')
|
||||
const undoElement = protyle.breadcrumb.element.parentElement.querySelector('[data-type="undo"]');
|
||||
if (undoElement && undoElement.classList.contains("fn__none")) {
|
||||
undoElement.classList.remove("fn__none")
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="redo"]').classList.remove("fn__none")
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="indent"]').classList.remove("fn__none")
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="outdent"]').classList.remove("fn__none")
|
||||
undoElement.classList.remove("fn__none");
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="redo"]').classList.remove("fn__none");
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="indent"]').classList.remove("fn__none");
|
||||
protyle.breadcrumb.element.parentElement.querySelector('[data-type="outdent"]').classList.remove("fn__none");
|
||||
}
|
||||
}
|
||||
hideTooltip();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue