From c1700ec7dbd32249516f759681c0faa222d3770f Mon Sep 17 00:00:00 2001 From: David Rodenkirchen Date: Thu, 12 Feb 2026 10:05:36 +0100 Subject: [PATCH] declutter layout and and boilerplate for teams page --- src/EzggLanManager.py | 5 +++++ .../components/DesktopNavigation.py | 3 +-- src/ezgg_lan_manager/pages/BasePage.py | 12 ++++++++++-- src/ezgg_lan_manager/pages/TeamsPage.py | 17 +++++++++++++++++ src/ezgg_lan_manager/pages/__init__.py | 1 + 5 files changed, 34 insertions(+), 4 deletions(-) create mode 100644 src/ezgg_lan_manager/pages/TeamsPage.py diff --git a/src/EzggLanManager.py b/src/EzggLanManager.py index 82d5146..ce50bc8 100644 --- a/src/EzggLanManager.py +++ b/src/EzggLanManager.py @@ -172,6 +172,11 @@ if __name__ == "__main__": url_segment="tournament-rules", build=pages.TournamentRulesPage, ), + ComponentPage( + name="Teams", + url_segment="teams", + build=pages.TeamsPage, + ), ComponentPage( name="ConwaysGameOfLife", url_segment="conway", diff --git a/src/ezgg_lan_manager/components/DesktopNavigation.py b/src/ezgg_lan_manager/components/DesktopNavigation.py index 20be550..2a97964 100644 --- a/src/ezgg_lan_manager/components/DesktopNavigation.py +++ b/src/ezgg_lan_manager/components/DesktopNavigation.py @@ -51,14 +51,13 @@ class DesktopNavigation(Component): DesktopNavigationButton("Sitzplan", "./seating"), DesktopNavigationButton("Catering", "./catering"), DesktopNavigationButton("Teilnehmer", "./guests"), + DesktopNavigationButton("Teams", "./teams"), DesktopNavigationButton("Turniere", "./tournaments"), DesktopNavigationButton("FAQ", "./faq"), DesktopNavigationButton("Regeln & AGB", "./rules-gtc"), Spacer(min_height=0.7), DesktopNavigationButton("Discord", "https://discord.gg/8gTjg34yyH", open_new_tab=True), DesktopNavigationButton("Die EZ GG e.V.", "https://ezgg-ev.de/about", open_new_tab=True), - DesktopNavigationButton("Kontakt", "./contact"), - DesktopNavigationButton("Impressum & DSGVO", "./imprint"), Spacer(min_height=0.7) ] team_navigation = [ diff --git a/src/ezgg_lan_manager/pages/BasePage.py b/src/ezgg_lan_manager/pages/BasePage.py index 91c6cf6..128aa94 100644 --- a/src/ezgg_lan_manager/pages/BasePage.py +++ b/src/ezgg_lan_manager/pages/BasePage.py @@ -2,7 +2,7 @@ from __future__ import annotations from typing import * # type: ignore -from rio import Component, event, Spacer, Card, Container, Column, Row, TextStyle, Color, Text, PageView, Button +from rio import Component, event, Spacer, Card, Container, Column, Row, TextStyle, Color, Text, PageView, Button, Link from src.ezgg_lan_manager import ConfigurationService, DatabaseService from src.ezgg_lan_manager.components.DesktopNavigation import DesktopNavigation @@ -58,7 +58,15 @@ class BasePage(Component): Row( Spacer(grow_x=True, grow_y=False), Card( - content=Text(f"EZGG LAN Manager Version {self.session[ConfigurationService].APP_VERSION} © EZ GG e.V.", align_x=0.5, align_y=0.5, fill=self.session.theme.primary_color, style=TextStyle(font_size=0.5)), + content=Row( + Text(f"EZGG LAN Manager Version {self.session[ConfigurationService].APP_VERSION} © EZ GG e.V.", fill=self.session.theme.primary_color, style=TextStyle(font_size=0.5)), + Text(f"-", fill=self.session.theme.primary_color, style=TextStyle(font_size=0.5), margin_left=0.5, margin_right=0.5), + Link(content=Text(f"Impressum & DSGVO", fill=self.session.theme.primary_color, style=TextStyle(font_size=0.5)), target_url="./imprint"), + Text(f"-", fill=self.session.theme.primary_color, style=TextStyle(font_size=0.5), margin_left=0.5, margin_right=0.5), + Link(content=Text(f"Kontakt", fill=self.session.theme.primary_color, style=TextStyle(font_size=0.5)), target_url="./contact"), + align_x=0.5, + align_y=0.5 + ), color=self.session.theme.neutral_color, corner_radius=(0, 0, 0.5, 0.5), grow_x=False, diff --git a/src/ezgg_lan_manager/pages/TeamsPage.py b/src/ezgg_lan_manager/pages/TeamsPage.py new file mode 100644 index 0000000..89fd3be --- /dev/null +++ b/src/ezgg_lan_manager/pages/TeamsPage.py @@ -0,0 +1,17 @@ +from rio import Column, Component, event, Text + +from src.ezgg_lan_manager import ConfigurationService +from src.ezgg_lan_manager.components.MainViewContentBox import MainViewContentBox +from src.ezgg_lan_manager.types.News import News + + +class TeamsPage(Component): + @event.on_populate + async def on_populate(self) -> None: + await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Teams") + + def build(self) -> Component: + return Column( + MainViewContentBox(Text("Teams")), + align_y=0 + ) diff --git a/src/ezgg_lan_manager/pages/__init__.py b/src/ezgg_lan_manager/pages/__init__.py index 8bb9e24..e682fb2 100644 --- a/src/ezgg_lan_manager/pages/__init__.py +++ b/src/ezgg_lan_manager/pages/__init__.py @@ -23,3 +23,4 @@ from .OverviewPage import OverviewPage from .TournamentDetailsPage import TournamentDetailsPage from .TournamentRulesPage import TournamentRulesPage from .ConwayPage import ConwayPage +from .TeamsPage import TeamsPage