From eebd5d8c6d8a756384b6cf1b2cc76b8a83cdf929 Mon Sep 17 00:00:00 2001 From: Mia Herkt Date: Tue, 20 Dec 2022 15:45:55 +0100 Subject: Add moderation TUI This ended up way fancier than I imagined. --- modui/notification.py | 8 ++++++++ 1 file changed, 8 insertions(+) create mode 100644 modui/notification.py (limited to 'modui/notification.py') diff --git a/modui/notification.py b/modui/notification.py new file mode 100644 index 0000000..ecae6e4 --- /dev/null +++ b/modui/notification.py @@ -0,0 +1,8 @@ +from textual.widgets import Static + +class Notification(Static): + def on_mount(self) -> None: + self.set_timer(3, self.remove) + + def on_click(self) -> None: + self.remove() -- cgit v1.2.3