From c1718069f0958068ecef8a9535b212fc812f75cb Mon Sep 17 00:00:00 2001 From: Imen Chermiti <127976664+ImenOuidou@users.noreply.github.com> Date: Sun, 29 Oct 2023 22:47:33 +0100 Subject: [PATCH] feat: notify users about new design (#300) * feat: notify users about new design * feat: applay message only for search page * feat: notify users about new design --- src/client/src/components/App/App.js | 8 ++++- .../src/components/App/Header/Header.js | 34 ++++++++++++++----- .../src/components/App/Header/header.scss | 22 ++++++------ src/client/src/components/App/Layout.js | 4 ++- .../src/services/PrivateRoute/PrivateRoute.js | 10 ++++-- 5 files changed, 54 insertions(+), 24 deletions(-) diff --git a/src/client/src/components/App/App.js b/src/client/src/components/App/App.js index ed8025a1e..e98993c8e 100644 --- a/src/client/src/components/App/App.js +++ b/src/client/src/components/App/App.js @@ -67,11 +67,17 @@ const App = () => { ) : ( - + { @@ -59,16 +64,27 @@ const Header = ({ resetSearch, location, showBetaMessage }) => { {showBetaMessage && (
- Ce site est en beta-test. + + {" "} + Une nouvelle version de + notre portail FCE sera déployée le 15 novembre 2023 :{" "} + {location.pathname !== "/login" && ( - Aidez-nous à l{"'"}améliorer en{" "} - - donnant votre avis - + {`Cette mise à jour est une refonte ergonomique visant à aligner notre site avec la charte graphique de l'État. + Nous tenons à souligner que cette mise à jour n'affectera en rien le contenu actuel de notre portail, + qui restera inchangé. Vous continuerez d'accéder à toutes les informations et fonctionnalités auxquelles + vous êtes habitués. `} +
+ + Questions ou préoccupations ➜ + + bce@travail.gouv.fr + +
)}
diff --git a/src/client/src/components/App/Header/header.scss b/src/client/src/components/App/Header/header.scss index 60d8d0ee0..e7f5f39e6 100644 --- a/src/client/src/components/App/Header/header.scss +++ b/src/client/src/components/App/Header/header.scss @@ -70,26 +70,26 @@ .beta-message { @extend %flex-center; - height: 40px; - font-size: 0.9rem; - font-weight: bold; - text-align: center; + font-size: 1rem; letter-spacing: 0.04rem; - color: $black; - background-color: #ffe15b; + color: #0063cb; + background-color: #e8edff; + padding: 1rem; box-shadow: inset 0 2px 6px rgba(0, 0, 0, 0.1); - + &__nouveaute { + font-weight: bold; + } &__feedback-link { margin-left: $spacing-1; padding: $spacing-1 $spacing-2; - color: $dark-grey; - background-color: $white; + color: #0063cb !important; + transition: background-size 0s; + background-color: #b9c7f3; border-radius: $border-radius-1; - transition: color $duration-2, background-color $duration-2; &:hover { color: $white; - background-color: $primary; + background-color: #a9bfff; } } } diff --git a/src/client/src/components/App/Layout.js b/src/client/src/components/App/Layout.js index 294f3966a..15493bd8b 100644 --- a/src/client/src/components/App/Layout.js +++ b/src/client/src/components/App/Layout.js @@ -12,6 +12,7 @@ const Layout = ({ hasLandingHeader = false, hasSharedButton = false, children, + displayMessage = false, }) => { const isActiveMaintenanceMode = Config.get("maintenanceMode"); @@ -20,7 +21,7 @@ const Layout = ({ {hasLandingHeader ? ( ) : ( -
+
)}
{children} @@ -32,6 +33,7 @@ const Layout = ({ Layout.propTypes = { children: PropTypes.node, + displayMessage: PropTypes.bool, hasLandingHeader: PropTypes.bool, hasSharedButton: PropTypes.bool, }; diff --git a/src/client/src/services/PrivateRoute/PrivateRoute.js b/src/client/src/services/PrivateRoute/PrivateRoute.js index 15bbca305..305c8db23 100644 --- a/src/client/src/services/PrivateRoute/PrivateRoute.js +++ b/src/client/src/services/PrivateRoute/PrivateRoute.js @@ -5,7 +5,12 @@ import { Redirect, Route, useHistory } from "react-router-dom"; import Layout from "../../components/App/Layout"; import Auth from "../Auth"; -const PrivateRoute = ({ component: Component, location, ...rest }) => { +const PrivateRoute = ({ + component: Component, + displayMessage, + location, + ...rest +}) => { const history = useHistory(); async function getTempAuthAndRedirect(credential, location) { @@ -46,7 +51,7 @@ const PrivateRoute = ({ component: Component, location, ...rest }) => { {...rest} render={(props) => { return authorization.auth ? ( - + ) : ( @@ -64,6 +69,7 @@ const PrivateRoute = ({ component: Component, location, ...rest }) => { PrivateRoute.propTypes = { component: PropTypes.elementType, + displayMessage: PropTypes.bool, history: PropTypes.shape({ push: PropTypes.func, }),