Revert "Merge branch 'feature/193-statisticsview-rework' into development"
All checks were successful
Push Pipeline / update_version (push) Successful in 6s
Push Pipeline / generate_licenses (push) Successful in 38s
Push Pipeline / generate_localizations (push) Successful in 29s
Push Pipeline / test (push) Successful in 1m35s
Push Pipeline / sort_arb_files (push) Successful in 31s
Push Pipeline / format (push) Successful in 55s
Push Pipeline / build (push) Successful in 4m58s

This reverts commit 24f49e17b9, reversing
changes made to dba6c218d6.

# Conflicts:
#	pubspec.yaml
This commit is contained in:
2026-05-25 14:55:19 +02:00
parent 5659dc36c2
commit 9b208f4780
69 changed files with 834 additions and 6965 deletions

View File

@@ -164,7 +164,7 @@ class _ChooseGameViewState extends State<ChooseGameView> {
game.ruleset,
context,
),
badgeColor: getColorFromAppColor(game.color),
badgeColor: getColorFromGameColor(game.color),
isHighlighted: selectedGameId == game.id,
onTap: () async {
setState(() {

View File

@@ -49,10 +49,10 @@ class _CreateGameViewState extends State<CreateGameView> {
late final AppDatabase db;
late List<(Ruleset, String)> _rulesets;
late List<(AppColor, String)> _colors;
late List<(GameColor, String)> _colors;
Ruleset? selectedRuleset = Ruleset.singleWinner;
AppColor? selectedColor = AppColor.orange;
GameColor? selectedColor = GameColor.orange;
/// Controller for the game name input field.
final _gameNameController = TextEditingController();
@@ -87,10 +87,10 @@ class _CreateGameViewState extends State<CreateGameView> {
),
);
_colors = List.generate(
AppColor.values.length,
GameColor.values.length,
(index) => (
AppColor.values[index],
translateAppColorToString(AppColor.values[index], context),
GameColor.values[index],
translateGameColorToString(GameColor.values[index], context),
),
);
@@ -117,6 +117,7 @@ class _CreateGameViewState extends State<CreateGameView> {
return ScaffoldMessenger(
child: Scaffold(
backgroundColor: CustomTheme.backgroundColor,
appBar: AppBar(
title: Text(isEditing ? loc.edit_game : loc.create_game),
actions: [
@@ -467,7 +468,7 @@ class _CreateGameViewState extends State<CreateGameView> {
height: 16,
margin: const EdgeInsets.only(left: 12),
decoration: BoxDecoration(
color: getColorFromAppColor(
color: getColorFromGameColor(
_colors[index].$1,
),
shape: BoxShape.circle,
@@ -501,13 +502,13 @@ class _CreateGameViewState extends State<CreateGameView> {
width: 16,
height: 16,
decoration: BoxDecoration(
color: getColorFromAppColor(selectedColor!),
color: getColorFromGameColor(selectedColor!),
shape: BoxShape.circle,
),
),
Padding(
padding: const EdgeInsets.only(right: 5),
child: Text(translateAppColorToString(selectedColor!, context)),
child: Text(translateGameColorToString(selectedColor!, context)),
),
Transform.rotate(
angle: pi / 2,

View File

@@ -196,7 +196,6 @@ class _CreateMatchViewState extends State<CreateMatchView> {
child: PlayerSelection(
key: ValueKey(selectedGroup?.id ?? 'no_group'),
initialSelectedPlayers: selectedPlayers,
onPlayerCreated: () => widget.onMatchesUpdated?.call(),
onChanged: (value) {
setState(() {
selectedPlayers = value;

View File

@@ -39,7 +39,7 @@ class _MatchViewState extends State<MatchView> {
game: Game(
name: 'Game name',
ruleset: Ruleset.singleWinner,
color: AppColor.blue,
color: GameColor.blue,
icon: '',
),
group: Group(
@@ -79,7 +79,7 @@ class _MatchViewState extends State<MatchView> {
visible: matches.isNotEmpty,
replacement: Center(
child: TopCenteredMessage(
icon: Icons.info,
icon: Icons.report,
title: loc.info,
message: loc.no_matches_created_yet,
),
@@ -97,7 +97,6 @@ class _MatchViewState extends State<MatchView> {
child: Padding(
padding: const EdgeInsets.only(bottom: 12.0),
child: MatchTile(
onPlayerEdited: loadMatches,
width: MediaQuery.sizeOf(context).width * 0.95,
onTap: () async {
Navigator.push(