mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-20 08:30:12 +01:00
This commit is contained in:
parent
0ee6f5299e
commit
844c5ce688
3 changed files with 6 additions and 4 deletions
|
|
@ -1,7 +1,6 @@
|
|||
import {copySubMenu, exportMd, movePathToMenu, openFileAttr, renameMenu,} from "./commonMenuItem";
|
||||
/// #if !BROWSER
|
||||
import {FileFilter, shell} from "electron";
|
||||
import {dialog as remoteDialog} from "@electron/remote";
|
||||
import {FileFilter, ipcRenderer, shell} from "electron";
|
||||
import * as path from "path";
|
||||
/// #endif
|
||||
import {MenuItem} from "./Menu";
|
||||
|
|
@ -643,7 +642,7 @@ export const genImportMenu = (notebookId: string, pathString: string) => {
|
|||
if (isDoc) {
|
||||
filters = [{name: "Markdown", extensions: ["md", "markdown"]}];
|
||||
}
|
||||
const localPath = await remoteDialog.showOpenDialog({
|
||||
const localPath = await ipcRenderer.invoke(Constants.SIYUAN_DIALOG, {
|
||||
defaultPath: window.siyuan.config.system.homeDir,
|
||||
filters,
|
||||
properties: [isDoc ? "openFile" : "openDirectory"],
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue