mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-04 20:00:17 +01:00
This commit is contained in:
parent
2c476118c3
commit
1088cf163b
3 changed files with 91 additions and 4 deletions
|
|
@ -28,6 +28,7 @@ import {newFile} from "../../util/newFile";
|
|||
import {afterLoadPlugin} from "../../plugin/loader";
|
||||
import {commandPanel} from "../../boot/globalEvent/command/panel";
|
||||
import {openTopBarMenu} from "../../plugin/openTopBarMenu";
|
||||
import {initFileTree} from "../settings/fileTree";
|
||||
|
||||
export const popMenu = () => {
|
||||
activeBlur();
|
||||
|
|
@ -103,6 +104,9 @@ export const initRightMenu = (app: App) => {
|
|||
<div class="b3-menu__item${window.siyuan.config.readonly ? " fn__none" : ""}" id="menuEditor">
|
||||
<svg class="b3-menu__icon"><use xlink:href="#iconEdit"></use></svg><span class="b3-menu__label">${window.siyuan.languages.editor}</span>
|
||||
</div>
|
||||
<div class="b3-menu__item${window.siyuan.config.readonly ? " fn__none" : ""}" id="menuFileTree">
|
||||
<svg class="b3-menu__icon"><use xlink:href="#iconFiles"></use></svg><span class="b3-menu__label">${window.siyuan.languages.fileTree}</span>
|
||||
</div>
|
||||
<div class="b3-menu__item${window.siyuan.config.readonly ? " fn__none" : ""}" id="menuRiffCard">
|
||||
<svg class="b3-menu__icon"><use xlink:href="#iconRiffCard"></use></svg><span class="b3-menu__label">${window.siyuan.languages.riffCard}</span>
|
||||
</div>
|
||||
|
|
@ -177,6 +181,11 @@ export const initRightMenu = (app: App) => {
|
|||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (target.id === "menuFileTree") {
|
||||
initFileTree();
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (target.id === "menuSafeQuit") {
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue