building out UI a ton more and also working on serialization and deserial for the desktop app

This commit is contained in:
2026-03-08 14:09:43 +11:00
parent 0a560dca17
commit 12a8bd4c19
7 changed files with 158 additions and 24 deletions

View File

@@ -1,5 +1,5 @@
from textual.containers import VerticalScroll, Vertical, HorizontalGroup
from textual.widgets import Static, Button, Rule
from textual.widgets import Static, Button, Rule, ContentSwitcher
from api.channel import Channel
@@ -37,16 +37,19 @@ class ChannelsList(Vertical):
}
"""
def on_button_pressed(self, event: ChannelView.Pressed):
self.screen.query_one(ContentSwitcher).current = "chat-window"
def compose(self):
with VerticalScroll():
yield Static("channels", classes="banner")
yield ChannelView(Channel("test channel", "AQ=="))
yield ChannelView(Channel("test channel", "AQ=="))
yield ChannelView(Channel("test channel", "AQ=="))
yield ChannelView(Channel("test channel", "AQ=="))
yield ChannelView(Channel("test channel", "AQ=="))
yield ChannelView(Channel("test channel", "AQ=="))
yield ChannelView(Channel("test channel", "AQ=="))
yield ChannelView(Channel("test channel 1", "AQ=="))
yield ChannelView(Channel("test channel 2", "AQ=="))
yield ChannelView(Channel("test channel 3", "AQ=="))
yield ChannelView(Channel("test channel 4", "AQ=="))
yield ChannelView(Channel("test channel 5", "AQ=="))
yield ChannelView(Channel("test channel 6", "AQ=="))
yield ChannelView(Channel("test channel 7", "AQ=="))
yield Rule()