add Tournaments and Guest Page, add template for empty sites, extend user and db service
This commit is contained in:
@@ -0,0 +1,40 @@
|
||||
from rio import Column, Component, event, TextStyle, Text
|
||||
|
||||
from src.ez_lan_manager import ConfigurationService
|
||||
from src.ez_lan_manager.components.MainViewContentBox import MainViewContentBox
|
||||
from src.ez_lan_manager.pages import BasePage
|
||||
|
||||
class TournamentsPage(Component):
|
||||
@event.on_populate
|
||||
async def on_populate(self) -> None:
|
||||
await self.session.set_title(f"{self.session[ConfigurationService].get_lan_info().name} - Turniere")
|
||||
|
||||
def build(self) -> Component:
|
||||
return BasePage(
|
||||
content=Column(
|
||||
MainViewContentBox(
|
||||
Column(
|
||||
Text(
|
||||
text="Turniere",
|
||||
style=TextStyle(
|
||||
fill=self.session.theme.background_color,
|
||||
font_size=1.2
|
||||
),
|
||||
margin_top=2,
|
||||
margin_bottom=0,
|
||||
align_x=0.5
|
||||
),
|
||||
Text(
|
||||
text="Aktuell ist noch kein Turnierplan hinterlegt.",
|
||||
style=TextStyle(
|
||||
fill=self.session.theme.background_color,
|
||||
font_size=0.9
|
||||
),
|
||||
margin=1,
|
||||
wrap=True
|
||||
)
|
||||
)
|
||||
),
|
||||
align_y=0
|
||||
)
|
||||
)
|
||||
Reference in New Issue
Block a user