Add Tournaments UI #32
BIN
src/ezgg_lan_manager/assets/img/games/darts.png
Normal file
|
After Width: | Height: | Size: 76 KiB |
BIN
src/ezgg_lan_manager/assets/img/games/dota2.png
Normal file
|
After Width: | Height: | Size: 23 KiB |
BIN
src/ezgg_lan_manager/assets/img/games/golfit.png
Normal file
|
After Width: | Height: | Size: 14 KiB |
BIN
src/ezgg_lan_manager/assets/img/games/jenga.png
Normal file
|
After Width: | Height: | Size: 6.2 KiB |
BIN
src/ezgg_lan_manager/assets/img/games/neoee.png
Normal file
|
After Width: | Height: | Size: 65 KiB |
BIN
src/ezgg_lan_manager/assets/img/games/tetris.png
Normal file
|
After Width: | Height: | Size: 17 KiB |
BIN
src/ezgg_lan_manager/assets/img/games/wikinger_schach.png
Normal file
|
After Width: | Height: | Size: 44 KiB |
@ -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
|
||||||
)
|
)
|
||||||
)
|
)
|
||||||
|
|||||||
@ -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(
|
||||||
|
|||||||
@ -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"]
|
||||||
|
|||||||