mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-12-26 11:28:49 +01:00
This commit is contained in:
parent
abf35d26ba
commit
fc9c654269
1 changed files with 4 additions and 2 deletions
|
|
@ -686,7 +686,9 @@ const addConfigMoreMenu = async (config: ISearchOption, edit: Protyle, element:
|
|||
saveDialog.destroy();
|
||||
});
|
||||
btnsElement[1].addEventListener("click", () => {
|
||||
fetchPost("/api/storage/setCriterion", {criterion: Object.assign({name: saveDialog.element.querySelector("input").value}, config)}, () => {
|
||||
let criterion = config;
|
||||
criterion.name = saveDialog.element.querySelector("input").value;
|
||||
fetchPost("/api/storage/setCriterion", {criterion}, () => {
|
||||
saveDialog.destroy();
|
||||
});
|
||||
});
|
||||
|
|
@ -704,7 +706,7 @@ const addConfigMoreMenu = async (config: ISearchOption, edit: Protyle, element:
|
|||
bind(menuElement) {
|
||||
menuElement.addEventListener("click", (event) => {
|
||||
if (hasClosestByMatchTag(event.target as HTMLElement, "svg")) {
|
||||
fetchPost("/api/storage/removeCriterion", {name: element.textContent.trim()});
|
||||
fetchPost("/api/storage/removeCriterion", {name: item.name.trim()});
|
||||
window.siyuan.menus.menu.remove();
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue