-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #26 from deanblackborough/main
v0.14.0
- Loading branch information
Showing
14 changed files
with
269 additions
and
6 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
(function (axios) { | ||
'use strict' | ||
|
||
let game_id = document.getElementById('game_id'); | ||
let player_id = document.getElementById('player_id'); | ||
|
||
let sleep = time => new Promise(resolve => setTimeout(resolve, time)) | ||
let poll = (promiseFn, time) => promiseFn().then( | ||
sleep(time).then(() => poll(promiseFn, time))) | ||
|
||
let fetchBonusMessage = function() { | ||
let bonus_message = document.querySelector('div.bonus-message'); | ||
|
||
axios.get('/game/' + game_id.value + '/player/' + player_id.value + '/bonus') | ||
.then(response => { | ||
if (response.data.length > 0) { | ||
bonus_message.innerHTML = response.data; | ||
} | ||
}); | ||
} | ||
|
||
poll(() => new Promise(() => fetchBonusMessage()), 1000 * 5) | ||
})(axios); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
(function (axios) { | ||
'use strict' | ||
|
||
let token = document.getElementById('token'); | ||
|
||
let sleep = time => new Promise(resolve => setTimeout(resolve, time)) | ||
let poll = (promiseFn, time) => promiseFn().then( | ||
sleep(time).then(() => poll(promiseFn, time))) | ||
|
||
let fetchBonusMessage = function() { | ||
let bonus_message = document.querySelector('div.bonus-message'); | ||
|
||
axios.get('/public/game/' + token.value + '/bonus') | ||
.then(response => { | ||
if (response.data.length > 0) { | ||
bonus_message.innerHTML = response.data; | ||
} | ||
}); | ||
} | ||
|
||
poll(() => new Promise(() => fetchBonusMessage()), 1000 * 5) | ||
})(axios); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
<p class="p-2">{{ $message }}</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -131,6 +131,9 @@ | |
<h3 class="text-center score text-black"><strong>Total</strong></h3> | ||
<h2 class="text-center mb-0 score total" id="upper-total">{{ $score_sheet['score']['upper'] + $score_sheet['score']['bonus'] }}</h2> | ||
</div> | ||
<div class="col-12 bonus-message"> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
|
@@ -540,5 +543,6 @@ | |
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/confetti.browser.min.js" defer></script> | ||
<script src="{{ asset('js/public-score-sheet.js?v0.7.0') }}" defer></script> | ||
<script src="{{ asset('js/public-player-scores.js?v0.7.0') }}" defer></script> | ||
<script src="{{ asset('js/public-bonus-message.js?v0.14.0') }}" defer></script> | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -139,6 +139,9 @@ | |
<h3 class="text-center score text-black"><strong>Total</strong></h3> | ||
<h2 class="text-center mb-0 score total" id="upper-total">{{ $score_sheet['score']['upper'] + $score_sheet['score']['bonus'] }}</h2> | ||
</div> | ||
<div class="col-12 bonus-message"> | ||
|
||
</div> | ||
</div> | ||
|
||
<div class="row"> | ||
|
@@ -547,8 +550,9 @@ | |
<script src="{{ asset('node_modules/axios/dist/axios.min.js') }}" defer></script> | ||
<script src="{{ asset('node_modules/bootstrap/dist/js/bootstrap.js') }}" defer></script> | ||
<script src="https://cdn.jsdelivr.net/npm/[email protected]/dist/confetti.browser.min.js" defer></script> | ||
<script src="{{ asset('js/score-sheet.js?v0.7.0') }}" defer></script> | ||
<script src="{{ asset('js/player-scores.js?v0.7.0') }}" defer></script> | ||
<script src="{{ asset('js/score-sheet.js?v0.14.0') }}" defer></script> | ||
<script src="{{ asset('js/player-scores.js?v0.14.0') }}" defer></script> | ||
<script src="{{ asset('js/bonus-message.js?v0.14.0') }}" defer></script> | ||
@endif | ||
</body> | ||
</html> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters