This commit is contained in:
2026-01-23 15:02:19 -08:00
parent 523d9f839c
commit 797b5fee40
3 changed files with 58 additions and 42 deletions

View File

@@ -544,14 +544,23 @@ class ConfigModal(ModalScreen):
self.editing_item_name = name
self.refresh_view()
elif action == "del":
removed = False
if itype.startswith("store-"):
stype = itype.replace("store-", "")
if "store" in self.config_data and stype in self.config_data["store"]:
if name in self.config_data["store"][stype]:
del self.config_data["store"][stype][name]
removed = True
elif itype == "provider":
if "provider" in self.config_data and name in self.config_data["provider"]:
del self.config_data["provider"][name]
removed = True
if removed:
try:
self.save_all()
self.notify("Configuration saved!")
except Exception as exc:
self.notify(f"Save failed: {exc}", severity="error", timeout=10)
self.refresh_view()
elif bid == "add-store-btn":
all_classes = _discover_store_classes()