mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-21 15:56:10 +01:00
This commit is contained in:
parent
1569435890
commit
9ea9b62c6b
2 changed files with 14 additions and 1 deletions
|
|
@ -17,6 +17,7 @@ import {getRecentDocs} from "./getRecentDocs";
|
|||
import {initEditor} from "../settings/editor";
|
||||
import {App} from "../../index";
|
||||
import {isHuawei, isInAndroid, isInIOS} from "../../protyle/util/compatibility";
|
||||
import {newFile} from "../../util/newFile";
|
||||
|
||||
export const popMenu = () => {
|
||||
activeBlur();
|
||||
|
|
@ -61,6 +62,9 @@ export const initRightMenu = (app: App) => {
|
|||
<div class="b3-menu__item${window.siyuan.config.readonly ? " fn__none" : ""}" id="menuSyncNow">
|
||||
<svg class="b3-menu__icon"><use xlink:href="#iconCloudSucc"></use></svg><span class="b3-menu__label">${window.siyuan.languages.syncNow}</span>
|
||||
</div>
|
||||
<div class="b3-menu__item${window.siyuan.config.readonly ? " fn__none" : ""}" id="menuNewDoc">
|
||||
<svg class="b3-menu__icon"><use xlink:href="#iconFile"></use></svg><span class="b3-menu__label">${window.siyuan.languages.newFile}</span>
|
||||
</div>
|
||||
<div class="b3-menu__item${window.siyuan.config.readonly ? " fn__none" : ""}" id="menuNewNotebook">
|
||||
<svg class="b3-menu__icon"><use xlink:href="#iconFilesRoot"></use></svg><span class="b3-menu__label">${window.siyuan.languages.newNotebook}</span>
|
||||
</div>
|
||||
|
|
@ -174,6 +178,15 @@ export const initRightMenu = (app: App) => {
|
|||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (target.id === "menuNewDoc") {
|
||||
newFile({
|
||||
app,
|
||||
useSavePath: true
|
||||
});
|
||||
closePanel();
|
||||
event.preventDefault();
|
||||
event.stopPropagation();
|
||||
break;
|
||||
} else if (target.id === "menuHelp") {
|
||||
mountHelp();
|
||||
event.preventDefault();
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ import {loadPlugins} from "../../plugin/loader";
|
|||
|
||||
export const initFramework = async (app: App) => {
|
||||
setInlineStyle();
|
||||
await loadPlugins(this);
|
||||
await loadPlugins(app);
|
||||
renderSnippet();
|
||||
initKeyboardToolbar();
|
||||
const sidebarElement = document.getElementById("sidebar");
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue