Add Tournaments UI #32

Merged
Typhus merged 10 commits from feature/add-tournaments-ui into main 2026-02-03 23:00:58 +00:00
10 changed files with 5 additions and 5 deletions
Showing only changes of commit b612fc9c81 - Show all commits

Binary file not shown.

After

Width:  |  Height:  |  Size: 76 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 14 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.2 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 65 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 44 KiB

View File

@ -70,9 +70,9 @@ class ManageTournamentsPage(Component):
Text(tournament.name, style=TextStyle(fill=self.session.theme.background_color, font_size=0.8), justify="left", margin_right=1.5), Text(tournament.name, style=TextStyle(fill=self.session.theme.background_color, font_size=0.8), justify="left", margin_right=1.5),
Text(f"{weekday_to_display_text(tournament.start_time.weekday())[:2]}.{tournament.start_time.strftime('%H:%M')} Uhr", style=TextStyle(fill=start_time_color, font_size=0.8), justify="left", margin_right=1), Text(f"{weekday_to_display_text(tournament.start_time.weekday())[:2]}.{tournament.start_time.strftime('%H:%M')} Uhr", style=TextStyle(fill=start_time_color, font_size=0.8), justify="left", margin_right=1),
Spacer(), Spacer(),
Tooltip(anchor=IconButton("material/play_arrow", min_size=2, margin_right=1, on_press=lambda: self.on_start_pressed(tournament.id)), tip="Starten"), Tooltip(anchor=IconButton("material/play_arrow", min_size=2, margin_right=0.5, on_press=lambda: self.on_start_pressed(tournament.id)), tip="Starten"),
Tooltip(anchor=IconButton("material/cancel_schedule_send", min_size=2, margin_right=1, on_press=lambda: self.on_cancel_pressed(tournament.id)), tip="Absagen"), Tooltip(anchor=IconButton("material/cancel_schedule_send", min_size=2, margin_right=0.5, on_press=lambda: self.on_cancel_pressed(tournament.id)), tip="Absagen"),
Tooltip(anchor=IconButton("material/person_cancel", min_size=2, margin_right=1, on_press=lambda: self.on_remove_participant_pressed(tournament.id)), tip="Spieler entfernen"), Tooltip(anchor=IconButton("material/person_cancel", min_size=2, on_press=lambda: self.on_remove_participant_pressed(tournament.id)), tip="Spieler entfernen"),
margin=1 margin=1
) )
) )

View File

@ -175,7 +175,7 @@ class TournamentDetailsPage(Component):
content = Column( content = Column(
Row( Row(
Image(image=from_root(f"src/ezgg_lan_manager/assets/img/games/{self.tournament.game_title.image_name}")), Image(image=from_root(f"src/ezgg_lan_manager/assets/img/games/{self.tournament.game_title.image_name}"), margin_right=1),
Text( Text(
text=self.tournament.name, text=self.tournament.name,
style=TextStyle( style=TextStyle(

View File

@ -920,7 +920,7 @@ class DatabaseService:
format_=self._parse_tournament_format(row["tournament_format"]), format_=self._parse_tournament_format(row["tournament_format"]),
start_time=row["start_time"], start_time=row["start_time"],
status=self._parse_tournament_status(row["tournament_status"]), status=self._parse_tournament_status(row["tournament_status"]),
participants=[Participant(id_=row["user_id"], participant_type=self._parse_participant_type(row["participant_type"]))], participants=[Participant(id_=row["user_id"], participant_type=self._parse_participant_type(row["participant_type"]))] if row["user_id"] is not None else [],
matches=None, # ToDo: Implement matches=None, # ToDo: Implement
rounds=[], # ToDo: Implement rounds=[], # ToDo: Implement
max_participants=row["max_participants"] max_participants=row["max_participants"]