overide frontend config

This commit is contained in:
nobohan 2021-05-20 20:48:17 +02:00
parent 09789cecbf
commit f84b062ef7
4 changed files with 174 additions and 1 deletions

8
README
View File

@ -18,3 +18,11 @@ note: les credentials pour accéder au backend se trouvent dans /home/appuser/ci
# Documentation :
$ make doc
# Builder le front
```
$ docker-compose exec citizen bash
appuser@ab136184159a:~/citizen/$ cd frontend
appuser@ab136184159a:~/citizen/frontend$ npm run ng build -- --configuration=fr --prod
```

View File

@ -7,3 +7,4 @@ services:
- ./vendor/GeoNature-citizen/frontend:/home/appuser/citizen/frontend
- ./vendor/GeoNature-citizen/backend:/home/appuser/citizen/backend
- ./restart.sh:/home/appuser/citizen/install/restart.sh
- ./patches/frontend/conf:/home/appuser/citizen/frontend/src/conf

View File

@ -0,0 +1,72 @@
export const AppConfig = {
appName: "GeoNature-citizen",
API_ENDPOINT:"http://localhost:8080/api",
API_TAXHUB:"http://localhost/taxhub/api/",
FRONTEND:{
PROD_MOD:true,
MULTILINGUAL:false,
DISPLAY_FOOTER: true,
DISPLAY_TOPBAR: true,
DISPLAY_SIDEBAR: true,
DISPLAY_STATS: true,
DISPLAY_BADGES: true,
NEW_OBS_FORM_MODAL_VERSION: true
},
META: {
keywords: 'biodiversite enquetes participatif observations',
},
about: true,
URL_APPLICATION:"http://localhost:8080/",
REWARDS: true,
termsOfUse: {
fr: "assets/cgu.pdf",
en: "assets/termsOfUse.pdf"
},
signup:true,
email_contact:false,
platform_intro: {
fr: "Bienvenue<br /> à Wasseiges",
en: "Welcome<br /> on GeoNature Citizen"
},
platform_teaser: {
fr: "Hae duae provinciae bello quondam piratico catervis mixtae praedonum a Servilio pro consule missae sub iugum factae sunt vectigales. et hae quidem regiones velut in prominenti terrarum lingua positae ob orbe eoo monte Amano disparantur.",
en: "Hae duae provinciae bello quondam piratico catervis mixtae praedonum a Servilio pro consule missae sub iugum factae sunt vectigales. et hae quidem regiones velut in prominenti terrarum lingua positae ob orbe eoo monte Amano disparantur."
},
platform_participate: {
fr: "PARTICIPER AU PROGRAMME",
en: "PARTICIPATE"
},
programs_label: {
fr: "Programmes",
en: "Surveys"
},
program_label: {
fr: "Le programme",
en: "Survey"
},
program_share_an_observation: {
fr: "PARTAGER UNE OBSERVATION",
en: "SHARE AN OBSERVATION"
},
program_add_an_observation: {
fr: "AJOUTER UNE OBSERVATION",
en: "CONTRIBUTE AN OBSERVATION"
},
program_allow_email_contact: {
fr: "J'accepte que mon adresse e-mail puisse être utilisée pour recontacter à propos de mon observation",
en : "I agree that my e-mail address can be used to recontact about my observation"
},
taxonSelectInputThreshold: 7,
taxonAutocompleteInputThreshold: 12,
taxonAutocompleteFields: [
"nom_complet",
"nom_vern",
"nom_vern_eng",
"cd_nom"
],
taxonDisplaySciName: true,
program_list_observers_names: true,
program_list_sort: "-timestamp_create",
details_espece_url: "<url_inpn_or_atlas>/cd_nom/", // !! gardez bien le cd_nom/ dans l'url
registration_message : "Vous inscrire vous permet de gérer vos observations"
}

View File

@ -0,0 +1,92 @@
export const MAP_CONFIG = {
DEFAULT_PROVIDER: "OpenStreetMapOrg",
BASEMAPS: [
{
name: "OpenStreetMapOrg",
maxZoom: 19,
layer: "//{s}.tile.openstreetmap.org/{z}/{x}/{y}.png",
subdomains: "abc",
attribution:
'&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>'
},
// {
// name: "OpenStreetMapFRHot",
// maxZoom: 19,
// layer: "//{s}.tile.openstreetmap.fr/hot/{z}/{x}/{y}.png",
// subdomains: "abc",
// attribution:
// '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Tiles style by <a href="https://www.hotosm.org/" target="_blank">Humanitarian OpenStreetMap Team</a> hosted by <a href="https://openstreetmap.fr/" target="_blank">OpenStreetMap France</a>'
// },
// {
// name: "OpenStreetMapCH",
// maxZoom: 18,
// layer: "//tile.osm.ch/switzerland/{z}/{x}/{y}.png",
// subdomains: "abc",
// attribution:
// '&copy; <a href="&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors',
// bounds: [[45, 5], [48, 11]]
// },
// {
// name: "OpenStreetMapDE",
// maxZoom: 18,
// layer: "//{s}.tile.openstreetmap.de/tiles/osmde/{z}/{x}/{y}.png",
// subdomains: "abc",
// attribution:
// '&copy; <a href="&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors'
// },
// {
// name: "OpenStreetMapBZH",
// maxZoom: 18,
// layer: "//tile.openstreetmap.bzh/br/{z}/{x}/{y}.png",
// subdomains: "",
// attribution:
// '&copy; <a href="https://www.openstreetmap.org/copyright">OpenStreetMap</a> contributors, Tiles courtesy of <a href="http://www.openstreetmap.bzh/" target="_blank">Breton OpenStreetMap Team</a>',
// bounds: [[46.2, -5.5], [50, 0.7]]
// },
{
name: "OpenTopoMap",
maxZoom: 17,
layer: "//{s}.opentopomap.org/{z}/{x}/{y}.png",
subdomains: "abc",
attribution: "© OpenTopoMap"
},
{
name: "IGN Vue satellite",
maxZoom: 17,
layer: "https://wxs.ign.fr/{apiKey}/geoportail/wmts?&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER={layerName}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}",
layerName: "ORTHOIMAGERY.ORTHOPHOTOS",
// Remplacer "pratique" par votre clé IGN
apiKey: 'pratique',
subdomains: "abc",
attribution: "© IGN-F/Geoportail"
},
{
name: "IGN Cartes HELLO C EST UNE MODIF",
maxZoom: 17,
layer: "https://wxs.ign.fr/{apiKey}/geoportail/wmts?&REQUEST=GetTile&SERVICE=WMTS&VERSION=1.0.0&STYLE=normal&TILEMATRIXSET=PM&FORMAT=image/jpeg&LAYER={layerName}&TILEMATRIX={z}&TILEROW={y}&TILECOL={x}",
layerName: "GEOGRAPHICALGRIDSYSTEMS.MAPS",
// Remplacer "pratique" par votre clé IGN
apiKey: 'pratique',
subdomains: "abc",
attribution: "© IGN-F/Geoportail"
},
// {
// // ⚠ google's terms&conditions
// // https://github.com/Leaflet/Leaflet/blob/master/FAQ.md#i-want-to-use-google-maps-api-tiles-with-leaflet-can-i-do-that
// name: "GoogleSatellite",
// maxZoom: 20,
// layer: "//mt{s}.google.com/vt/lyrs=s&x={x}&y={y}&z={z}",
// subdomains: "1",
// attribution: "© GoogleMap"
// }
],
CENTER: [46.52863469527167, 2.43896484375],
ZOOM_LEVEL: 6,
ZOOM_LEVEL_RELEVE: 15,
NEW_OBS_POINTER: "assets/pointer-blue2.png",
OBS_POINTER: "assets/pointer-green.png",
LOCATE_CONTROL_TITLE: {
'fr':'Me localiser',
'en':'Show me where i am'
}
}