end of day commit
This commit is contained in:
@@ -55,6 +55,9 @@ class TournamentDetailsPage(Component):
|
||||
self.message = f"Erfolgreich abgemeldet!" # ToDo: Hook into Tournament Service
|
||||
self.loading = False
|
||||
|
||||
async def tree_button_clicked(self) -> None:
|
||||
pass # ToDo: Implement tournament tree view
|
||||
|
||||
def loading_done(self) -> None:
|
||||
if self.tournament is None:
|
||||
self.tournament = "Turnier konnte nicht gefunden werden"
|
||||
@@ -86,13 +89,23 @@ class TournamentDetailsPage(Component):
|
||||
)
|
||||
else:
|
||||
tournament_status_color = self.session.theme.background_color
|
||||
tree_button = Spacer(grow_x=False, grow_y=False)
|
||||
if self.tournament.status == TournamentStatus.OPEN:
|
||||
tournament_status_color = self.session.theme.success_color
|
||||
elif self.tournament.status == TournamentStatus.CLOSED:
|
||||
tournament_status_color = self.session.theme.danger_color
|
||||
elif self.tournament.status == TournamentStatus.ONGOING:
|
||||
elif self.tournament.status == TournamentStatus.ONGOING or self.tournament.status == TournamentStatus.COMPLETED:
|
||||
tournament_status_color = self.session.theme.warning_color
|
||||
|
||||
tree_button = Button(
|
||||
content="Turnierbaum anzeigen",
|
||||
shape="rectangle",
|
||||
style="minor",
|
||||
color="hud",
|
||||
margin_left=4,
|
||||
margin_right=4,
|
||||
margin_top=1,
|
||||
on_press=self.tree_button_clicked
|
||||
)
|
||||
|
||||
# ToDo: Integrate Teams logic
|
||||
ids_of_participants = [p.id for p in self.tournament.participants]
|
||||
@@ -163,6 +176,7 @@ class TournamentDetailsPage(Component):
|
||||
f"{len(self.tournament.participants)} / {self.tournament.max_participants}",
|
||||
self.session.theme.danger_color if self.tournament.is_full else self.session.theme.background_color
|
||||
),
|
||||
tree_button,
|
||||
Row(
|
||||
Text(
|
||||
text="Info",
|
||||
|
||||
Reference in New Issue
Block a user