25 lines
708 B
Python
25 lines
708 B
Python
from textual.containers import Center
|
|
from textual.widgets import Static
|
|
from textualeffects.widgets import EffectLabel
|
|
|
|
|
|
class HomeInfo(Center):
|
|
DEFAULT_CSS = """
|
|
HomeInfo {
|
|
width: 100%;
|
|
padding: 0 3;
|
|
|
|
EffectLabel {
|
|
min-width: 100%;
|
|
text-align: center;
|
|
}
|
|
}
|
|
"""
|
|
|
|
def compose(self):
|
|
with open("ui/assets/banner.txt", "r") as f:
|
|
yield EffectLabel(f.read(), effect="Print")
|
|
|
|
yield Static("[cyan][/] [b blink]1[/] new message(s)")
|
|
yield Static("[cyan][/] [b]2 of 3[/] nodes online")
|
|
yield Static("[lime][/] [b]SNR:[/] 10.0 dBm [b]| RSSI:[/] -115.0 dBm") |