From e3eae2eac66441b6088d7f7d17ff99e694c210e5 Mon Sep 17 00:00:00 2001 From: Dirk Alders Date: Tue, 22 Jul 2025 06:08:00 +0200 Subject: [PATCH] Clear screen implemented --- loggy.py | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) 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()