add --no-rich_log flag

use it to disable the RichLog and load the tui_no_log tcss.

update README and add no log screenshot
This commit is contained in:
2026-03-21 00:00:35 +00:00
parent eaf15584a2
commit ae39a318d9
5 changed files with 102 additions and 2 deletions

View File

@@ -11,11 +11,15 @@ from .settings import Settings
class VbanTui(App):
"""A Textual App to display VBAN data."""
CSS_PATH = 'tui.tcss'
def _select_css(self):
if hasattr(self, '_settings') and not self._settings.rich_log:
return 'tui_no_log.tcss'
return 'tui.tcss'
def __init__(self):
super().__init__()
self._settings = Settings()
self.CSS_PATH = self._select_css()
super().__init__()
self._command_history = CommandHistory()
self._history_index = None
@@ -62,6 +66,11 @@ class VbanTui(App):
self.query_one('#request-input').focus()
if not self._settings.rich_log:
self.query_one('#response-log').remove()
self.query_one('#main-grid').styles.height = '20'
self.query_one('#main-grid').refresh(layout=True)
def on_key(self, event):
"""Handle key events."""
request_input = self.query_one('#request-input')