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
Start or continue your game using the links below. [Score Sheet] is the link to the score sheet for + a signed-in user, [Public Score Sheet] is for non-registered users, copy the URL and send it to each user, + if you are on a phone, long press the link and Share.
+ +If you need to remove a player from the game, click the [Remove Player] button next to the player's name, there + score sheet and access token will be removed immediately.
+ @else +We are working on a game player log and game statistics, as soon as we add them, they will + appear here.
+ + @endif +Resume your open games...
+Start or continue your game(s) using the links below. [Score Sheet] is the link to the score sheet for + a signed-in user, [Public Score Sheet] is for non-registered users, copy the URL and send it to each user, + if you are on a phone, long press the link and Share.
+ +If you need to remove a player from the game, click the [Remove Player] button next to the player's name, there + score sheet and access token will be removed immediately.
+You haven't finished any games yet, once you do, - they will show up here. -
+ +As soon as you complete a game, this is where your recent games will show, + you will have quick access to statistics for each game and access to the + game log.
+You haven't added any players yet, you need to - add - some players before you can start a game. -
+ +Add a player using this link, as soon as + you do you can start a game..
+Select the players.
+Select the players, we will then generate score sheets for each of them.
@foreach ($players as $__player)Before you can start a game you need to add your players.
+Add a player using this link, as soon as + you do you can start a game..
+There are two ways to score, enter the sum of any relevant dice in a text box or + check the box to score the combination.
+If you can't score, use the scratch checkbox to zero the chosen combination.
+ +