mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-02-18 04:58:06 +01:00
This commit is contained in:
parent
aa5f5ddc5f
commit
35853cfedb
5 changed files with 36 additions and 20 deletions
|
|
@ -15,6 +15,13 @@ export const init = () => {
|
|||
globalShortcut();
|
||||
fetchPost("/api/system/getEmojiConf", {}, response => {
|
||||
window.siyuan.emojis = response.data as IEmoji[];
|
||||
|
||||
const layout = JSON.parse(sessionStorage.getItem("layout") || "{}");
|
||||
if (layout.layout) {
|
||||
JSONToCenter(layout.layout);
|
||||
window.siyuan.layout.centerLayout = window.siyuan.layout.layout;
|
||||
return;
|
||||
}
|
||||
const tabJSON = JSON.parse(getSearch("json"));
|
||||
tabJSON.active = true;
|
||||
JSONToCenter({
|
||||
|
|
@ -29,6 +36,7 @@ export const init = () => {
|
|||
}]
|
||||
});
|
||||
window.siyuan.layout.centerLayout = window.siyuan.layout.layout;
|
||||
|
||||
});
|
||||
initStatus(true);
|
||||
initWindow();
|
||||
|
|
|
|||
|
|
@ -15,15 +15,11 @@ export const onWindowsMsg = (ipcData: IWebSocketData) => {
|
|||
closeTab(ipcData);
|
||||
break;
|
||||
case "lockscreen":
|
||||
if (isWindow()) {
|
||||
window.location.href = `/check-auth?url=${window.location.href}`;
|
||||
} else {
|
||||
exportLayout(false, () => {
|
||||
fetchPost("/api/system/logoutAuth", {}, () => {
|
||||
window.location.href = `/check-auth?url=${window.location.href}`;
|
||||
});
|
||||
}, false, false);
|
||||
}
|
||||
exportLayout(false, () => {
|
||||
fetchPost("/api/system/logoutAuth", {}, () => {
|
||||
window.location.href = `/check-auth?url=${window.location.href}`;
|
||||
});
|
||||
}, false, false);
|
||||
break;
|
||||
}
|
||||
};
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue