j
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user