Vanessa 2023-05-11 12:22:53 +08:00
parent 7a68c8ad1b
commit f06a2e62a5
11 changed files with 175 additions and 71 deletions

View file

@ -137,7 +137,11 @@ export const workspaceMenu = (app:App, rect: DOMRect) => {
if (item.name === value) {
saveDialog.destroy();
confirmDialog(window.siyuan.languages.save, window.siyuan.languages.exportTplTip, () => {
item.layout = exportLayout(false, undefined, true);
item.layout = exportLayout({
reload: false,
onlyData: true,
errorExit: false,
});
setStorageVal(Constants.LOCAL_LAYOUTS, window.siyuan.storage[Constants.LOCAL_LAYOUTS]);
});
return true;
@ -148,7 +152,11 @@ export const workspaceMenu = (app:App, rect: DOMRect) => {
}
window.siyuan.storage[Constants.LOCAL_LAYOUTS].push({
name: value,
layout: exportLayout(false, undefined, true)
layout: exportLayout({
reload: false,
onlyData: true,
errorExit: false,
})
});
setStorageVal(Constants.LOCAL_LAYOUTS, window.siyuan.storage[Constants.LOCAL_LAYOUTS]);
saveDialog.destroy();