mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-29 21:08:49 +01:00
This commit is contained in:
parent
46d8808e17
commit
35f43e8669
1 changed files with 11 additions and 4 deletions
|
|
@ -33,15 +33,22 @@ export const processMessage = (response: IWebSocketData) => {
|
|||
return false;
|
||||
}
|
||||
if ("reloadui" === response.cmd) {
|
||||
const reloadByMode = (mode: string) => {
|
||||
if (mode) {
|
||||
window.location.pathname = "stage/build/" + mode;
|
||||
} else {
|
||||
window.location.reload();
|
||||
}
|
||||
};
|
||||
if (response.data?.resetScroll) {
|
||||
window.siyuan.storage[Constants.LOCAL_FILEPOSITION] = {};
|
||||
setStorageVal(Constants.LOCAL_FILEPOSITION, window.siyuan.storage[Constants.LOCAL_FILEPOSITION], () => {
|
||||
/// #if MOBILE
|
||||
window.location.reload();
|
||||
reloadByMode(response.data?.mode);
|
||||
/// #else
|
||||
exportLayout({
|
||||
cb() {
|
||||
window.location.reload();
|
||||
reloadByMode(response.data?.mode);
|
||||
},
|
||||
errorExit: false,
|
||||
});
|
||||
|
|
@ -49,11 +56,11 @@ export const processMessage = (response: IWebSocketData) => {
|
|||
});
|
||||
} else {
|
||||
/// #if MOBILE
|
||||
window.location.reload();
|
||||
reloadByMode(response.data?.mode);
|
||||
/// #else
|
||||
exportLayout({
|
||||
cb() {
|
||||
window.location.reload();
|
||||
reloadByMode(response.data?.mode);
|
||||
},
|
||||
errorExit: false,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue