Compare commits

...

4 Commits

7 changed files with 40 additions and 39 deletions

View File

@ -0,0 +1,14 @@
<script lang="ts">
import LookupCard from "./LookupCard.svelte";
const LookupCardConfig = {
title: "Find By Headcode",
helpText: "",
formAction: "/train",
placeholder: "enter headcode",
maxLen: 4,
fieldName: "headcode",
}
</script>
<LookupCard config={LookupCardConfig} />

View File

@ -1,2 +1,2 @@
export const version: string = "2025.03.5"; export const version: string = "2025.05.1";
export const versionTag: string = ""; export const versionTag: string = "";

View File

@ -8,6 +8,7 @@
import LookupCard from "$lib/cards/LookupCard.svelte"; import LookupCard from "$lib/cards/LookupCard.svelte";
import NearToMeCard from "$lib/cards/NearToMeCard.svelte"; import NearToMeCard from "$lib/cards/NearToMeCard.svelte";
import QuickLinkCard from "$lib/cards/QuickLinkCard.svelte"; import QuickLinkCard from "$lib/cards/QuickLinkCard.svelte";
import FindByHeadcodeCard from "$lib/cards/FindByHeadcodeCard.svelte";
const title = "OwlBoard"; const title = "OwlBoard";
const lookupCards: LookupCardConfig[] = [ const lookupCards: LookupCardConfig[] = [
{ {
@ -17,23 +18,15 @@
placeholder: "enter crs/tiploc", placeholder: "enter crs/tiploc",
maxLen: 7, maxLen: 7,
fieldName: "station", fieldName: "station",
}, }
{
title: "Timetable & PIS",
helpText: "",
formAction: "/train",
placeholder: "enter headcode",
maxLen: 4,
fieldName: "headcode",
},
]; ];
onMount(async () => { onMount(async () => {
const featureSupport = featureDetect(); const featureSupport = featureDetect();
if (!featureSupport.critical) { if (!featureSupport.critical) {
toast.error("Your browser is missing critical features, OwlBoard might not work properly. See `Menu > Statistics` for more information."); toast.error("Use a newer browser or OwlBoard might not work properly. See `Menu > Statistics` for more information.");
} else if (!featureSupport.nice) { } else if (!featureSupport.nice) {
toast.error("Your browser is missing some features, see `Menu > Statistics` for more information."); toast.error("Use a newer browser for the best experience, see `Menu > Statistics` for more information.");
} }
}); });
</script> </script>
@ -42,6 +35,7 @@
{#each lookupCards as config} {#each lookupCards as config}
<LookupCard {config} /> <LookupCard {config} />
{/each} {/each}
<FindByHeadcodeCard />
<NearToMeCard /> <NearToMeCard />
<QuickLinkCard /> <QuickLinkCard />

View File

@ -17,6 +17,10 @@
malicious activity. See <a href="#datasharing">Data Sharing</a> for details on how malicious activity. See <a href="#datasharing">Data Sharing</a> for details on how
we may share this data. we may share this data.
</p> </p>
<p>
With the exception of sending emails, all data is held - and always remains within -
the United Kingdom.
</p>
<h3>Telemetry</h3> <h3>Telemetry</h3>
<p> <p>
If you opt-in to Telemetry, you will share your IP address and information about the If you opt-in to Telemetry, you will share your IP address and information about the
@ -25,6 +29,9 @@
your <a href="/more/settings">Settings</a>. All of the anonymised data can be viewed your <a href="/more/settings">Settings</a>. All of the anonymised data can be viewed
at: <a target="_blank" href="https://liwan.fjla.uk">liwan.fjla.uk</a> at any time. at: <a target="_blank" href="https://liwan.fjla.uk">liwan.fjla.uk</a> at any time.
</p> </p>
<p>
All of the data that is stored is held within the United Kingdom.
</p>
<p> <p>
Telemetry data is used to identify which areas of the webapp are used most frequently Telemetry data is used to identify which areas of the webapp are used most frequently
and where improvements need to be made. and where improvements need to be made.
@ -36,6 +43,11 @@
email will be sent before your email address is anonymised. For example, if your email will be sent before your email address is anonymised. For example, if your
email address is hello@owlboard.info, it will be anonymized to @owlboard.info. email address is hello@owlboard.info, it will be anonymized to @owlboard.info.
</p> </p>
<p>
OwlBoard emails are sent using Proton Mail, a privacy-first email service based in
Switzerland. To facilitate this, your email address will be securely sent to
Proton Mail securely.
</p>
<p> <p>
You will be assigned a unique identifier which will be stored alongside your You will be assigned a unique identifier which will be stored alongside your
anonymised email address as well as in your browser. This is how the service anonymised email address as well as in your browser. This is how the service
@ -56,10 +68,7 @@
<p> <p>
CrowdSec anonymizes and processes data in accordance with its own privacy policy, which CrowdSec anonymizes and processes data in accordance with its own privacy policy, which
is available for review here. We recommend reviewing their policy to understand how is available for review here. We recommend reviewing their policy to understand how
they handle your data. they handle any data collected.
</p>
<p>
</p> </p>
</div> </div>

View File

@ -43,9 +43,9 @@
function send() { function send() {
toast.promise(request(), { toast.promise(request(), {
loading: "Contacting Server...", loading: "Sending email...",
success: "Request Answered.", success: "Sent, check your inbox",
error: "Unable to contact server.", error: "Error sending email",
}); });
} }

View File

@ -9,6 +9,7 @@
import type { OB_Pis_FullObject } from "@owlboard/ts-types"; import type { OB_Pis_FullObject } from "@owlboard/ts-types";
import Card from "$lib/cards/Card.svelte"; import Card from "$lib/cards/Card.svelte";
import type { CardConfig } from "$lib/cards/Card.types"; import type { CardConfig } from "$lib/cards/Card.types";
import FindByHeadcodeCard from "$lib/cards/FindByHeadcodeCard.svelte";
const title = "PIS Finder"; const title = "PIS Finder";
let entryPIS = ""; let entryPIS = "";
@ -74,7 +75,7 @@
onMount(() => { onMount(() => {
if ($uuid == null || $uuid == "") { if ($uuid == null || $uuid == "") {
toast("This feature will soon require registration. Register in the menu.", { toast("You must register to see results", {
duration: 3000, duration: 3000,
}); });
} }
@ -96,14 +97,6 @@
onRefresh: () => {}, onRefresh: () => {},
refreshing: false, refreshing: false,
} }
const findByHeadcodeCard: CardConfig = {
title: "Find by Headcode",
showHelp: true,
helpText: "Find by Headcode can be found on the homepage",
showRefresh: false,
onRefresh: () => {},
refreshing: false,
}
const findByStartEndCard: CardConfig = { const findByStartEndCard: CardConfig = {
title: "Find by Start/End CRS", title: "Find by Start/End CRS",
showHelp: true, showHelp: true,
@ -147,12 +140,7 @@
</Card> </Card>
<button id="reset" type="reset" on:click={reset}>Reset</button> <button id="reset" type="reset" on:click={reset}>Reset</button>
{:else} {:else}
<Card config={findByHeadcodeCard}> <FindByHeadcodeCard />
<span class="important">Find by Headcode from the homepage</span>
<br>
The tools below are more helpful if you've been diverted or are not starting your journey at your scheduled origin.
<br><br>
</Card>
<Card config={findByStartEndCard}> <Card config={findByStartEndCard}>
<form on:submit={findByStartEnd}> <form on:submit={findByStartEnd}>
<input type="text" maxlength="3" pattern="^[A-Za-z]+$" autocomplete="off" placeholder="Start" required bind:value={entryStartCRS} /> <input type="text" maxlength="3" pattern="^[A-Za-z]+$" autocomplete="off" placeholder="Start" required bind:value={entryStartCRS} />
@ -174,10 +162,6 @@
<Nav /> <Nav />
<style> <style>
.important {
font-weight: 900;
color: whitesmoke;
}
p { p {
margin-left: 10px; margin-left: 10px;
margin-right: 10px; margin-right: 10px;

View File

@ -49,7 +49,7 @@
load(); load();
if ($uuid == null || $uuid == "") { if ($uuid == null || $uuid == "") {
toast("PIS Codes will soon be hidden for unregistered users. Register in the menu.", { toast("Register to see PIS codes", {
duration: 3000, duration: 3000,
}); });
} }