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