@ -36,6 +36,12 @@ body {
display: none;
}
#loading {
display: flex;
align-items: center;
justify-content: center;
footer {
margin-top: auto;
@ -1,4 +1,4 @@
const VERSION = 'v8'
const VERSION = 'v9'
const API_ORIGIN = 'https://scraper.infotren.dcdev.ro/'
const API_TRAINS = `${API_ORIGIN}v3/trains`
const API_STATIONS = `${API_ORIGIN}v3/stations`
@ -29,6 +29,10 @@
<h3 id="tabs-dep">Departures</h3>
</div>
<div id="loading" class="content">
<p class="pri">Loading data...</p>
<div id="arrivals" class="tab-view content">
@ -14,6 +14,8 @@ function onStationData(data) {
document.getElementById('date').textContent = data.date
document.getElementById('loading').classList.add('hidden')
/**
* @param {HTMLElement} elem
* @param {any[]} trains
@ -23,6 +23,10 @@
<p class="sec" id="date"></p>
<div id="group-choice" class="content hidden">
@ -22,6 +22,8 @@ function onTrainData(data) {
document.getElementById('company').textContent = data.operator
var group = null;
if (data.groups.length > 1 && groupIndex == null) {
document.getElementById('group-choice').classList.remove('hidden')