diff --git a/front/public/locales/en/translation.json b/front/public/locales/en/translation.json index 5aa66473b80..61bbb211c80 100644 --- a/front/public/locales/en/translation.json +++ b/front/public/locales/en/translation.json @@ -188,7 +188,7 @@ "toggle-layers": "Choose the types of elements to display", "osrd-layers": "Data layers", "speed-limits": "Speed limits", - "map-layers": "Map layers" + "map-layers": "Map settings" }, "obj-types": { "BufferStop": "Buffer stop", diff --git a/front/public/locales/fr/translation.json b/front/public/locales/fr/translation.json index 3f5798be999..63916a376a0 100644 --- a/front/public/locales/fr/translation.json +++ b/front/public/locales/fr/translation.json @@ -188,7 +188,7 @@ "toggle-layers": "Choisir les types d'éléments à afficher", "osrd-layers": "Couches de données", "speed-limits": "Limitations de vitesse", - "map-layers": "Couches cartographiques" + "map-layers": "Paramètres cartographiques" }, "obj-types": { "BufferStop": "Heurtoir", diff --git a/front/src/applications/editor/components/LayersModal.tsx b/front/src/applications/editor/components/LayersModal.tsx index 9a4f3d527e7..b73a6f53a94 100644 --- a/front/src/applications/editor/components/LayersModal.tsx +++ b/front/src/applications/editor/components/LayersModal.tsx @@ -23,6 +23,7 @@ import { getMap } from 'reducers/map/selectors'; import { getInfraID } from 'reducers/osrdconf/selectors'; import { osrdEditoastApi } from 'common/api/osrdEditoastApi'; import { updateLayersSettings } from 'reducers/map'; +import MapSettingsMapStyle from 'common/Map/Settings/MapSettingsMapStyle'; export const LAYERS: Array<{ layers: LayerType[]; icon: string | JSX.Element }> = [ { layers: ['track_sections'], icon: trackSectionsIcon }, @@ -198,6 +199,7 @@ const LayersModal: FC = ({

{t('Editor.nav.map-layers')}

+ diff --git a/front/src/common/Map/Consts/colors.ts b/front/src/common/Map/Consts/colors.ts index 37cc7824608..9d312fb64a3 100644 --- a/front/src/common/Map/Consts/colors.ts +++ b/front/src/common/Map/Consts/colors.ts @@ -23,6 +23,10 @@ const colors: Record = { electricbox: { text: '#b42222', }, + error: { + color: '#ff0000', + text: '#ff0000', + }, kp: { circle: '#162873', text: '#4d4f53', @@ -143,10 +147,6 @@ const colors: Record = { color: '#4b4b4b', text: '#164721', }, - error: { - color: '#ff0000', - text: '#ff0000', - }, warning: { color: '#FF8C00', text: '#FF8C00', @@ -175,6 +175,10 @@ const colors: Record = { electricbox: { text: '#b42222', }, + error: { + color: '#ff0000', + text: '#ff0000', + }, kp: { circle: '#8338ec', text: '#8338ec', @@ -295,6 +299,10 @@ const colors: Record = { color: '#ffbe0b', text: '#ffbe0b', }, + warning: { + color: '#FF8C00', + text: '#FF8C00', + }, }, /* *************************************************************************** * @@ -319,6 +327,10 @@ const colors: Record = { electricbox: { text: bpLight, }, + error: { + color: '#ff0000', + text: '#ff0000', + }, kp: { circle: bpLight, text: bpLight, @@ -439,6 +451,10 @@ const colors: Record = { color: bpMedium, text: bpMedium, }, + warning: { + color: '#FF8C00', + text: '#FF8C00', + }, }, /* *************************************************************************** * @@ -463,6 +479,10 @@ const colors: Record = { electricbox: { text: '#b42222', }, + error: { + color: '#ff0000', + text: '#ff0000', + }, kp: { circle: '#162873', text: '#4d4f53', @@ -583,10 +603,6 @@ const colors: Record = { color: '#4b4b4b', text: '#164721', }, - error: { - color: '#ff0000', - text: '#ff0000', - }, warning: { color: '#FF8C00', text: '#FF8C00', diff --git a/front/src/common/Map/Map.scss b/front/src/common/Map/Map.scss index 42d518e8c61..4f21be59221 100644 --- a/front/src/common/Map/Map.scss +++ b/front/src/common/Map/Map.scss @@ -33,29 +33,6 @@ @media screen and (min-width: 640px) { max-width: 50%; } - button.mapstyle-style-select { - border: none; - background-color: #f2f2f2; - padding: 0; - display: flex; - align-items: center; - text-align: left; - border-radius: 8px; - margin-right: 1rem; - padding-right: 0.5rem; - img { - width: 5rem; - border-radius: 8px 0 0 8px; - margin-right: 0.5rem; - } - font-size: 0.9rem; - &:hover, - &.active { - background-color: #333; - color: #fff; - } - } - .sub-section-title { cursor: pointer; i { @@ -122,6 +99,32 @@ border-color: var(--coolgray13); } } + +.mapstyle { + button.mapstyle-style-select { + border: none; + background-color: #f2f2f2; + padding: 0; + display: flex; + align-items: center; + text-align: left; + border-radius: 8px; + margin-right: 1rem; + padding-right: 0.5rem; + img { + width: 5rem; + border-radius: 8px 0 0 8px; + margin-right: 0.5rem; + } + font-size: 0.9rem; + &:hover, + &.active { + background-color: #333; + color: #fff; + } + } +} + .map-search-marker { /* Circle center */ margin-left: -16px; diff --git a/front/src/common/Map/Settings/MapSettings.tsx b/front/src/common/Map/Settings/MapSettings.tsx index 627446e4f50..641ed982df0 100644 --- a/front/src/common/Map/Settings/MapSettings.tsx +++ b/front/src/common/Map/Settings/MapSettings.tsx @@ -1,9 +1,10 @@ import React, { FC, useState } from 'react'; +import { useTranslation } from 'react-i18next'; + import MapSettingsLayers from 'common/Map/Settings/MapSettingsLayers'; import MapSettingsMapStyle from 'common/Map/Settings/MapSettingsMapStyle'; import MapSettingsBackgroundSwitches from 'common/Map/Settings/MapSettingsBackgroundSwitches'; import MapSettingsSpeedLimits from 'common/Map/Settings/MapSettingsSpeedLimits'; -import { useTranslation } from 'react-i18next'; import HearderPopUp from '../HeaderPopUp'; interface MapSettingsProps { diff --git a/front/src/common/Map/Settings/MapSettingsMapStyle.tsx b/front/src/common/Map/Settings/MapSettingsMapStyle.tsx index 354c3746adc..0eb395873f8 100644 --- a/front/src/common/Map/Settings/MapSettingsMapStyle.tsx +++ b/front/src/common/Map/Settings/MapSettingsMapStyle.tsx @@ -16,7 +16,7 @@ const MapSettingsMapStyle: FC = () => { const dispatch = useDispatch(); return ( -
+