working good state

This commit is contained in:
Tim Bendt
2025-05-01 11:59:28 -04:00
parent 7a5b911414
commit 1f75a03553
20 changed files with 173 additions and 78 deletions

View File

@@ -0,0 +1,24 @@
from textual.reactive import Reactive
from textual.app import RenderResult
from textual.widgets import Static, Label
class EnvelopeHeader(Static):
subject = Reactive("")
from_ = Reactive("")
to = Reactive("")
date = Reactive("")
"""Header for the email viewer."""
def on_mount(self) -> None:
"""Mount the header."""
def render(self) -> RenderResult:
return f"[b][dim]Subject:[/dim] {self.subject}[/] \r\n" \
f"[dim]From:[/dim] {self.from_} \r\n" \
f"[dim]To:[/dim] {self.to} \r\n" \
f"[dim]Date:[/dim] {self.date}"