Vanessa 2023-06-03 21:45:24 +08:00
parent f99d9e19bc
commit f43770d8d2
7 changed files with 43 additions and 20 deletions

View file

@ -161,6 +161,7 @@ export const getLocalStorage = (cb: () => void) => {
};
defaultStorage[Constants.LOCAL_LAYOUTS] = []; // {name: "", layout:{}}
defaultStorage[Constants.LOCAL_AI] = []; // {name: "", memo: ""}
defaultStorage[Constants.LOCAL_PLUGINTOPUNPIN] = [];
defaultStorage[Constants.LOCAL_BAZAAR] = {
theme: "0",
template: "0",
@ -214,7 +215,7 @@ export const getLocalStorage = (cb: () => void) => {
[Constants.LOCAL_EXPORTIMG, Constants.LOCAL_SEARCHKEYS, Constants.LOCAL_PDFTHEME, Constants.LOCAL_BAZAAR, Constants.LOCAL_EXPORTWORD,
Constants.LOCAL_EXPORTPDF, Constants.LOCAL_DOCINFO, Constants.LOCAL_FONTSTYLES, Constants.LOCAL_SEARCHDATA,
Constants.LOCAL_ZOOM, Constants.LOCAL_LAYOUTS, Constants.LOCAL_AI].forEach((key) => {
Constants.LOCAL_ZOOM, Constants.LOCAL_LAYOUTS, Constants.LOCAL_AI, Constants.LOCAL_PLUGINTOPUNPIN].forEach((key) => {
if (typeof response.data[key] === "string") {
try {
window.siyuan.storage[key] = Object.assign(defaultStorage[key], JSON.parse(response.data[key]));