mirror of
https://github.com/siyuan-note/siyuan.git
synced 2026-03-09 06:02:33 +01:00
This commit is contained in:
parent
b613bf3b34
commit
c089edf65f
4 changed files with 20 additions and 21 deletions
|
|
@ -233,14 +233,27 @@ export const setDefRefCount = (data: {
|
|||
}
|
||||
};
|
||||
|
||||
export const lockScreen = (app: App) => {
|
||||
export const lockScreen = async (app: App) => {
|
||||
if (window.siyuan.config.readonly) {
|
||||
return;
|
||||
}
|
||||
app.plugins.forEach(item => {
|
||||
item.eventBus.emit("lock-screen");
|
||||
});
|
||||
fetchPost("/api/system/logoutAuth");
|
||||
/// #if !MOBILE
|
||||
exportLayout({
|
||||
errorExit: false,
|
||||
cb() {
|
||||
fetchPost("/api/system/logoutAuth");
|
||||
}
|
||||
});
|
||||
/// #else
|
||||
if (window.siyuan.mobile.editor) {
|
||||
await saveScroll(window.siyuan.mobile.editor.protyle);
|
||||
fetchPost("/api/system/logoutAuth");
|
||||
}
|
||||
/// #endif
|
||||
|
||||
};
|
||||
|
||||
export const kernelError = () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue