Show visibility in TUI

This commit is contained in:
Lim Ding Wen 2022-12-22 07:30:29 +08:00 committed by Ivan Habunek
parent 8ffe8d281f
commit 064cab1988
No known key found for this signature in database
GPG Key ID: F5F0623FF5EBCB3D
1 changed files with 8 additions and 0 deletions

View File

@ -313,11 +313,19 @@ class StatusDetails(urwid.Pile):
else None
)
visibility_colors = {
"public": "gray",
"unlisted": "white",
"private": "cyan",
"direct": "yellow"
}
yield ("pack", urwid.Text([
("red", "🠷 ") if status.bookmarked else "",
("gray", f"{status.data['replies_count']} "),
("yellow" if status.reblogged else "gray", f"{status.data['reblogs_count']} "),
("yellow" if status.favourited else "gray", f"{status.data['favourites_count']}"),
(visibility_colors[status.visibility], f" · {status.visibility}"),
("yellow", f" · Translated from {translated_from} ") if translated_from else "",
("gray", f" · {application}" if application else ""),
]))