From 5943ebda3a7f37f4fe1e68a8c0969978de643503 Mon Sep 17 00:00:00 2001 From: Daniel Schwarz Date: Thu, 2 Feb 2023 20:37:12 -0500 Subject: [PATCH] Show if an account is a "bot", "locked", or "suspended" --- toot/tui/overlays.py | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/toot/tui/overlays.py b/toot/tui/overlays.py index 623dbe8..c69d657 100644 --- a/toot/tui/overlays.py +++ b/toot/tui/overlays.py @@ -239,6 +239,17 @@ class Account(urwid.ListBox): yield urwid.Text([("ID: "), ("green", f"{account['id']}")]) yield urwid.Text([("Since: "), ("green", f"{account['created_at'][:10]}")]) yield urwid.Divider() + + if account["bot"]: + yield urwid.Text([("Bot: "), ("green", "True \N{robot face}")]) + yield urwid.Divider() + if account["locked"]: + yield urwid.Text([("Locked: "), ("warning", "True \N{lock}")]) + yield urwid.Divider() + if "suspended" in account and account["suspended"]: + yield urwid.Text([("Suspended: "), ("warning", "True \N{cross mark}")]) + yield urwid.Divider() + yield urwid.Text([("Followers: "), ("yellow", f"{account['followers_count']}")]) yield urwid.Text([("Following: "), ("yellow", f"{account['following_count']}")]) yield urwid.Text([("Statuses: "), ("yellow", f"{account['statuses_count']}")])