fix: only display the delay when when >0
This commit is contained in:
parent
98373b4063
commit
971e9c84c9
1 changed files with 10 additions and 2 deletions
|
|
@ -41,10 +41,18 @@ fi
|
||||||
# Create the tooltip text
|
# Create the tooltip text
|
||||||
tooltip="${train_type} ${line_number} (${train_number} - Br${train_series})\n\n"
|
tooltip="${train_type} ${line_number} (${train_number} - Br${train_series})\n\n"
|
||||||
tooltip+="Next stop: ${next_stop_name}\n"
|
tooltip+="Next stop: ${next_stop_name}\n"
|
||||||
tooltip+="${next_stop_arrival_time} (${next_stop_arrival_delay}) - ${distance_km} km"
|
if [[ $next_stop_arrival_delay == "" ]]; then
|
||||||
|
tooltip+="${next_stop_arrival_time} - ${distance_km} km"
|
||||||
|
else
|
||||||
|
tooltip+="${next_stop_arrival_time} (${next_stop_arrival_delay}) - ${distance_km} km"
|
||||||
|
fi
|
||||||
|
|
||||||
# Create the JSON object
|
# Create the JSON object
|
||||||
text="${speed} km/h - ${next_stop_arrival_time} (${next_stop_arrival_delay})"
|
if [[ $next_stop_arrival_delay == "" ]]; then
|
||||||
|
text="${speed} km/h - ${next_stop_arrival_time}"
|
||||||
|
else
|
||||||
|
text="${speed} km/h - ${next_stop_arrival_time} (${next_stop_arrival_delay})"
|
||||||
|
fi
|
||||||
alt="Current speed"
|
alt="Current speed"
|
||||||
class="icestats"
|
class="icestats"
|
||||||
percentage=0
|
percentage=0
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue