warn user when closing tabs with unsaved changes

This commit is contained in:
2026-07-28 16:26:04 +10:00
parent 9e0f81b7a0
commit 575fb31cd5
2 changed files with 20 additions and 2 deletions

View File

@@ -61,7 +61,7 @@ class Prompt(ModalScreen):
elif event.button.id == "confirm-list":
self.dismiss(self.query_one("#select").value)
def __init__(self, question: str, prompt_type: Literal["confirm", "string"], title: str = "Confirm", **kwargs):
def __init__(self, question: str, prompt_type: Literal["confirm", "string", "list"], title: str = "Confirm", **kwargs):
super().__init__()
self.question = question
self.window_title = title