Implementierung der Games #203
@@ -80,6 +80,7 @@
|
|||||||
"members": "Mitglieder",
|
"members": "Mitglieder",
|
||||||
"most_points": "Höchste Punkte",
|
"most_points": "Höchste Punkte",
|
||||||
"no_data_available": "Keine Daten verfügbar",
|
"no_data_available": "Keine Daten verfügbar",
|
||||||
|
"no_games_created_yet": "Noch keine Spielvorlagen erstellt",
|
||||||
"no_groups_created_yet": "Noch keine Gruppen erstellt",
|
"no_groups_created_yet": "Noch keine Gruppen erstellt",
|
||||||
"no_licenses_found": "Keine Lizenzen gefunden",
|
"no_licenses_found": "Keine Lizenzen gefunden",
|
||||||
"no_license_text_available": "Kein Lizenztext verfügbar",
|
"no_license_text_available": "Kein Lizenztext verfügbar",
|
||||||
@@ -125,6 +126,7 @@
|
|||||||
"statistics": "Statistiken",
|
"statistics": "Statistiken",
|
||||||
"stats": "Statistiken",
|
"stats": "Statistiken",
|
||||||
"successfully_added_player": "Spieler:in {playerName} erfolgreich hinzugefügt",
|
"successfully_added_player": "Spieler:in {playerName} erfolgreich hinzugefügt",
|
||||||
|
"there_are_no_games_matching_your_search": "Es gibt keine Spielvorlagen, die deiner Suche entspricht",
|
||||||
"there_is_no_group_matching_your_search": "Es gibt keine Gruppe, die deiner Suche entspricht",
|
"there_is_no_group_matching_your_search": "Es gibt keine Gruppe, die deiner Suche entspricht",
|
||||||
"this_cannot_be_undone": "Dies kann nicht rückgängig gemacht werden.",
|
"this_cannot_be_undone": "Dies kann nicht rückgängig gemacht werden.",
|
||||||
"tie": "Unentschieden",
|
"tie": "Unentschieden",
|
||||||
|
|||||||
@@ -81,6 +81,7 @@
|
|||||||
"members": "Members",
|
"members": "Members",
|
||||||
"most_points": "Most Points",
|
"most_points": "Most Points",
|
||||||
"no_data_available": "No data available",
|
"no_data_available": "No data available",
|
||||||
|
"no_games_created_yet": "No games created yet",
|
||||||
"no_groups_created_yet": "No groups created yet",
|
"no_groups_created_yet": "No groups created yet",
|
||||||
"no_licenses_found": "No licenses found",
|
"no_licenses_found": "No licenses found",
|
||||||
"no_license_text_available": "No license text available",
|
"no_license_text_available": "No license text available",
|
||||||
@@ -134,6 +135,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
|
"there_are_no_games_matching_your_search": "There are no games matching your search",
|
||||||
"there_is_no_group_matching_your_search": "There is no group matching your search",
|
"there_is_no_group_matching_your_search": "There is no group matching your search",
|
||||||
"this_cannot_be_undone": "This can't be undone.",
|
"this_cannot_be_undone": "This can't be undone.",
|
||||||
"tie": "Tie",
|
"tie": "Tie",
|
||||||
|
|||||||
@@ -536,6 +536,12 @@ abstract class AppLocalizations {
|
|||||||
/// **'No data available'**
|
/// **'No data available'**
|
||||||
String get no_data_available;
|
String get no_data_available;
|
||||||
|
|
||||||
|
/// No description provided for @no_games_created_yet.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'No games created yet'**
|
||||||
|
String get no_games_created_yet;
|
||||||
|
|
||||||
/// No description provided for @no_groups_created_yet.
|
/// No description provided for @no_groups_created_yet.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
@@ -800,6 +806,12 @@ abstract class AppLocalizations {
|
|||||||
/// **'Successfully added player {playerName}'**
|
/// **'Successfully added player {playerName}'**
|
||||||
String successfully_added_player(String playerName);
|
String successfully_added_player(String playerName);
|
||||||
|
|
||||||
|
/// No description provided for @there_are_no_games_matching_your_search.
|
||||||
|
///
|
||||||
|
/// In en, this message translates to:
|
||||||
|
/// **'There are no games matching your search'**
|
||||||
|
String get there_are_no_games_matching_your_search;
|
||||||
|
|
||||||
/// No description provided for @there_is_no_group_matching_your_search.
|
/// No description provided for @there_is_no_group_matching_your_search.
|
||||||
///
|
///
|
||||||
/// In en, this message translates to:
|
/// In en, this message translates to:
|
||||||
|
|||||||
@@ -243,6 +243,9 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get no_data_available => 'Keine Daten verfügbar';
|
String get no_data_available => 'Keine Daten verfügbar';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get no_games_created_yet => 'Noch keine Spielvorlagen erstellt';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get no_groups_created_yet => 'Noch keine Gruppen erstellt';
|
String get no_groups_created_yet => 'Noch keine Gruppen erstellt';
|
||||||
|
|
||||||
@@ -382,6 +385,10 @@ class AppLocalizationsDe extends AppLocalizations {
|
|||||||
return 'Spieler:in $playerName erfolgreich hinzugefügt';
|
return 'Spieler:in $playerName erfolgreich hinzugefügt';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get there_are_no_games_matching_your_search =>
|
||||||
|
'Es gibt keine Spielvorlagen, die deiner Suche entspricht';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get there_is_no_group_matching_your_search =>
|
String get there_is_no_group_matching_your_search =>
|
||||||
'Es gibt keine Gruppe, die deiner Suche entspricht';
|
'Es gibt keine Gruppe, die deiner Suche entspricht';
|
||||||
|
|||||||
@@ -243,6 +243,9 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
@override
|
@override
|
||||||
String get no_data_available => 'No data available';
|
String get no_data_available => 'No data available';
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get no_games_created_yet => 'No games created yet';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get no_groups_created_yet => 'No groups created yet';
|
String get no_groups_created_yet => 'No groups created yet';
|
||||||
|
|
||||||
@@ -382,6 +385,10 @@ class AppLocalizationsEn extends AppLocalizations {
|
|||||||
return 'Successfully added player $playerName';
|
return 'Successfully added player $playerName';
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@override
|
||||||
|
String get there_are_no_games_matching_your_search =>
|
||||||
|
'There are no games matching your search';
|
||||||
|
|
||||||
@override
|
@override
|
||||||
String get there_is_no_group_matching_your_search =>
|
String get there_is_no_group_matching_your_search =>
|
||||||
'There is no group matching your search';
|
'There is no group matching your search';
|
||||||
|
|||||||
@@ -9,6 +9,7 @@ import 'package:tallee/l10n/generated/app_localizations.dart';
|
|||||||
import 'package:tallee/presentation/views/main_menu/match_view/create_match/create_game_view.dart';
|
import 'package:tallee/presentation/views/main_menu/match_view/create_match/create_game_view.dart';
|
||||||
import 'package:tallee/presentation/widgets/text_input/custom_search_bar.dart';
|
import 'package:tallee/presentation/widgets/text_input/custom_search_bar.dart';
|
||||||
import 'package:tallee/presentation/widgets/tiles/game_tile.dart';
|
import 'package:tallee/presentation/widgets/tiles/game_tile.dart';
|
||||||
|
import 'package:tallee/presentation/widgets/top_centered_message.dart';
|
||||||
|
|
||||||
class ChooseGameView extends StatefulWidget {
|
class ChooseGameView extends StatefulWidget {
|
||||||
/// A view that allows the user to choose a game from a list of available games
|
/// A view that allows the user to choose a game from a list of available games
|
||||||
@@ -134,6 +135,23 @@ class _ChooseGameViewState extends State<ChooseGameView> {
|
|||||||
|
|
||||||
// Game list
|
// Game list
|
||||||
Expanded(
|
Expanded(
|
||||||
|
child: Visibility(
|
||||||
|
visible: filteredGames.isNotEmpty,
|
||||||
|
replacement: Visibility(
|
||||||
|
visible: widget.games.isNotEmpty,
|
||||||
|
replacement: TopCenteredMessage(
|
||||||
|
icon: Icons.info,
|
||||||
|
title: loc.info,
|
||||||
|
message: loc.no_games_created_yet,
|
||||||
|
),
|
||||||
|
child: TopCenteredMessage(
|
||||||
|
icon: Icons.info,
|
||||||
|
title: loc.info,
|
||||||
|
message: AppLocalizations.of(
|
||||||
|
context,
|
||||||
|
).there_are_no_games_matching_your_search,
|
||||||
|
),
|
||||||
|
),
|
||||||
child: ListView.builder(
|
child: ListView.builder(
|
||||||
itemCount: filteredGames.length,
|
itemCount: filteredGames.length,
|
||||||
itemBuilder: (BuildContext context, int index) {
|
itemBuilder: (BuildContext context, int index) {
|
||||||
@@ -141,7 +159,10 @@ class _ChooseGameViewState extends State<ChooseGameView> {
|
|||||||
return GameTile(
|
return GameTile(
|
||||||
title: game.name,
|
title: game.name,
|
||||||
description: game.description,
|
description: game.description,
|
||||||
badgeText: translateRulesetToString(game.ruleset, context),
|
badgeText: translateRulesetToString(
|
||||||
|
game.ruleset,
|
||||||
|
context,
|
||||||
|
),
|
||||||
badgeColor: getColorFromGameColor(game.color),
|
badgeColor: getColorFromGameColor(game.color),
|
||||||
isHighlighted: selectedGameId == game.id,
|
isHighlighted: selectedGameId == game.id,
|
||||||
onTap: () async {
|
onTap: () async {
|
||||||
@@ -195,6 +216,7 @@ class _ChooseGameViewState extends State<ChooseGameView> {
|
|||||||
},
|
},
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
),
|
||||||
],
|
],
|
||||||
),
|
),
|
||||||
),
|
),
|
||||||
|
|||||||
Reference in New Issue
Block a user