feat: TUI als Browser-App via textual serve
TUI von direkten Service-Importen auf httpx API-Calls umgestellt. Neue tui/api_client.py als schlanker async HTTP-Client. Background- Worker pollt API alle 5s für Echtzeit-Updates. Neuer tui_standalone.py Entry-Point für 'textual serve --port 8001 tui_standalone.py'.
This commit is contained in:
@@ -2,6 +2,7 @@ from __future__ import annotations
|
||||
|
||||
from textual.app import App
|
||||
|
||||
from tui.api_client import MCMApiClient
|
||||
from tui.screens.main_screen import MainScreen
|
||||
|
||||
|
||||
@@ -12,5 +13,9 @@ class MCMApp(App):
|
||||
CSS_PATH = "styles.tcss"
|
||||
SCREENS = {"main": MainScreen}
|
||||
|
||||
def __init__(self) -> None:
|
||||
super().__init__()
|
||||
self._api_client = MCMApiClient()
|
||||
|
||||
def on_mount(self) -> None:
|
||||
self.push_screen("main")
|
||||
|
||||
Reference in New Issue
Block a user