mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-18 21:18:07 +01:00
This commit is contained in:
parent
ee721e8e94
commit
42065d6daa
11 changed files with 77 additions and 53 deletions
|
|
@ -5,6 +5,8 @@ import {ipcRenderer} from "electron";
|
|||
import {Constants} from "../constants";
|
||||
import {Tab} from "../layout/Tab";
|
||||
import {fetchPost} from "../util/fetch";
|
||||
import {lockFile} from "../dialog/processSystem";
|
||||
import {showMessage} from "../dialog/message";
|
||||
|
||||
export const openNewWindow = (tab: Tab) => {
|
||||
const json = {};
|
||||
|
|
@ -17,6 +19,15 @@ export const openNewWindow = (tab: Tab) => {
|
|||
|
||||
export const openNewWindowById = (id: string) => {
|
||||
fetchPost("api/block/getBlockInfo", {id}, (response) => {
|
||||
if (response.code === 2) {
|
||||
// 文件被锁定
|
||||
lockFile(response.data);
|
||||
return false;
|
||||
}
|
||||
if (response.code === 3) {
|
||||
showMessage(response.msg);
|
||||
return;
|
||||
}
|
||||
const json: any = {
|
||||
title: response.data.rootTitle,
|
||||
docIcon: response.data.rootIcon,
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue