Skip to content

Commit 176099c

Browse files
committedOct 28, 2021
feat: Add redirection for geojson data
From a konnector retrieving geojson data (only Tracemob for now), we add a redirect to the CoachCo2 app.

File tree

4 files changed

+27
-0
lines changed

4 files changed

+27
-0
lines changed
 

‎packages/cozy-harvest-lib/src/components/KonnectorConfiguration/DataTab/appLinksProps.jsx

+5
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,11 @@ const appLinksProps = {
1616
slug: 'contacts',
1717
icon: 'team',
1818
iconColor: 'brightSun'
19+
}),
20+
coachco2: () => ({
21+
slug: 'coachco2',
22+
icon: 'location',
23+
iconColor: 'brightSun'
1924
})
2025
}
2126

‎packages/cozy-harvest-lib/src/locales/en.json

+6
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@
9797
"description": "This service retrieves and keeps a complete record of your latest banking operations for you.",
9898
"button": "Access bank accounts",
9999
"install": "Discover Cozy Banks"
100+
},
101+
"coachco2": {
102+
"title": "Your trips",
103+
"description": "This service retrieves and keeps a complete record of your trips.",
104+
"button": "Access trips",
105+
"install": "Discover CoachCO2"
100106
}
101107
},
102108
"websiteLink": {

‎packages/cozy-harvest-lib/src/locales/fr.json

+6
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,12 @@
9797
"description": "Ce service récupère vos dernières lignes bancaires et en sauvegarde l'historique complet à votre place.",
9898
"button": "Accéder aux comptes bancaires",
9999
"install": "Découvrir Cozy Banks"
100+
},
101+
"coachco2": {
102+
"title": "Vos déplacements",
103+
"description": "Ce service récupère l'historique de vos trajets.",
104+
"button": "Accéder aux déplacements",
105+
"install": "Découvrir Coach CO2"
100106
}
101107
},
102108
"websiteLink": {

‎packages/cozy-harvest-lib/src/models/getRelatedAppsSlugs.js

+10
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,16 @@ import flag from 'cozy-flags'
66
* Exporting relatedAppsConfiguration is useful for overrides
77
*/
88
export const relatedAppsConfiguration = [
9+
{
10+
slug: 'coachco2',
11+
priority: 3,
12+
predicate: ({ konnectorManifest }) => {
13+
return (
14+
Array.isArray(konnectorManifest.data_types) &&
15+
konnectorManifest.data_types.includes('geojson')
16+
)
17+
}
18+
},
919
{
1020
slug: 'banks',
1121
priority: 2,

0 commit comments

Comments
 (0)
Please sign in to comment.