mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-22 17:40:13 +01:00
This commit is contained in:
parent
2d31620eb5
commit
277a2b24a1
1 changed files with 7 additions and 3 deletions
|
|
@ -135,9 +135,13 @@ export const hotKey2Electron = (key: string) => {
|
|||
|
||||
export const setLocalStorage = () => {
|
||||
fetchPost("/api/system/getLocalStorage", undefined, (response) => {
|
||||
if (response.data) {
|
||||
Object.keys(response.data).forEach(item => {
|
||||
window.localStorage.setItem(item, response.data[item]);
|
||||
});
|
||||
} else {
|
||||
localStorage.clear();
|
||||
}
|
||||
});
|
||||
};
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue