diff --git a/dist/index.js b/dist/index.js index 3e0e5946..444e9221 100644 --- a/dist/index.js +++ b/dist/index.js @@ -1275,6 +1275,9 @@ function removeSetDuplicates(listState) { listState.value = /* @__PURE__ */ new Set([...listState.value]); } + function clearAddresses() { + previousAddresses.clear(); + } function clearCategories() { usedObjectCategories.clear(); } @@ -2326,7 +2329,7 @@ // src/Views/settingsModal.tsx function SettingsModal() { - return /* @__PURE__ */ createElement("div", { class: "modal", "toggle:open": isPresentingSettingsModal }, /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("main", null, /* @__PURE__ */ createElement("h2", null, translation.settings), /* @__PURE__ */ createElement("div", { class: "flex-row width-input gap" }, /* @__PURE__ */ createElement("button", { class: "width-100 flex justify-start", "on:click": zoomOut }, /* @__PURE__ */ createElement("span", { class: "icon" }, "zoom_out"), translation.zoomOut), /* @__PURE__ */ createElement("button", { class: "width-100 flex justify-start", "on:click": zoomIn }, /* @__PURE__ */ createElement("span", { class: "icon" }, "zoom_in"), translation.zoomIn)), /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("div", { class: "flex-column width-input" }, /* @__PURE__ */ createElement("button", { class: "width-100 flex-1", "on:click": repairApp }, translation.repairApp, /* @__PURE__ */ createElement("span", { class: "icon" }, "handyman"))), /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("div", { class: "flex-column width-input gap" }, /* @__PURE__ */ createElement("button", { class: "width-100 flex-1", "on:click": clearCategories }, translation.clearCategories, /* @__PURE__ */ createElement("span", { class: "icon" }, icons.categoryName)), /* @__PURE__ */ createElement("button", { class: "width-100 flex-1", "on:click": clearStatuses }, translation.clearStatuses, /* @__PURE__ */ createElement("span", { class: "icon" }, icons.status)))), /* @__PURE__ */ createElement("button", { class: "width-100", "on:click": toggleSettings }, translation.close, /* @__PURE__ */ createElement("span", { class: "icon" }, "close")))); + return /* @__PURE__ */ createElement("div", { class: "modal", "toggle:open": isPresentingSettingsModal }, /* @__PURE__ */ createElement("div", null, /* @__PURE__ */ createElement("main", null, /* @__PURE__ */ createElement("h2", null, translation.settings), /* @__PURE__ */ createElement("div", { class: "flex-row width-input gap" }, /* @__PURE__ */ createElement("button", { class: "width-100 flex justify-start", "on:click": zoomOut }, /* @__PURE__ */ createElement("span", { class: "icon" }, "zoom_out"), translation.zoomOut), /* @__PURE__ */ createElement("button", { class: "width-100 flex justify-start", "on:click": zoomIn }, /* @__PURE__ */ createElement("span", { class: "icon" }, "zoom_in"), translation.zoomIn)), /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("div", { class: "flex-column width-input" }, /* @__PURE__ */ createElement("button", { class: "width-100 flex-1", "on:click": repairApp }, translation.repairApp, /* @__PURE__ */ createElement("span", { class: "icon" }, "handyman"))), /* @__PURE__ */ createElement("hr", null), /* @__PURE__ */ createElement("div", { class: "flex-column width-input gap" }, /* @__PURE__ */ createElement("button", { class: "width-100 flex-1", "on:click": clearAddresses }, translation.clearAddresses, /* @__PURE__ */ createElement("span", { class: "icon" }, "cell_tower")), /* @__PURE__ */ createElement("button", { class: "width-100 flex-1", "on:click": clearCategories }, translation.clearCategories, /* @__PURE__ */ createElement("span", { class: "icon" }, icons.categoryName)), /* @__PURE__ */ createElement("button", { class: "width-100 flex-1", "on:click": clearStatuses }, translation.clearStatuses, /* @__PURE__ */ createElement("span", { class: "icon" }, icons.status)))), /* @__PURE__ */ createElement("button", { class: "width-100", "on:click": toggleSettings }, translation.close, /* @__PURE__ */ createElement("span", { class: "icon" }, "close")))); } // src/index.tsx diff --git a/src/Views/settingsModal.tsx b/src/Views/settingsModal.tsx index 55e7a7bf..23055da8 100644 --- a/src/Views/settingsModal.tsx +++ b/src/Views/settingsModal.tsx @@ -1,6 +1,7 @@ import * as React from "bloatless-react"; import { + clearAddresses, clearCategories, clearStatuses, isPresentingSettingsModal, @@ -43,6 +44,10 @@ export function SettingsModal() {