INNER CODE UNIT · Python
on_button_pressed
VisionForge-OU/foreman · src/foreman/tui/app.py:56
def on_button_pressed(self, event: Button.Pressed) -> None:
if event.button.id == "create":
title = self.query_one("#title", Input).value.strip()
req = self.query_one("#req", TextArea).text.strip()
if title:
self.dismiss((title, req))
return
self.dismiss(None)
class ReviewScreen(Screen):
BINDINGS = [
Binding("a", "approve", "Approve"),
Binding("r", "request_changes", "Request changes"),
Binding("tab", "cycle_doc", "Next doc"),
Binding("escape", "app.pop_screen", "Back"),
]
CSS = """