Retro Bulletin Board Systems on atproto. Web app and TUI. lazy mirror of alyraffauf/atbbs atbbs.xyz
forums python tui atproto bbs
3
fork

Configure Feed

Select the types of activity you want to include in your feed.

tui: add clickable handle in breadcrumbs

+26 -7
+26 -7
tui/widgets/breadcrumb.py
··· 35 35 self.on_click() 36 36 37 37 38 + class BreadcrumbUser(Static, can_focus=True): 39 + """Clickable user handle that opens the account screen.""" 40 + 41 + DEFAULT_CSS = """ 42 + BreadcrumbUser { 43 + dock: right; 44 + width: auto; 45 + color: #8a8a8a; 46 + } 47 + BreadcrumbUser:hover { 48 + color: #a3a3a3; 49 + } 50 + BreadcrumbUser:focus { 51 + color: #e5e5e5; 52 + } 53 + """ 54 + 55 + def on_click(self) -> None: 56 + self.app.action_login() 57 + 58 + def key_enter(self) -> None: 59 + self.app.action_login() 60 + 61 + 38 62 class BreadcrumbSep(Static): 39 63 DEFAULT_CSS = """ 40 64 BreadcrumbSep { ··· 58 82 background: #262626; 59 83 layout: horizontal; 60 84 } 61 - Breadcrumb .breadcrumb-user { 62 - dock: right; 63 - width: auto; 64 - color: #8a8a8a; 65 - } 66 85 """ 67 86 68 87 def __init__(self, *segments: tuple[str, int]) -> None: ··· 74 93 # Show logged-in user on the right 75 94 session = getattr(self.app, "user_session", None) 76 95 if session: 77 - yield Static( 78 - f" {session['handle']} ", classes="breadcrumb-user", markup=False 96 + yield BreadcrumbUser( 97 + f" {session['handle']} ", markup=False 79 98 ) 80 99 81 100 for i, (label, pop_count) in enumerate(self._segments):