Fix platform definitions
This commit is contained in:
@@ -6,7 +6,7 @@
|
||||
import { fade, fly } from 'svelte/transition';
|
||||
import { quintOut } from 'svelte/easing';
|
||||
|
||||
import { IconDisabled, IconUserCheck, IconTrafficLights } from '@tabler/icons-svelte';
|
||||
import { IconDisabled, IconDisabledOff, IconUserCheck, IconTrafficLights } from '@tabler/icons-svelte';
|
||||
|
||||
let { crs, onclose }: { crs: string; onclose: () => void } = $props();
|
||||
|
||||
@@ -41,13 +41,13 @@
|
||||
console.error(err);
|
||||
});
|
||||
} else {
|
||||
error = `Station ${crs} not found in database`;
|
||||
error = `Station ${crs.toUpperCase()} not found in database`;
|
||||
}
|
||||
});
|
||||
|
||||
function parsePlatform(id: string) {
|
||||
id = String(id || '');
|
||||
const match = id.match(/^(.*?)(Up|Dn)$/);
|
||||
const match = id.match(/^(.*?)(Up|Dn|BiDi)$/);
|
||||
if (match) {
|
||||
return { plat: match[1], direction: match[2] };
|
||||
}
|
||||
@@ -79,7 +79,7 @@
|
||||
|
||||
<dialog bind:this={dialogRef} {onclose} onclick={(e) => e.target === dialogRef && onclose()}>
|
||||
{#if stationData || error}
|
||||
<div class="modal-wrapper" in:fly={{ y: 20, duration: 400, easing: quintOut }}>
|
||||
<div class="modal-wrapper">
|
||||
<header>
|
||||
<div class="title-group">
|
||||
<span class="crs-badge">{crs.toUpperCase()}</span>
|
||||
@@ -105,11 +105,14 @@
|
||||
</div>
|
||||
<span class="length-tag">{platform.platformLength}m</span>
|
||||
<div class="platform-meta">
|
||||
{#if platform.stepFree}
|
||||
<span class="icon-tag" title="Step-free access"
|
||||
><IconDisabled color="#2563eb" /></span
|
||||
>
|
||||
{/if}
|
||||
>
|
||||
{#if platform.stepFree}
|
||||
<IconDisabled color="#2563eb" />
|
||||
{:else}
|
||||
<IconDisabledOff color="#2563eb55" />
|
||||
{/if}
|
||||
</span>
|
||||
{#if platform.dispatch}
|
||||
<span class="icon-tag" title="Dispatch staff present"
|
||||
><IconUserCheck color="#ea580c" /></span
|
||||
@@ -169,6 +172,7 @@
|
||||
max-height: 80vh;
|
||||
display: flex;
|
||||
flex-direction: column;
|
||||
font-family: 'urwgothic', sans-serif;
|
||||
}
|
||||
|
||||
dialog::backdrop {
|
||||
@@ -212,7 +216,7 @@
|
||||
|
||||
h2 {
|
||||
margin: 0;
|
||||
font-size: 1.1rem;
|
||||
font-size: 1.4rem;
|
||||
color: var(--color-title);
|
||||
}
|
||||
|
||||
@@ -311,9 +315,11 @@
|
||||
.length-tag {
|
||||
font-family: 'JetBrains Mono', 'Fira Code', monospace;
|
||||
font-size: 0.85rem;
|
||||
font-weight: 800;
|
||||
background: var(--color-bg-light);
|
||||
color: var(--color-title);
|
||||
padding: 0.25rem 0.6rem;
|
||||
margin: 0.25rem 0.05rem;
|
||||
border-radius: 4px;
|
||||
border: 1px solid #e2e8f0;
|
||||
}
|
||||
@@ -343,11 +349,11 @@
|
||||
}
|
||||
|
||||
.door-pattern-kind {
|
||||
font-size: 0.7rem;
|
||||
font-size: 0.82rem;
|
||||
font-weight: 800;
|
||||
color: #101316;
|
||||
text-transform: uppercase;
|
||||
letter-spacing: 0.05em;
|
||||
letter-spacing: 0.12em;
|
||||
}
|
||||
|
||||
.coach-row {
|
||||
@@ -368,7 +374,7 @@
|
||||
height: 20px;
|
||||
background: var(--color-accent-light);
|
||||
color: #f8fafc;
|
||||
font-size: 0.65rem;
|
||||
font-size: 1rem;
|
||||
font-weight: 700;
|
||||
display: flex;
|
||||
align-items: center;
|
||||
|
||||
@@ -44,6 +44,7 @@ routeDetail:
|
||||
|
||||
- type: station
|
||||
name: Reading West
|
||||
crs: rdw
|
||||
miles: 36
|
||||
chains: 75
|
||||
|
||||
|
||||
@@ -233,6 +233,7 @@ routeDetail:
|
||||
|
||||
- type: station
|
||||
name: Westbury
|
||||
crs: wsb
|
||||
miles: 109
|
||||
chains: 64
|
||||
|
||||
|
||||
@@ -19,7 +19,7 @@ platforms:
|
||||
max-car: 5
|
||||
- platformId: 2Dn
|
||||
platformLength: 115
|
||||
signal: false
|
||||
signal: true
|
||||
dispatch: false
|
||||
stepFree: true
|
||||
doorPattern:
|
||||
|
||||
@@ -67,7 +67,7 @@ platforms:
|
||||
platformLength: 129
|
||||
signal: true
|
||||
dispatch: true
|
||||
dispatchNote: Staffed 06:00-21:00
|
||||
dispatchNote: No more than 5-car IET permitted
|
||||
stepFree: true
|
||||
doorPattern:
|
||||
- kind: IET5
|
||||
|
||||
@@ -3,6 +3,20 @@ crs: nrc
|
||||
updated: 2026-03-11
|
||||
checked: 2026-03-11
|
||||
platforms:
|
||||
- platformId: 1Up
|
||||
platformLength: 89
|
||||
signal: true
|
||||
dispatch: false
|
||||
stepFree: false
|
||||
doorPattern:
|
||||
- kind: IET5
|
||||
doors: [1, 6]
|
||||
- kind: IET9
|
||||
doors: [1, 6]
|
||||
- kind: IET10
|
||||
doors: [1, 6]
|
||||
- kind: DMU
|
||||
max-car: 4
|
||||
- platformId: 1Dn
|
||||
platformLength: 89
|
||||
signal: false
|
||||
@@ -31,6 +45,20 @@ platforms:
|
||||
doors: [4, 9]
|
||||
- kind: DMU
|
||||
max-car: 4
|
||||
- platformId: 2Dn
|
||||
platformLength: 74
|
||||
signal: false
|
||||
dispatch: false
|
||||
stepFree: true
|
||||
doorPattern:
|
||||
- kind: IET5
|
||||
doors: [4, 9]
|
||||
- kind: IET9
|
||||
doors: [4, 9]
|
||||
- kind: IET10
|
||||
doors: [4, 9]
|
||||
- kind: DMU
|
||||
max-car: 4
|
||||
- platformId: 3Up
|
||||
platformLength: 225
|
||||
signal: true
|
||||
|
||||
47
static/stations/rdw.yaml
Normal file
47
static/stations/rdw.yaml
Normal file
@@ -0,0 +1,47 @@
|
||||
name: Reading West
|
||||
crs: rdw
|
||||
updated: 2026-03-12
|
||||
checked: 2026-03-12
|
||||
platforms:
|
||||
- platformId: 1Dn
|
||||
platformLength: 278
|
||||
signal: false
|
||||
dispatch: false
|
||||
stepFree: true
|
||||
doorPattern:
|
||||
- kind: IET5
|
||||
doors: [1, 10]
|
||||
- kind: IET9
|
||||
doors: [1, 18]
|
||||
- kind: IET10
|
||||
doors: [1, 20]
|
||||
- kind: DMU
|
||||
max-car: 12
|
||||
- platformId: 1Up
|
||||
platformLength: 278
|
||||
signal: true
|
||||
dispatch: false
|
||||
stepFree: true
|
||||
doorPattern:
|
||||
- kind: IET5
|
||||
doors: [1,10]
|
||||
- kind: IET9
|
||||
doors: [1,18]
|
||||
- kind: IET10
|
||||
doors: [1,20]
|
||||
- kind: DMU
|
||||
max-car: 12
|
||||
- platformId: 2Up
|
||||
platformLength: 158
|
||||
signal: true
|
||||
dispatch: false
|
||||
stepFree: false
|
||||
doorPattern:
|
||||
- kind: IET5
|
||||
doors: [1, 10]
|
||||
- kind: IET9
|
||||
doors: [1, 12]
|
||||
- kind: IET10
|
||||
doors: [1, 12]
|
||||
- kind: DMU
|
||||
max-car: 6
|
||||
@@ -19,7 +19,7 @@ platforms:
|
||||
max-car: 7
|
||||
- platformId: 2Up
|
||||
platformLength: 168
|
||||
signal: false
|
||||
signal: true
|
||||
dispatch: false
|
||||
stepFree: true
|
||||
doorPattern:
|
||||
|
||||
64
static/stations/wsb.yaml
Normal file
64
static/stations/wsb.yaml
Normal file
@@ -0,0 +1,64 @@
|
||||
name: Westbury
|
||||
crs: wsb
|
||||
updated: 2026-03-12
|
||||
checked: 2026-03-12
|
||||
platforms:
|
||||
- platformId: 1Up
|
||||
platformLength: 224
|
||||
signal: true
|
||||
dispatch: true
|
||||
dispatchNote: No dispatch for trains fewer than 5-car
|
||||
stepFree: true
|
||||
doorPattern:
|
||||
- kind: IET5
|
||||
doors: [1, 10]
|
||||
- kind: IET9
|
||||
doors: [1, 17]
|
||||
- kind: IET10
|
||||
doors: [1, 17]
|
||||
- kind: DMU
|
||||
max-car: 9
|
||||
- platformId: 1Dn
|
||||
platformLength: 224
|
||||
signal: true
|
||||
dispatch: true
|
||||
dispatchNote: No dispatch for trains fewer than 5-car
|
||||
stepFree: true
|
||||
doorPattern:
|
||||
- kind: IET5
|
||||
doors: [1, 10]
|
||||
- kind: IET9
|
||||
doors: [2, 18]
|
||||
- kind: IET10
|
||||
doors: [2, 18]
|
||||
- kind: DMU
|
||||
max-car: 9
|
||||
- platformId: 2BiDi
|
||||
platformLength: 315
|
||||
signal: true
|
||||
dispatch: true
|
||||
stepFree: true
|
||||
doorPattern:
|
||||
- kind: IET5
|
||||
doors: [1, 10]
|
||||
- kind: IET9
|
||||
doors: [1, 18]
|
||||
- kind: IET10
|
||||
doors: [1, 20]
|
||||
- kind: DMU
|
||||
max-car: 13
|
||||
|
||||
- platformId: 3BiDi
|
||||
platformLength: 295
|
||||
signal: true
|
||||
dispatch: true
|
||||
stepFree: true
|
||||
doorPattern:
|
||||
- kind: IET5
|
||||
doors: [1, 10]
|
||||
- kind: IET9
|
||||
doors: [1, 18]
|
||||
- kind: IET10
|
||||
doors: [1, 20]
|
||||
- kind: DMU
|
||||
max-car: 12
|
||||
Reference in New Issue
Block a user