mirror of
https://github.com/onyx-and-iris/vban-tui.git
synced 2026-04-16 14:03:41 +00:00
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:
@@ -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')
|
||||
|
||||
Reference in New Issue
Block a user