This commit is contained in:
Vanessa 2022-10-17 11:43:33 +08:00
parent c5e3a6ecf4
commit 31d699ae7e
5 changed files with 98 additions and 91 deletions

View file

@ -118,6 +118,9 @@ export class Background {
});
});
this.element.addEventListener(getEventName(), (event) => {
if (protyle.disabled) {
return;
}
let target = event.target as HTMLElement;
hideElements(["gutter"], protyle);

View file

@ -276,7 +276,7 @@ export class Title {
type: "submenu",
submenu: copySubMenu(protyle.block.rootID)
}).element);
if (!window.siyuan.config.readonly) {
if (protyle.disabled) {
window.siyuan.menus.menu.append(movePathToMenu(protyle.notebookId, protyle.path));
window.siyuan.menus.menu.append(new MenuItem({
icon: "iconTrashcan",
@ -285,8 +285,6 @@ export class Title {
deleteFile(protyle.notebookId, protyle.path, escapeHtml(this.editElement.textContent));
}
}).element);
}
if (!window.siyuan.config.readonly && !window.siyuan.config.editor.readOnly) {
window.siyuan.menus.menu.append(new MenuItem({type: "separator"}).element);
window.siyuan.menus.menu.append(new MenuItem({
label: window.siyuan.languages.attr,