diff --git a/CHANGELOG.md b/CHANGELOG.md index 21133e3..579783d 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,13 @@ The complete changelog for the Costs to Expect REST API, our changelog follows the format defined at https://keepachangelog.com/en/1.0.0/ +## [0.8.0] - [2022-07-24] +### Added +- Confetti, who doesn't like confetti? + +### Changed +- Slightly decreased the time before a save happens. + ## [0.7.0] - [2022-07-23] ### Added - Added a table to the bottom of each score sheet, shows all the player scores, delayed by thirty seconds. diff --git a/config/app/config.php b/config/app/config.php index 010cb37..04c45d2 100644 --- a/config/app/config.php +++ b/config/app/config.php @@ -10,6 +10,6 @@ 'item_subtype_id' => env('ITEM_SUBTYPE_ID'), 'cookie_user' => env('SESSION_NAME_USER'), 'cookie_bearer' => env('SESSION_NAME_BEARER'), - 'version' => '0.7.0', - 'release_date' => '23rd July 2022' + 'version' => '0.8.0', + 'release_date' => '24th July 2022' ]; diff --git a/public/js/public-score-sheet.js b/public/js/public-score-sheet.js index cd94431..e519d7b 100644 --- a/public/js/public-score-sheet.js +++ b/public/js/public-score-sheet.js @@ -1,10 +1,10 @@ -(function (axios, bootstrap) { +(function (axios, bootstrap, confetti) { 'use strict' let token = document.getElementById('token'); let timeout = null; - let delay = 1500; + let delay = 1000; let factors = { "ones": 1, "twos": 2, "threes": 3, "fours": 4, "fives": 5, "sixes": 6 } let score_upper = document.getElementById('upper-score'); @@ -233,7 +233,18 @@ let display_toast = function (show_toast) { if (show_toast !== 'none') { const toast = new bootstrap.Toast(document.getElementById('toast_' + show_toast)) - toast.show() + toast.show(); + + if (show_toast === 'yahtzee') { + confetti({ + particleCount: 100, + }) + } + if (show_toast.startsWith('yahtzee_bonus')) { + confetti({ + particleCount: 500, + }) + } } } @@ -356,4 +367,4 @@ }); }, delay); } -})(axios, bootstrap); \ No newline at end of file +})(axios, bootstrap, confetti); \ No newline at end of file diff --git a/public/js/score-sheet.js b/public/js/score-sheet.js index ffb007d..de24f3a 100644 --- a/public/js/score-sheet.js +++ b/public/js/score-sheet.js @@ -1,11 +1,11 @@ -(function (axios, bootstrap) { +(function (axios, bootstrap, confetti) { 'use strict' let game_id = document.getElementById('game_id'); let player_id = document.getElementById('player_id'); let timeout = null; - let delay = 1500; + let delay = 1000; let factors = { "ones": 1, "twos": 2, "threes": 3, "fours": 4, "fives": 5, "sixes": 6 } let score_upper = document.getElementById('upper-score'); @@ -238,7 +238,18 @@ let display_toast = function (show_toast) { if (show_toast !== 'none') { const toast = new bootstrap.Toast(document.getElementById('toast_' + show_toast)) - toast.show() + toast.show(); + + if (show_toast === 'yahtzee') { + confetti({ + particleCount: 100, + }) + } + if (show_toast.startsWith('yahtzee_bonus')) { + confetti({ + particleCount: 500, + }) + } } } @@ -369,4 +380,4 @@ }); }, delay); } -})(axios, bootstrap); \ No newline at end of file +})(axios, bootstrap, confetti); \ No newline at end of file diff --git a/resources/views/public-score-sheet.blade.php b/resources/views/public-score-sheet.blade.php index 0707cd9..6cbb8da 100644 --- a/resources/views/public-score-sheet.blade.php +++ b/resources/views/public-score-sheet.blade.php @@ -535,6 +535,7 @@ + diff --git a/resources/views/score-sheet.blade.php b/resources/views/score-sheet.blade.php index 5a50d41..80b015d 100644 --- a/resources/views/score-sheet.blade.php +++ b/resources/views/score-sheet.blade.php @@ -546,6 +546,7 @@ + @endif