From a60f25872f95ed478e7ef05e6113efb175777907 Mon Sep 17 00:00:00 2001 From: Araozu Date: Tue, 10 Sep 2024 20:02:41 -0500 Subject: [PATCH] Small changes to styles --- src/pages/Index.tsx | 9 +++++++-- src/pages/IndexMobile.tsx | 10 +++++----- 2 files changed, 12 insertions(+), 7 deletions(-) diff --git a/src/pages/Index.tsx b/src/pages/Index.tsx index 8af4ba3..8b3c080 100644 --- a/src/pages/Index.tsx +++ b/src/pages/Index.tsx @@ -79,8 +79,8 @@ function LineEl(props: { line: Line }) { style={`color: ${props.line.color};--hover-bg: ${props.line.color};--hover-on-bg: white`} > - - Linea {props.line.name} + + Linea {props.line.id} @@ -185,6 +185,11 @@ function RouteEl(props: { set_return_count((c) => c - 1); }} onClick={() => { + if (departure_active() && return_active()) { + toggle_departure(); + toggle_return(); + return; + } if (departure_count() === 1) { toggle_departure(); } diff --git a/src/pages/IndexMobile.tsx b/src/pages/IndexMobile.tsx index cf0d657..c751a20 100644 --- a/src/pages/IndexMobile.tsx +++ b/src/pages/IndexMobile.tsx @@ -44,12 +44,12 @@ function LinesContainer() { return (
-
+
{(line) => }
-
+
{(line) => ( - Linea {props.line.name} + Linea {props.line.id} ); } @@ -96,9 +96,9 @@ function RouteChipContainer(props: {line: Line, active_line: number}) { return res.json(); }); - const container_classes = () => (props.active_line === props.line.id ? "inline-block" : "hidden"); + const container_classes = () => (props.active_line === props.line.id ? "inline-block w-screen" : "hidden"); return ( -