diff --git a/src/lib/DevBanner.svelte b/src/lib/DevBanner.svelte index 549ae60..98d927b 100644 --- a/src/lib/DevBanner.svelte +++ b/src/lib/DevBanner.svelte @@ -3,7 +3,7 @@ \ No newline at end of file + diff --git a/src/lib/buttons/ScriptButton.svelte b/src/lib/buttons/ScriptButton.svelte index 56dd6db..734bff5 100644 --- a/src/lib/buttons/ScriptButton.svelte +++ b/src/lib/buttons/ScriptButton.svelte @@ -31,6 +31,6 @@ .script-button:hover { box-shadow: var(--box-shadow-dark); - background-color: rgb(45,45,45); + background-color: rgb(45, 45, 45); } - \ No newline at end of file + diff --git a/src/lib/cards/NearToMeCard.svelte b/src/lib/cards/NearToMeCard.svelte index 36e71ab..a69dc1f 100644 --- a/src/lib/cards/NearToMeCard.svelte +++ b/src/lib/cards/NearToMeCard.svelte @@ -40,7 +40,7 @@ try { const apiResponse = (await apiGet(apiPath)) as NearestStationResponse[]; stations = apiResponse; - nearToMeCache.set(apiResponse) + nearToMeCache.set(apiResponse); } catch (err) { errorMessage = err as string; } finally { @@ -54,7 +54,7 @@ errorMessage = "Register to use this feature"; } else { if ($nearToMeCache.length) { - stations = $nearToMeCache + stations = $nearToMeCache; } getNearestStations(); } @@ -66,26 +66,24 @@ {#if blockLoading} - {:else} - {#if !$uuid || $uuid === "null"} - - {:else if $location} - {#if !stations.length} - {#if errorMessage} -

{errorMessage}

- {:else} - - {/if} + {:else if !$uuid || $uuid === "null"} + + {:else if $location} + {#if !stations.length} + {#if errorMessage} +

{errorMessage}

{:else} -
- {#each stations as station} - - {/each} -
+ {/if} {:else} - +
+ {#each stations as station} + + {/each} +
{/if} + {:else} + {/if}
diff --git a/src/lib/cards/QuickLinkCard.svelte b/src/lib/cards/QuickLinkCard.svelte index bf75246..548a0ae 100644 --- a/src/lib/cards/QuickLinkCard.svelte +++ b/src/lib/cards/QuickLinkCard.svelte @@ -11,7 +11,7 @@ helpText: "", onRefresh: () => {}, refreshing: false, - } + }; @@ -40,4 +40,4 @@ margin: auto; padding-top: 5px; } - \ No newline at end of file + diff --git a/src/lib/ldb/common/nrcc/alert-bar.svelte b/src/lib/ldb/common/nrcc/alert-bar.svelte index dd49055..2f06fec 100644 --- a/src/lib/ldb/common/nrcc/alert-bar.svelte +++ b/src/lib/ldb/common/nrcc/alert-bar.svelte @@ -1,6 +1,6 @@ {#if nrcc.length} @@ -73,7 +72,6 @@ {:then data} {#if data} - {#if data.trainServices?.length} {/if} diff --git a/src/lib/ldb/staff/table/table-generator.svelte b/src/lib/ldb/staff/table/table-generator.svelte index a3b9c78..0532802 100644 --- a/src/lib/ldb/staff/table/table-generator.svelte +++ b/src/lib/ldb/staff/table/table-generator.svelte @@ -75,7 +75,7 @@

Your display is too small to view this data

Try rotating your device

- +
diff --git a/src/lib/navigation/TimeBar.svelte b/src/lib/navigation/TimeBar.svelte index 5753386..3b795f9 100644 --- a/src/lib/navigation/TimeBar.svelte +++ b/src/lib/navigation/TimeBar.svelte @@ -4,29 +4,29 @@ export let updatedTime: Date | undefined; -let currentTime: string = "00:00:00" -let updateDisplay: string; -function updateTime() { - const now = new Date(); - const hours = now.getHours().toString().padStart(2, '0'); - const mins = now.getMinutes().toString().padStart(2, '0'); - const secs = now.getSeconds().toString().padStart(2, '0'); - currentTime = `${hours}:${mins}:${secs}` -} + let currentTime: string = "00:00:00"; + let updateDisplay: string; + function updateTime() { + const now = new Date(); + const hours = now.getHours().toString().padStart(2, "0"); + const mins = now.getMinutes().toString().padStart(2, "0"); + const secs = now.getSeconds().toString().padStart(2, "0"); + currentTime = `${hours}:${mins}:${secs}`; + } -onMount(() => { - console.log("TimeBar component mounted") - updateTime(); - const interval = setInterval(updateTime, 250); - return () => clearInterval(interval); -}) + onMount(() => { + console.log("TimeBar component mounted"); + updateTime(); + const interval = setInterval(updateTime, 250); + return () => clearInterval(interval); + });
{#if updatedTime} Updated: {updatedTime.toLocaleTimeString()} {:else} - + {/if} {currentTime}
@@ -42,16 +42,16 @@ onMount(() => { padding: 0; } .updated-time { - font-family: firamono, 'Courier New', Courier, monospace; + font-family: firamono, "Courier New", Courier, monospace; margin-left: 10px; font-size: 14px; } .current-time { - font-family: firamono, 'Courier New', Courier, monospace; + font-family: firamono, "Courier New", Courier, monospace; font-weight: 900; vertical-align: middle; color: aliceblue; margin-right: 10px; font-size: 17px; } - \ No newline at end of file + diff --git a/src/lib/navigation/nav-ldb.svelte b/src/lib/navigation/nav-ldb.svelte index 629d352..da4a53c 100644 --- a/src/lib/navigation/nav-ldb.svelte +++ b/src/lib/navigation/nav-ldb.svelte @@ -8,7 +8,6 @@ ]; import { page } from "$app/stores"; import { IconHome } from "@tabler/icons-svelte"; -
diff --git a/src/routes/+page.svelte b/src/routes/+page.svelte index 74825e3..dee96b5 100644 --- a/src/routes/+page.svelte +++ b/src/routes/+page.svelte @@ -16,7 +16,7 @@ formAction: "/ldb", placeholder: "enter crs/tiploc", maxLen: 7, - fieldName: "station" + fieldName: "station", }, { title: "Timetable & PIS", @@ -24,7 +24,7 @@ formAction: "/train", placeholder: "enter headcode", maxLen: 4, - fieldName: "headcode" + fieldName: "headcode", }, ]; diff --git a/src/routes/more/reasons/+page.svelte b/src/routes/more/reasons/+page.svelte index 00c4202..e948f67 100644 --- a/src/routes/more/reasons/+page.svelte +++ b/src/routes/more/reasons/+page.svelte @@ -27,7 +27,7 @@ helpText: "", onRefresh: () => {}, refreshing: false, - } + }; function load() { isLoading = true; @@ -41,8 +41,8 @@ async function getData() { if (inputValue) { const apiPath = `/api/v2/ref/reasonCode/${inputValue}`; - const res = await apiGet(apiPath) - return res + const res = await apiGet(apiPath); + return res; } else { return []; } diff --git a/src/routes/test/+page.svelte b/src/routes/test/+page.svelte index f5c9106..8cc72c0 100644 --- a/src/routes/test/+page.svelte +++ b/src/routes/test/+page.svelte @@ -29,8 +29,9 @@ console.log("Refresh"); } +
- +
ID From