From 44ea72fac29b86f1bbffe068b2ffb7a1f73141cf Mon Sep 17 00:00:00 2001 From: Andrew Pham Date: Fri, 11 Apr 2025 17:31:07 +0700 Subject: [PATCH] chore(ui): add the gateway version to header and update style for header component (ENG-61949) --- src/header/HeaderAuthentication.js | 21 ++++----------------- src/header/HeaderAuthentication.less | 3 +-- src/header/HeaderLogo.js | 5 ++++- stories/Header.stories.js | 1 + 4 files changed, 10 insertions(+), 20 deletions(-) diff --git a/src/header/HeaderAuthentication.js b/src/header/HeaderAuthentication.js index 75d1e15..274b7df 100644 --- a/src/header/HeaderAuthentication.js +++ b/src/header/HeaderAuthentication.js @@ -19,7 +19,6 @@ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. */ -import { Link } from '@carbon/icons-react'; import PropTypes from 'prop-types'; import usePlatformData from '../hooks/usePlatformData'; @@ -46,22 +45,10 @@ const HeaderAuthentication = ({ className }) => { }`}> {authenticationAlias ? ( - <> - {authenticationService}   - -   - - {authenticationAlias} - - + + {authenticationService}:{' '} + {authenticationAlias} + ) : ( authenticationService )} diff --git a/src/header/HeaderAuthentication.less b/src/header/HeaderAuthentication.less index cd72867..e4b4b89 100644 --- a/src/header/HeaderAuthentication.less +++ b/src/header/HeaderAuthentication.less @@ -36,12 +36,11 @@ a { text-decoration: none; color: var(--tag-color-teal); - padding-left: @sp-02; - max-width: @sp-160; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; + color: @blue-40; } } diff --git a/src/header/HeaderLogo.js b/src/header/HeaderLogo.js index 893dde2..5b92b85 100644 --- a/src/header/HeaderLogo.js +++ b/src/header/HeaderLogo.js @@ -26,13 +26,16 @@ import usePlatformData from '../hooks/usePlatformData'; const HeaderLogo = ({ className }) => { const { data } = usePlatformData(); const headerLogoPath = data?.platform?.header_logo_path; + const gatewayVersion = data?.user?.authentication_info?.gateway_version; return ( Gateway logo - Gateway + + Gateway {gatewayVersion} + ); }; diff --git a/stories/Header.stories.js b/stories/Header.stories.js index 3c937f2..2a1caa4 100644 --- a/stories/Header.stories.js +++ b/stories/Header.stories.js @@ -39,6 +39,7 @@ const platformMockValue = { alias: 'BAM-9.5.0', url: '#', service: 'BAM', + gateway_version: '25.2.1', }, help_links: { custom: [