mirror of
https://github.com/siyuan-note/siyuan.git
synced 2025-02-28 05:32:52 +00:00
This commit is contained in:
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user