mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-21 17:10:12 +01:00
This commit is contained in:
parent
b10edbbcb9
commit
f9e81c75f2
2 changed files with 11 additions and 6 deletions
|
|
@ -33,7 +33,6 @@ export const onMessage = (data: IWebSocketData) => {
|
||||||
document.getElementById("toolbarSync").classList.add("fn__none");
|
document.getElementById("toolbarSync").classList.add("fn__none");
|
||||||
}
|
}
|
||||||
break;
|
break;
|
||||||
case "create":
|
|
||||||
case "createdailynote":
|
case "createdailynote":
|
||||||
openMobileFileById(data.data.id);
|
openMobileFileById(data.data.id);
|
||||||
break;
|
break;
|
||||||
|
|
|
||||||
|
|
@ -83,6 +83,8 @@ export const newFile = (notebookId?: string, currentPath?: string, paths?: strin
|
||||||
}, response => {
|
}, response => {
|
||||||
/// #if !MOBILE
|
/// #if !MOBILE
|
||||||
openFileById({id: response.data, action: [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]});
|
openFileById({id: response.data, action: [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]});
|
||||||
|
/// #else
|
||||||
|
openMobileFileById(response.data, [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]);
|
||||||
/// #endif
|
/// #endif
|
||||||
});
|
});
|
||||||
} else {
|
} else {
|
||||||
|
|
@ -97,6 +99,8 @@ export const newFile = (notebookId?: string, currentPath?: string, paths?: strin
|
||||||
}, response => {
|
}, response => {
|
||||||
/// #if !MOBILE
|
/// #if !MOBILE
|
||||||
openFileById({id: response.data, action: [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]});
|
openFileById({id: response.data, action: [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]});
|
||||||
|
/// #else
|
||||||
|
openMobileFileById(response.data, [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]);
|
||||||
/// #endif
|
/// #endif
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
|
|
@ -121,6 +125,8 @@ export const newFile = (notebookId?: string, currentPath?: string, paths?: strin
|
||||||
}, () => {
|
}, () => {
|
||||||
/// #if !MOBILE
|
/// #if !MOBILE
|
||||||
openFileById({id, action: [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]});
|
openFileById({id, action: [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]});
|
||||||
|
/// #else
|
||||||
|
openMobileFileById(id, [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]);
|
||||||
/// #endif
|
/// #endif
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
@ -165,11 +171,11 @@ export const newFileByName = (value: string) => {
|
||||||
markdown: ""
|
markdown: ""
|
||||||
}, response => {
|
}, response => {
|
||||||
hideElements(["dialog"]);
|
hideElements(["dialog"]);
|
||||||
if (isMobile()) {
|
/// #if MOBILE
|
||||||
openMobileFileById(response.data, [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]);
|
openMobileFileById(response.data, [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]);
|
||||||
} else {
|
/// #else
|
||||||
openFileById({id: response.data, action: [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]});
|
openFileById({id: response.data, action: [Constants.CB_GET_HL, Constants.CB_GET_CONTEXT]});
|
||||||
}
|
/// #endif
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
};
|
};
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue