commit d2c37c93687bec76fd3d62bc81b42d715e91def5
parent 930eb928236ad04f5b781c1ac3afe320c688fe2e
Author: Katja (ctucx) <git@ctu.cx>
Date: Tue, 21 Jan 2025 22:48:56 +0100
parent 930eb928236ad04f5b781c1ac3afe320c688fe2e
Author: Katja (ctucx) <git@ctu.cx>
Date: Tue, 21 Jan 2025 22:48:56 +0100
{departues,trip}View: remove unused code
2 files changed, 0 insertions(+), 22 deletions(-)
diff --git a/src/departuresView.js b/src/departuresView.js @@ -74,25 +74,4 @@ export const departuresView = async (match, isUpdate) => { render(departuresTemplate(data, profile), ElementById('content')); - //if (!isUpdate) refreshJourneyView(refreshToken); // update data in the background - - /*const history_id = dataStorage.journeysHistory.findIndex(obj => obj.reqId === reqId); - - if (dataStorage.journeysHistory[history_id] !== undefined) { - dataStorage.journeysHistory[history_id].journeyId = journeyId; - saveDataStorage(); - }*/ -}; - -const refreshJourneyView = async (refreshToken, profile) => { - document.querySelector('.icon-reload').classList.add('spinning'); - try { - await refreshJourney(refreshToken, profile); - } catch(e) { - showAlertModal(e.toString()); - document.querySelector('.icon-reload').classList.remove('spinning'); - throw e; - } - journeyView([profile, refreshToken], true); - document.querySelector('.icon-reload').classList.remove('spinning'); };
diff --git a/src/tripView.js b/src/tripView.js @@ -26,7 +26,6 @@ const tripTemplate = (data, profile) => { } } - //<p>b>${t('duration')}: ${formatDuration(duration)} | ${t('changes')}: ${changes-1} | ${t('date')}: ${formatDateTime(data.plannedDeparture, 'date')}${settings.showPrices && data.price ? html` | ${t('price')}: <td><span>${formatPrice(data.price)}</span></td>` : ''}</b></p> return html` <div class="journey"> <header>