Added empty winner tile

This commit is contained in:
2026-01-18 00:36:15 +01:00
parent 7faf80de03
commit eb114f2853
6 changed files with 44 additions and 19 deletions

View File

@@ -61,6 +61,7 @@
"no_players_found_with_that_name": "Keine Spieler:in mit diesem Namen gefunden",
"no_players_selected": "Keine Spieler:innen ausgewählt",
"no_recent_matches_available": "Keine letzten Spiele verfügbar",
"no_results_entered_yet": "Noch keine Ergebnisse eingetragen",
"no_second_match_available": "Kein zweites Spiel verfügbar",
"no_statistics_available": "Keine Statistiken verfügbar",
"none": "Kein",

View File

@@ -188,6 +188,9 @@
"@no_recent_matches_available": {
"description": "Message when no recent matches exist"
},
"@no_results_entered_yet": {
"description": "Message when no results have been entered yet"
},
"@no_second_match_available": {
"description": "Message when no second match exists"
},
@@ -371,6 +374,7 @@
"no_players_found_with_that_name": "No players found with that name",
"no_players_selected": "No players selected",
"no_recent_matches_available": "No recent matches available",
"no_results_entered_yet": "No results entered yet",
"no_second_match_available": "No second match available",
"no_statistics_available": "No statistics available",
"none": "None",

View File

@@ -464,6 +464,12 @@ abstract class AppLocalizations {
/// **'No recent matches available'**
String get no_recent_matches_available;
/// Message when no results have been entered yet
///
/// In en, this message translates to:
/// **'No results entered yet'**
String get no_results_entered_yet;
/// Message when no second match exists
///
/// In en, this message translates to:

View File

@@ -197,6 +197,9 @@ class AppLocalizationsDe extends AppLocalizations {
@override
String get no_recent_matches_available => 'Keine letzten Spiele verfügbar';
@override
String get no_results_entered_yet => 'Noch keine Ergebnisse eingetragen';
@override
String get no_second_match_available => 'Kein zweites Spiel verfügbar';

View File

@@ -197,6 +197,9 @@ class AppLocalizationsEn extends AppLocalizations {
@override
String get no_recent_matches_available => 'No recent matches available';
@override
String get no_results_entered_yet => 'No results entered yet';
@override
String get no_second_match_available => 'No second match available';

View File

@@ -51,10 +51,6 @@ class _MatchProfileViewState extends State<MatchProfileView> {
@override
Widget build(BuildContext context) {
final loc = AppLocalizations.of(context);
final extraPlayersCount =
(widget.match.players?.length ?? 0) +
(widget.match.group?.members.length ?? 0) -
allPlayers.length;
return Scaffold(
backgroundColor: CustomTheme.backgroundColor,
@@ -144,6 +140,7 @@ class _MatchProfileViewState extends State<MatchProfileView> {
const Icon(Icons.group),
const SizedBox(width: 8),
Text(
// TODO: Update after DB changes
'${widget.match.group!.name} ${widget.match.players != null ? '+ ${widget.match.players!.length}' : ''}',
style: const TextStyle(fontWeight: FontWeight.bold),
),
@@ -180,6 +177,8 @@ class _MatchProfileViewState extends State<MatchProfileView> {
child: Row(
mainAxisAlignment: MainAxisAlignment.spaceBetween,
children: [
/// TODO: Implement different ruleset results display
if (widget.match.winner != null) ...[
Text(
loc.winner,
style: const TextStyle(
@@ -197,6 +196,15 @@ class _MatchProfileViewState extends State<MatchProfileView> {
: CustomTheme.textColor,
),
),
] else ...[
Text(
loc.no_results_entered_yet,
style: const TextStyle(
fontSize: 14,
color: CustomTheme.textColor,
),
),
],
],
),
),