diff --git a/CHANGELOG.md b/CHANGELOG.md index 3a73482..8148911 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,16 @@ The complete changelog for the Costs to Expect REST API, our changelog follows the format defined at https://keepachangelog.com/en/1.0.0/ +## [1.07.0] - [2022-08-29] +### Changed +- Added a "How to score" section to the top of each score sheet. +- Added text explaining all the options above open games. +- Renamed the "Share" link. +- Improved the experience for new users, added text to guide the user. +### Fixed +- Corrected a validation error when credentials are invalid. +- Corrected menu links. + ## [1.06.1] - [2022-08-27] ### Changed - Updated the footer. diff --git a/app/Auth/Guard/Api/Guard.php b/app/Auth/Guard/Api/Guard.php index 33a8fa0..c56fe9d 100644 --- a/app/Auth/Guard/Api/Guard.php +++ b/app/Auth/Guard/Api/Guard.php @@ -107,7 +107,7 @@ public function validate(array $credentials = [], bool $remember_me = false): bo } if ($response['status'] === 401) { - $this->errors = ['email' => [$response['content']['message']]]; + $this->errors = ['email' => [$response['content']]]; return false; } diff --git a/app/Http/Controllers/Index.php b/app/Http/Controllers/Index.php index a520e46..cb8aa40 100644 --- a/app/Http/Controllers/Index.php +++ b/app/Http/Controllers/Index.php @@ -17,6 +17,12 @@ public function home(Request $request) { $this->bootstrap($request); + $user = $this->api->getAuthUser(); + + if ($user['status'] !== 200) { + abort(404, 'Unable to fetch your account information from the Costs to Expect API'); + } + $open_games_response = $this->api->getGames( $this->resource_type_id, $this->resource_id, @@ -69,6 +75,8 @@ public function home(Request $request) return view( 'home', [ + 'user_id' => $user['content']['id'], + 'resource_type_id' => $this->resource_type_id, 'resource_id' => $this->resource_id, diff --git a/config/app/config.php b/config/app/config.php index 9175690..63d5a90 100644 --- a/config/app/config.php +++ b/config/app/config.php @@ -11,6 +11,6 @@ 'error_email' => env('ERROR_EMAIL'), 'cookie_user' => env('SESSION_NAME_USER'), 'cookie_bearer' => env('SESSION_NAME_BEARER'), - 'version' => '1.06.1', - 'release_date' => '27th August 2022' + 'version' => '1.07.0', + 'release_date' => '29th August 2022' ]; diff --git a/resources/views/components/offcanvas.blade.php b/resources/views/components/offcanvas.blade.php index 3d37cb7..b5d4029 100644 --- a/resources/views/components/offcanvas.blade.php +++ b/resources/views/components/offcanvas.blade.php @@ -25,13 +25,13 @@ Home @@ -122,9 +129,14 @@ @endforeach @else -

You haven't finished any games yet, once you do, - they will show up here. -

+ + + @endif @@ -146,10 +158,13 @@ @endforeach @else -

You haven't added any players yet, you need to - add - some players before you can start a game. -

+ + + @endif diff --git a/resources/views/new-game.blade.php b/resources/views/new-game.blade.php index 76b296d..fffe7d4 100644 --- a/resources/views/new-game.blade.php +++ b/resources/views/new-game.blade.php @@ -20,8 +20,8 @@ @csrf
-

New Game

-

Select the players.

+

Start a New Game

+

Select the players, we will then generate score sheets for each of them.

@foreach ($players as $__player)
@@ -47,10 +47,12 @@ @else - - You can't start a game without players, add at least one - player to get started. - + @endif diff --git a/resources/views/public-score-sheet.blade.php b/resources/views/public-score-sheet.blade.php index e14c2b4..fcc4bf6 100644 --- a/resources/views/public-score-sheet.blade.php +++ b/resources/views/public-score-sheet.blade.php @@ -23,12 +23,19 @@

Player: {{ $player_name }}

+ +

Upper Section

-
How to score

Score the total of all the matched dice.

diff --git a/resources/views/score-sheet.blade.php b/resources/views/score-sheet.blade.php index db5d1ee..26fb46a 100644 --- a/resources/views/score-sheet.blade.php +++ b/resources/views/score-sheet.blade.php @@ -17,13 +17,21 @@

Player: {{ $player_name }}

+ +

Upper Section

-
How to score
+

Score the total of all the matched dice.