From 4849b16efc9c7215b474fd02f896cc9c5d14fd03 Mon Sep 17 00:00:00 2001 From: Daniel Friesel Date: Sun, 11 Sep 2022 06:52:57 +0200 Subject: train details: add an icon for construction work --- lib/DBInfoscreen/Controller/Stationboard.pm | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/lib/DBInfoscreen/Controller/Stationboard.pm b/lib/DBInfoscreen/Controller/Stationboard.pm index b986ff7..7b66dbc 100644 --- a/lib/DBInfoscreen/Controller/Stationboard.pm +++ b/lib/DBInfoscreen/Controller/Stationboard.pm @@ -808,9 +808,12 @@ sub render_train { if ( $m->[0] =~ s{: Information.}{: } ) { $m->[1]{icon} = 'info_outline'; } - if ( $m->[0] =~ s{: Störung.}{: } ) { + elsif ( $m->[0] =~ s{: Störung.}{: } ) { $m->[1]{icon} = 'warning'; } + elsif ( $m->[0] =~ s{: Bauarbeiten.}{: } ) { + $m->[1]{icon} = 'build'; + } } unshift( @{ $departure->{moreinfo} }, @him_messages ); } @@ -1086,9 +1089,12 @@ sub train_details { if ( $m->[0] =~ s{: Information.}{:} ) { $m->[1]{icon} = 'info_outline'; } - if ( $m->[0] =~ s{: Störung.}{: } ) { + elsif ( $m->[0] =~ s{: Störung.}{: } ) { $m->[1]{icon} = 'warning'; } + elsif ( $m->[0] =~ s{: Bauarbeiten.}{: } ) { + $m->[1]{icon} = 'build'; + } } $res->{moreinfo} = [@him_messages]; } -- cgit v1.2.3