mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-28 20:38:49 +01:00
This commit is contained in:
parent
cd6b560de8
commit
3b3c5df1d5
1 changed files with 4 additions and 11 deletions
|
|
@ -33,22 +33,15 @@ 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
|
||||
reloadByMode(response.data?.mode);
|
||||
window.location.reload();
|
||||
/// #else
|
||||
exportLayout({
|
||||
cb() {
|
||||
reloadByMode(response.data?.mode);
|
||||
window.location.reload();
|
||||
},
|
||||
errorExit: false,
|
||||
});
|
||||
|
|
@ -56,11 +49,11 @@ export const processMessage = (response: IWebSocketData) => {
|
|||
});
|
||||
} else {
|
||||
/// #if MOBILE
|
||||
reloadByMode(response.data?.mode);
|
||||
window.location.reload();
|
||||
/// #else
|
||||
exportLayout({
|
||||
cb() {
|
||||
reloadByMode(response.data?.mode);
|
||||
window.location.reload();
|
||||
},
|
||||
errorExit: false,
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue