mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 09:30:14 +01:00
🚨
This commit is contained in:
parent
abdb091c17
commit
2f58714b79
2 changed files with 5 additions and 5 deletions
|
|
@ -141,14 +141,14 @@ export const hotKey2Electron = (key: string) => {
|
|||
|
||||
export const setLocalStorage = (data?: IWebSocketData) => {
|
||||
if (data) {
|
||||
setDefaultStorage(data)
|
||||
setDefaultStorage(data);
|
||||
} else {
|
||||
fetchPost("/api/storage/getLocalStorage", undefined, (response) => {
|
||||
setDefaultStorage(response)
|
||||
setDefaultStorage(response);
|
||||
});
|
||||
}
|
||||
|
||||
};
|
||||
|
||||
const setDefaultStorage = (response: IWebSocketData) => {
|
||||
window.siyuan.storage = response.data;
|
||||
// 历史数据迁移
|
||||
|
|
@ -218,7 +218,7 @@ const setDefaultStorage = (response: IWebSocketData) => {
|
|||
window.siyuan.storage[key] = defaultStorage[key];
|
||||
}
|
||||
});
|
||||
}
|
||||
};
|
||||
|
||||
export const exportLocalStorage = (cb?: () => void) => {
|
||||
fetchPost("/api/storage/setLocalStorage", {val: window.siyuan.storage}, () => {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue