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;
|
||||
|
||||
Reference in New Issue
Block a user