diff --git a/lib/Travelynx.pm b/lib/Travelynx.pm index 3f8025a..569b65f 100755 --- a/lib/Travelynx.pm +++ b/lib/Travelynx.pm @@ -1272,8 +1272,18 @@ sub startup { arr_ds100 => $in_transit->{arr_ds100}, arr_name => $in_transit->{arr_name}, route_after => \@route_after, + messages => $in_transit->{messages} + ? [ split( qr{[|]}, $in_transit->{messages} ) ] + : undef, }; + my @parsed_messages; + for my $message ( @{ $ret->{messages} // [] } ) { + my ( $ts, $msg ) = split( qr{:}, $message ); + push( @parsed_messages, [ epoch_to_dt($ts), $msg ] ); + } + $ret->{messages} = [ reverse @parsed_messages ]; + $ret->{departure_countdown} = $ret->{real_departure}->epoch - $now->epoch; if ( $in_transit->{real_arr_ts} ) { diff --git a/templates/_checked_in.html.ep b/templates/_checked_in.html.ep index 3f47d71..9f2d1e2 100644 --- a/templates/_checked_in.html.ep +++ b/templates/_checked_in.html.ep @@ -57,6 +57,17 @@

+ % if (@{$journey->{messages} // []} > 0 and $journey->{messages}[0]) { +

+

+

+ % } % if (defined $journey->{arrival_countdown} and $journey->{arrival_countdown} <= 0) {

Der automatische Checkout erfolgt in wenigen Minuten. Zum Umsteigen: