mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-10 09:14:20 +01:00
This commit is contained in:
parent
6f58d1387f
commit
e949458180
3 changed files with 6 additions and 11 deletions
|
|
@ -111,10 +111,9 @@ export const onGetConfig = (isStart: boolean, app: App) => {
|
|||
});
|
||||
}
|
||||
/// #if !BROWSER
|
||||
ipcRenderer.send(Constants.SIYUAN_INIT, {
|
||||
ipcRenderer.invoke(Constants.SIYUAN_INIT, {
|
||||
languages: window.siyuan.languages["_trayMenu"],
|
||||
workspaceDir: window.siyuan.config.system.workspaceDir,
|
||||
id: getCurrentWindow().id,
|
||||
port: location.port
|
||||
});
|
||||
webFrame.setZoomFactor(window.siyuan.storage[Constants.LOCAL_ZOOM]);
|
||||
|
|
|
|||
|
|
@ -1,7 +1,6 @@
|
|||
import {layoutToJSON} from "../layout/util";
|
||||
/// #if !BROWSER
|
||||
import {ipcRenderer} from "electron";
|
||||
import {getCurrentWindow} from "@electron/remote";
|
||||
/// #endif
|
||||
import {Constants} from "../constants";
|
||||
import {Tab} from "../layout/Tab";
|
||||
|
|
@ -25,7 +24,6 @@ export const openNewWindow = (tab: Tab, options: windowOptions = {}) => {
|
|||
position: options.position,
|
||||
width: options.width,
|
||||
height: options.height,
|
||||
id: getCurrentWindow().id,
|
||||
// 需要 encode, 否则 https://github.com/siyuan-note/siyuan/issues/9343
|
||||
url: `${window.location.protocol}//${window.location.host}/stage/build/app/window.html?v=${Constants.SIYUAN_VERSION}&json=${encodeURIComponent(JSON.stringify(json))}`
|
||||
});
|
||||
|
|
@ -66,7 +64,6 @@ export const openNewWindowById = (id: string, options: windowOptions = {}) => {
|
|||
position: options.position,
|
||||
width: options.width,
|
||||
height: options.height,
|
||||
id: getCurrentWindow().id,
|
||||
url: `${window.location.protocol}//${window.location.host}/stage/build/app/window.html?v=${Constants.SIYUAN_VERSION}&json=${encodeURIComponent(JSON.stringify(json))}`
|
||||
});
|
||||
/// #endif
|
||||
|
|
@ -81,7 +78,6 @@ export const openNewWindowById = (id: string, options: windowOptions = {}) => {
|
|||
position: options.position,
|
||||
width: options.width,
|
||||
height: options.height,
|
||||
id: getCurrentWindow().id,
|
||||
url: `${window.location.protocol}//${window.location.host}/stage/build/app/window.html?v=${Constants.SIYUAN_VERSION}&json=${encodeURIComponent(JSON.stringify(json))}`
|
||||
});
|
||||
/// #endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue