Replace loading text by a spinner

This commit is contained in:
Emmy D'Anello 2023-02-19 17:43:36 +01:00
parent 06f836e13f
commit 0f61b3bece
Signed by: ynerant
GPG Key ID: 3A75C55819C8CF85

View File

@ -72,7 +72,7 @@
let day_elem = document.getElementById('day')
let result_elem = document.getElementById('result')
document.getElementById('form').addEventListener('submit', () => {
result_elem.innerHTML = 'Chargement…'
result_elem.innerHTML = '<div class="spinner-border" role="status"><span class="visually-hidden">Chargement…</span></div>'
fetch('/api/routes/' + day_elem.value + '/' + origin_elem.value + '/' + (destination_elem.value || 'undefined') + '/')
.then(resp => resp.json())
.then(routes => {