@@ -98,12 +105,15 @@ const NaviCardExtension = ({ legType, leg }, { config }) => {
};
NaviCardExtension.propTypes = {
- leg: legShape.isRequired,
+ leg: legShape,
+ nextLeg: legShape,
legType: PropTypes.string,
};
NaviCardExtension.defaultProps = {
legType: '',
+ leg: undefined,
+ nextLeg: undefined,
};
NaviCardExtension.contextTypes = {
diff --git a/app/component/itinerary/navigator/NaviInstructions.js b/app/component/itinerary/navigator/NaviInstructions.js
index abecbe4e8f..2647cd8001 100644
--- a/app/component/itinerary/navigator/NaviInstructions.js
+++ b/app/component/itinerary/navigator/NaviInstructions.js
@@ -13,7 +13,6 @@ export default function NaviInstructions(
{ leg, nextLeg, instructions, legType },
{ intl, config },
) {
- const { distance, duration } = leg;
const [fadeOut, setFadeOut] = useState(false);
useEffect(() => {
@@ -27,6 +26,7 @@ export default function NaviInstructions(
}, [leg]);
if (legType === LEGTYPE.MOVE) {
+ const { distance, duration } = leg;
return (
<>
@@ -43,33 +43,50 @@ export default function NaviInstructions(
>
);
}
-
- if (legType === LEGTYPE.WAIT) {
- const { mode, headsign, route } = nextLeg;
-
- const color = route.color ? route.color : 'currentColor';
+ if (legType === LEGTYPE.WAIT && nextLeg.mode !== 'WALK') {
+ const { mode, headsign, route, end, start } = nextLeg;
+ const hs = headsign || nextLeg.trip?.tripHeadsign;
+ const color = route.color || 'currentColor';
const localizedMode = intl.formatMessage({
- id: `${mode.toLowerCase()}`,
+ id: `to-${mode.toLowerCase()}`,
defaultMessage: `${mode}`,
});
+ const t = leg ? legTime(end) : legTime(start);
+ const remainingDuration = Math.ceil((t - Date.now()) / 60000); // ms to minutes
+ const rt = nextLeg.realtimeState === 'UPDATED';
+ const values = {
+ duration: (
+
{remainingDuration}
+ ),
+ legTime:
{legTimeStr(end)},
+ };
return (
<>
>
);
@@ -120,14 +137,16 @@ export default function NaviInstructions(
}
NaviInstructions.propTypes = {
- leg: legShape.isRequired,
- nextLeg: legShape.isRequired,
+ leg: legShape,
+ nextLeg: legShape,
instructions: PropTypes.string.isRequired,
legType: PropTypes.string,
};
NaviInstructions.defaultProps = {
- legType: LEGTYPE.MOVE,
+ legType: '',
+ leg: undefined,
+ nextLeg: undefined,
};
NaviInstructions.contextTypes = {
intl: intlShape.isRequired,
diff --git a/app/component/itinerary/navigator/NaviStack.js b/app/component/itinerary/navigator/NaviStack.js
index 11c06df793..d588d9b631 100644
--- a/app/component/itinerary/navigator/NaviStack.js
+++ b/app/component/itinerary/navigator/NaviStack.js
@@ -3,9 +3,9 @@ import PropTypes from 'prop-types';
import cx from 'classnames';
import NaviMessage from './NaviMessage';
-const NaviStack = ({ messages, handleRemove, classPostfix }) => {
+const NaviStack = ({ messages, handleRemove, topPosition }) => {
return (
-
+
{messages.map((notification, index) => (
{
* Get the properties of the destination based on the leg.
*
*/
-export const getDestinationProperties = (leg, stop, config) => {
- const { rentalVehicle, vehicleParking, vehicleRentalStation } = leg.to;
- const { vehicleMode, routes } = stop;
-
+export const getDestinationProperties = (
+ rentalVehicle,
+ vehicleParking,
+ vehicleRentalStation,
+ stop,
+ config,
+) => {
+ const { routes, vehicleMode } = stop;
let destination = {};
let mode = vehicleMode;
-
if (routes && vehicleMode === 'BUS' && config.useExtendedRouteTypes) {
if (routes.some(p => p.type === ExtendedRouteTypes.BusExpress)) {
mode = 'bus-express';
@@ -255,4 +258,6 @@ export const LEGTYPE = {
WAIT: 'WAIT',
MOVE: 'MOVE',
TRANSIT: 'TRANSIT',
+ PENDING: 'PENDING',
+ END: 'END',
};
diff --git a/app/component/itinerary/navigator/navigator.scss b/app/component/itinerary/navigator/navigator.scss
index 759879fc14..fe9c28cde9 100644
--- a/app/component/itinerary/navigator/navigator.scss
+++ b/app/component/itinerary/navigator/navigator.scss
@@ -75,11 +75,12 @@
width: 100%;
.navi-top-card {
+ margin: 16px 24px 16px;
+
.main-card {
display: flex;
flex-direction: row;
color: black;
- margin: var(--space-s) var(--space-m) 0;
.mode {
width: var(--space-l);
@@ -96,7 +97,6 @@
width: 100%;
font-size: $font-size-normal;
font-weight: $font-weight-medium;
- margin-bottom: var(--space-s);
&.expanded {
margin-bottom: 0;
@@ -104,7 +104,7 @@
.destination-header {
font-size: $font-size-normal;
- font-weight: $font-weight-medium;
+ font-weight: 500;
display: flex;
}
@@ -120,12 +120,42 @@
display: flex;
align-items: center;
margin-top: 3px;
+ flex-direction: column;
+ align-self: flex-start;
+
+ .route-info {
+ display: flex;
+ align-self: flex-start;
+ margin-bottom: var(--space-xcs);
+ }
+
+ .wait-duration {
+ font-weight: $font-weight-book;
+ margin-top: var(--space-xs);
+ }
+
+ .bar {
+ border-radius: $border-radius;
+ }
+
+ .route-number {
+ .vcenter-children {
+ .vehicle-number {
+ color: white;
+ margin-top: 5px;
+ }
+
+ display: flex;
+ }
+ }
.headsign {
margin-left: 10px;
font-size: $font-size-small;
font-weight: $font-weight-book;
max-width: 120px;
+ text-align: left;
+ align-content: center;
}
.icon {
@@ -155,14 +185,14 @@
.extension-divider {
border: 1px solid #ddd;
width: 75%;
- margin-left: 50px;
+ margin-left: 35px;
margin-top: var(--space-s);
margin-bottom: var(--space-s);
}
.stop-count {
display: flex;
- margin-left: 48px;
+ margin-left: 35px;
font-weight: $font-weight-book;
}
@@ -170,17 +200,19 @@
display: flex;
flex-direction: row;
font-weight: $font-weight-book;
- margin-left: 48px;
+ margin-left: 35px;
margin-bottom: var(--space-s);
text-align: left;
- .route-number {
- min-width: 55px;
+ .bar {
+ border-radius: $border-radius;
+ }
+ .route-number {
.vcenter-children {
.vehicle-number {
color: white;
- margin-top: 4px;
+ margin-top: 5px;
}
display: flex;
@@ -195,7 +227,7 @@
}
}
- .dest-name {
+ .headsign {
display: flex;
flex-direction: column;
margin-left: var(--space-xs);
@@ -206,7 +238,7 @@
.extension-walk {
display: flex;
- margin-left: var(--space-xxl);
+ margin-left: var(--space-xl);
margin-bottom: var(--space-s);
margin-top: var(--space-xs);
}
@@ -333,7 +365,7 @@
height: 69px;
margin-left: 5%;
width: 90%;
- top: 155px;
+ top: 160px;
div:first-child {
margin-top: 0;
@@ -343,18 +375,6 @@
margin-top: 5px;
}
- &.expanded {
- top: 190px;
- }
-
- &.expand-transit {
- top: 235px;
- }
-
- &.transit {
- top: 162px;
- }
-
&.slide-out {
animation: slideOut 0.5s ease-out forwards;
pointer-events: none;
diff --git a/app/translations.js b/app/translations.js
index 7a06f86353..56ba592ba4 100644
--- a/app/translations.js
+++ b/app/translations.js
@@ -1312,7 +1312,7 @@ const translations = {
'navigation-start': 'Start journey',
'navigation-ticket': 'Ticket',
'navigation-wait': 'Wait at the stop',
- 'navigation-wait-mode': 'Odota {mode}a',
+ 'navigation-wait-mode': 'Nouse {mode}',
'navileg-bicycle': 'Cycle to',
'navileg-car': 'Drive to',
'navileg-from-station': 'asemalla',
@@ -1683,6 +1683,7 @@ const translations = {
'to-ferry': 'ferry',
'to-frontpage': 'To the front page',
'to-rail': 'train',
+ 'to-speedtram': 'TODO_pikaraitiovaunuun',
'to-subway': 'subway',
'to-tram': 'tram',
today: 'Today',
@@ -2570,7 +2571,7 @@ const translations = {
'navigation-start': 'Matkalle',
'navigation-ticket': 'Lippu',
'navigation-wait': 'Odota pysäkillä',
- 'navigation-wait-mode': 'Odota {mode}a',
+ 'navigation-wait-mode': 'Nouse {mode}',
'navileg-bicycle': 'Pyöräile',
'navileg-car': 'Aja',
'navileg-from-station': 'asemalla',
@@ -2940,6 +2941,7 @@ const translations = {
'to-ferry': 'lauttaan',
'to-frontpage': 'Etusivulle',
'to-rail': 'junaan',
+ 'to-speedtram': 'TODO_pikaraitiovaunuun',
'to-subway': 'metroon',
'to-tram': 'raitiovaunuun',
today: 'Tänään',
@@ -5479,7 +5481,7 @@ const translations = {
'navigation-start': 'På resa',
'navigation-ticket': 'Biljett',
'navigation-wait': 'Vänta på hållplatsen',
- 'navigation-wait-mode': 'Odota {mode}a',
+ 'navigation-wait-mode': 'Odota {mode}',
'navileg-bicycle': 'Cycla till',
'navileg-car': 'Kör till',
'navileg-from-station': 'TODO_asemalla',
@@ -5852,6 +5854,7 @@ const translations = {
'to-ferry': 'färjan',
'to-frontpage': 'Till startsidan',
'to-rail': 'tåget',
+ 'to-speedtram': 'TODO_pikaraitiovaunuun',
'to-subway': 'metron',
'to-tram': 'spårvagnen',
today: 'I dag',
diff --git a/static/assets/svg-sprite.default.svg b/static/assets/svg-sprite.default.svg
index 9ffdc699a9..eb90ad78d7 100644
--- a/static/assets/svg-sprite.default.svg
+++ b/static/assets/svg-sprite.default.svg
@@ -2847,8 +2847,10 @@
-
-
+
+
+
+
diff --git a/static/assets/svg-sprite.hsl.svg b/static/assets/svg-sprite.hsl.svg
index 6be1983b93..44ccd31144 100644
--- a/static/assets/svg-sprite.hsl.svg
+++ b/static/assets/svg-sprite.hsl.svg
@@ -2792,7 +2792,9 @@
-
-
+
+
+
+