Clear screen implemented

This commit is contained in:
Dirk Alders 2025-07-22 06:08:00 +02:00
parent a5b50da2c8
commit e3eae2eac6

View File

@ -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()