diff --git a/loggy.py b/loggy.py index 1ebfa24..af395bf 100644 --- a/loggy.py +++ b/loggy.py @@ -59,7 +59,10 @@ class LogViewerApp(App): """Eine Textual-App zum Anzeigen und Filtern von Python-Logs.""" CSS_PATH = "style.tcss" - BINDINGS = [("q", "quit", "Quit")] + BINDINGS = [ + ("q", "quit", "Quit"), + ("c", "clear_screen", "Clear") + ] def __init__(self): super().__init__() @@ -127,6 +130,10 @@ class LogViewerApp(App): self.log_display.write(message) + def action_clear_screen(self): + self.all_logs = [] + self._update_display() + def _update_display(self): """Löscht die Anzeige und rendert alle Logs basierend auf den aktuellen Filtern neu.""" self.log_display.clear()