Loading lib/Travelynx.pm +26 −0 Original line number Diff line number Diff line Loading @@ -446,6 +446,32 @@ sub startup { } ); $self->helper( 'efa_load_icon' => sub { my ( $self, $occupancy ) = @_; my @symbols = ( qw(help_outline person_outline people priority_high not_interested) ); if ( $occupancy eq 'MANY_SEATS' ) { $occupancy = 1; } elsif ( $occupancy eq 'FEW_SEATS' ) { $occupancy = 2; } elsif ( $occupancy eq 'STANDING_ONLY' ) { $occupancy = 3; } elsif ( $occupancy eq 'FULL' ) { $occupancy = 4; } return $symbols[$occupancy] // 'help_outline'; } ); $self->helper( 'load_icon' => sub { my ( $self, $load ) = @_; Loading templates/_departures_efa.html.ep +3 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,9 @@ <%= $checkin->{followee_name} %> → <%= $checkin->{arr_name} // '???' %> </span> % } % if ($result->occupancy) { <i class="material-icons tiny" aria-hidden="true"><%= efa_load_icon($result->occupancy) %></i> % } % } </span> </li> Loading templates/_show_load_icons.html.ep +4 −0 Original line number Diff line number Diff line Loading @@ -5,3 +5,7 @@ % } <i class="material-icons tiny" aria-hidden="true"><%= $second %></i> % } % elsif ($station->[2]{efa_load}) { % my ($icon) = efa_load_icon($station->[2]{efa_load}); <i class="material-icons tiny" aria-hidden="true"><%= $icon %></i> % } Loading
lib/Travelynx.pm +26 −0 Original line number Diff line number Diff line Loading @@ -446,6 +446,32 @@ sub startup { } ); $self->helper( 'efa_load_icon' => sub { my ( $self, $occupancy ) = @_; my @symbols = ( qw(help_outline person_outline people priority_high not_interested) ); if ( $occupancy eq 'MANY_SEATS' ) { $occupancy = 1; } elsif ( $occupancy eq 'FEW_SEATS' ) { $occupancy = 2; } elsif ( $occupancy eq 'STANDING_ONLY' ) { $occupancy = 3; } elsif ( $occupancy eq 'FULL' ) { $occupancy = 4; } return $symbols[$occupancy] // 'help_outline'; } ); $self->helper( 'load_icon' => sub { my ( $self, $load ) = @_; Loading
templates/_departures_efa.html.ep +3 −0 Original line number Diff line number Diff line Loading @@ -47,6 +47,9 @@ <%= $checkin->{followee_name} %> → <%= $checkin->{arr_name} // '???' %> </span> % } % if ($result->occupancy) { <i class="material-icons tiny" aria-hidden="true"><%= efa_load_icon($result->occupancy) %></i> % } % } </span> </li> Loading
templates/_show_load_icons.html.ep +4 −0 Original line number Diff line number Diff line Loading @@ -5,3 +5,7 @@ % } <i class="material-icons tiny" aria-hidden="true"><%= $second %></i> % } % elsif ($station->[2]{efa_load}) { % my ($icon) = efa_load_icon($station->[2]{efa_load}); <i class="material-icons tiny" aria-hidden="true"><%= $icon %></i> % }