This commit is contained in:
Vanessa 2023-03-21 09:25:52 +08:00
parent 9cae635647
commit 4bc21c493b
8 changed files with 12 additions and 13 deletions

View file

@ -136,14 +136,14 @@ export const workspaceMenu = (rect: DOMRect) => {
showMessage(window.siyuan.languages.duplicate);
return true;
}
})
});
if (hadName) {
return;
}
window.siyuan.storage[Constants.LOCAL_LAYOUTS].push({
name: value,
layout: exportLayout(false, undefined, true)
})
});
setStorageVal(Constants.LOCAL_LAYOUTS, window.siyuan.storage[Constants.LOCAL_LAYOUTS]);
saveDialog.destroy();
});
@ -169,7 +169,7 @@ export const workspaceMenu = (rect: DOMRect) => {
setStorageVal(Constants.LOCAL_LAYOUTS, window.siyuan.storage[Constants.LOCAL_LAYOUTS]);
return true;
}
})
});
return;
}
fetchPost("/api/system/setUILayout", {layout: item.layout}, () => {