mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-01-25 17:56:09 +01:00
This commit is contained in:
parent
e14ca5799b
commit
73505073e6
12 changed files with 42 additions and 59 deletions
|
|
@ -53,26 +53,16 @@ export const openNewWindowById = (id: string, options: windowOptions = {}) => {
|
|||
}
|
||||
};
|
||||
if (response.data.rootID === id) {
|
||||
fetchPost("/api/attr/getBlockAttrs", {id}, (attrResponse) => {
|
||||
if (attrResponse.data.scroll) {
|
||||
json.children.scrollAttr = JSON.parse(attrResponse.data.scroll);
|
||||
// 历史数据兼容
|
||||
json.children.scrollAttr.rootId = response.data.rootID;
|
||||
}
|
||||
/// #if !BROWSER
|
||||
ipcRenderer.send(Constants.SIYUAN_OPEN_WINDOW, {
|
||||
position: options.position,
|
||||
width: options.width,
|
||||
height: options.height,
|
||||
url: `${window.location.protocol}//${window.location.host}/stage/build/app/window.html?v=${Constants.SIYUAN_VERSION}&json=${encodeURIComponent(JSON.stringify(json))}`
|
||||
});
|
||||
/// #endif
|
||||
/// #if !BROWSER
|
||||
ipcRenderer.send(Constants.SIYUAN_OPEN_WINDOW, {
|
||||
position: options.position,
|
||||
width: options.width,
|
||||
height: options.height,
|
||||
url: `${window.location.protocol}//${window.location.host}/stage/build/app/window.html?v=${Constants.SIYUAN_VERSION}&json=${encodeURIComponent(JSON.stringify(json))}`
|
||||
});
|
||||
/// #endif
|
||||
} else {
|
||||
json.children.action = Constants.CB_GET_ALL;
|
||||
json.children.scrollAttr = {
|
||||
zoomInId: id,
|
||||
};
|
||||
/// #if !BROWSER
|
||||
ipcRenderer.send(Constants.SIYUAN_OPEN_WINDOW, {
|
||||
position: options.position,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue