mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-18 15:40:12 +01:00
This commit is contained in:
parent
ebbf05a712
commit
e837fc315a
1 changed files with 9 additions and 9 deletions
|
|
@ -106,10 +106,9 @@ export const initNavigationMenu = (liElement: HTMLElement) => {
|
||||||
shell.openPath(path.join(window.siyuan.config.system.dataDir, notebookId));
|
shell.openPath(path.join(window.siyuan.config.system.dataDir, notebookId));
|
||||||
}
|
}
|
||||||
}).element);
|
}).element);
|
||||||
if (!window.siyuan.config.readonly) {
|
|
||||||
genImportMenu(notebookId, "/");
|
|
||||||
}
|
|
||||||
/// #endif
|
/// #endif
|
||||||
|
genImportMenu(notebookId, "/");
|
||||||
|
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
label: window.siyuan.languages.export,
|
label: window.siyuan.languages.export,
|
||||||
type: "submenu",
|
type: "submenu",
|
||||||
|
|
@ -297,16 +296,14 @@ export const initFileMenu = (notebookId: string, pathString: string, liElement:
|
||||||
submenu: openSubmenus,
|
submenu: openSubmenus,
|
||||||
}).element);
|
}).element);
|
||||||
/// #endif
|
/// #endif
|
||||||
if (!window.siyuan.config.readonly) {
|
genImportMenu(notebookId, pathString);
|
||||||
genImportMenu(notebookId, pathString);
|
|
||||||
}
|
|
||||||
window.siyuan.menus.menu.append(exportMd(id));
|
window.siyuan.menus.menu.append(exportMd(id));
|
||||||
return window.siyuan.menus.menu;
|
return window.siyuan.menus.menu;
|
||||||
};
|
};
|
||||||
|
|
||||||
const genImportMenu = (notebookId: string, pathString: string) => {
|
const genImportMenu = (notebookId: string, pathString: string) => {
|
||||||
/// #if !BROWSER
|
|
||||||
if (!window.siyuan.config.readonly) {
|
if (!window.siyuan.config.readonly) {
|
||||||
|
/// #if !BROWSER
|
||||||
const importstdmd = (label: string, isDoc?: boolean) => {
|
const importstdmd = (label: string, isDoc?: boolean) => {
|
||||||
return {
|
return {
|
||||||
icon: isDoc ? "iconMarkdown" : "iconFolder",
|
icon: isDoc ? "iconMarkdown" : "iconFolder",
|
||||||
|
|
@ -332,6 +329,7 @@ const genImportMenu = (notebookId: string, pathString: string) => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
/// #endif
|
||||||
window.siyuan.menus.menu.append(new MenuItem({
|
window.siyuan.menus.menu.append(new MenuItem({
|
||||||
icon: "iconDownload",
|
icon: "iconDownload",
|
||||||
label: window.siyuan.languages.import,
|
label: window.siyuan.languages.import,
|
||||||
|
|
@ -348,9 +346,11 @@ const genImportMenu = (notebookId: string, pathString: string) => {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
/// #if !BROWSER
|
||||||
importstdmd("Markdown " + window.siyuan.languages.doc, true),
|
importstdmd("Markdown " + window.siyuan.languages.doc, true),
|
||||||
importstdmd("Markdown " + window.siyuan.languages.folder)],
|
importstdmd("Markdown " + window.siyuan.languages.folder)
|
||||||
|
/// #endif
|
||||||
|
],
|
||||||
}).element);
|
}).element);
|
||||||
}
|
}
|
||||||
/// #endif
|
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue