feat: add loading spinner when starting a new game
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -29,10 +29,17 @@
|
||||
</div>
|
||||
{% else %}
|
||||
<div class="game-start-container">
|
||||
<form method="post" action="{{ path('app_game_start') }}">
|
||||
<form method="post" action="{{ path('app_game_start') }}" id="start-form">
|
||||
<input type="hidden" name="_token" value="{{ csrf_token('game_start') }}">
|
||||
<button type="submit" class="btn btn-primary btn-start">Commencer une partie</button>
|
||||
</form>
|
||||
<div class="start-loader" id="start-loader"></div>
|
||||
<script>
|
||||
document.getElementById('start-form').addEventListener('submit', function () {
|
||||
this.style.display = 'none';
|
||||
document.getElementById('start-loader').style.display = 'block';
|
||||
});
|
||||
</script>
|
||||
</div>
|
||||
{% endif %}
|
||||
{% endblock %}
|
||||
|
||||
Reference in New Issue
Block a user