From 5c7f99921b6543c3952160225509a60acc2de05e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pablo=20V=C3=A9lez?= Date: Tue, 24 Sep 2024 15:27:04 +0200 Subject: [PATCH] MM-60312 - replace office365 logo with entraId new logo (#28234) * MM-60312 - replace office365 logo with entraId new logo * rename icon file name * remove unncessary aria-label in svg inside a button * remove unnecessary translation --------- Co-authored-by: Mattermost Build --- .../channels/src/components/login/login.tsx | 4 +- .../signup/__snapshots__/signup.test.tsx.snap | 2 +- .../channels/src/components/signup/signup.tsx | 4 +- .../widgets/icons/entra_id_icon.tsx | 45 +++++++++++++++++++ .../widgets/icons/login_office_365_icon.tsx | 27 ----------- webapp/channels/src/i18n/en.json | 1 - 6 files changed, 50 insertions(+), 33 deletions(-) create mode 100644 webapp/channels/src/components/widgets/icons/entra_id_icon.tsx delete mode 100644 webapp/channels/src/components/widgets/icons/login_office_365_icon.tsx diff --git a/webapp/channels/src/components/login/login.tsx b/webapp/channels/src/components/login/login.tsx index 821f83440c..4df1227edc 100644 --- a/webapp/channels/src/components/login/login.tsx +++ b/webapp/channels/src/components/login/login.tsx @@ -39,10 +39,10 @@ import type {CustomizeHeaderType} from 'components/header_footer_route/header_fo import LoadingScreen from 'components/loading_screen'; import Markdown from 'components/markdown'; import SaveButton from 'components/save_button'; +import EntraIdIcon from 'components/widgets/icons/entra_id_icon'; import LockIcon from 'components/widgets/icons/lock_icon'; import LoginGitlabIcon from 'components/widgets/icons/login_gitlab_icon'; import LoginGoogleIcon from 'components/widgets/icons/login_google_icon'; -import LoginOffice365Icon from 'components/widgets/icons/login_office_365_icon'; import LoginOpenIDIcon from 'components/widgets/icons/login_openid_icon'; import Input, {SIZE} from 'components/widgets/inputs/input/input'; import PasswordInput from 'components/widgets/inputs/password_input/password_input'; @@ -185,7 +185,7 @@ const Login = ({onCustomizeHeader}: LoginProps) => { externalLoginOptions.push({ id: 'office365', url, - icon: , + icon: , label: formatMessage({id: 'login.office365', defaultMessage: 'Entra ID'}), onClick: desktopExternalAuth(url), }); diff --git a/webapp/channels/src/components/signup/__snapshots__/signup.test.tsx.snap b/webapp/channels/src/components/signup/__snapshots__/signup.test.tsx.snap index 69d503900c..d983991abe 100644 --- a/webapp/channels/src/components/signup/__snapshots__/signup.test.tsx.snap +++ b/webapp/channels/src/components/signup/__snapshots__/signup.test.tsx.snap @@ -409,7 +409,7 @@ exports[`components/signup/Signup should match snapshot for all signup options e url="/oauth/google/signup" /> } + icon={} id="office365" key="office365" label="Entra ID" diff --git a/webapp/channels/src/components/signup/signup.tsx b/webapp/channels/src/components/signup/signup.tsx index 606ada3491..b0a2874df8 100644 --- a/webapp/channels/src/components/signup/signup.tsx +++ b/webapp/channels/src/components/signup/signup.tsx @@ -43,10 +43,10 @@ import type {CustomizeHeaderType} from 'components/header_footer_route/header_fo import LoadingScreen from 'components/loading_screen'; import Markdown from 'components/markdown'; import SaveButton from 'components/save_button'; +import EntraIdIcon from 'components/widgets/icons/entra_id_icon'; import LockIcon from 'components/widgets/icons/lock_icon'; import LoginGitlabIcon from 'components/widgets/icons/login_gitlab_icon'; import LoginGoogleIcon from 'components/widgets/icons/login_google_icon'; -import LoginOffice365Icon from 'components/widgets/icons/login_office_365_icon'; import LoginOpenIDIcon from 'components/widgets/icons/login_openid_icon'; import CheckInput from 'components/widgets/inputs/check'; import Input, {SIZE} from 'components/widgets/inputs/input/input'; @@ -200,7 +200,7 @@ const Signup = ({onCustomizeHeader}: SignupProps) => { externalLoginOptions.push({ id: 'office365', url, - icon: , + icon: , label: formatMessage({id: 'login.office365', defaultMessage: 'Entra ID'}), onClick: desktopExternalAuth(url), }); diff --git a/webapp/channels/src/components/widgets/icons/entra_id_icon.tsx b/webapp/channels/src/components/widgets/icons/entra_id_icon.tsx new file mode 100644 index 0000000000..1c04b20966 --- /dev/null +++ b/webapp/channels/src/components/widgets/icons/entra_id_icon.tsx @@ -0,0 +1,45 @@ +// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. +// See LICENSE.txt for license information. + +import React from 'react'; + +export default function EntraIdIcon(props: React.HTMLAttributes) { + return ( + + + + + + + + + + + ); +} diff --git a/webapp/channels/src/components/widgets/icons/login_office_365_icon.tsx b/webapp/channels/src/components/widgets/icons/login_office_365_icon.tsx deleted file mode 100644 index 72d9a88c73..0000000000 --- a/webapp/channels/src/components/widgets/icons/login_office_365_icon.tsx +++ /dev/null @@ -1,27 +0,0 @@ -// Copyright (c) 2015-present Mattermost, Inc. All Rights Reserved. -// See LICENSE.txt for license information. - -import React from 'react'; -import {useIntl} from 'react-intl'; - -export default function LoginOffice365Icon(props: React.HTMLAttributes) { - const {formatMessage} = useIntl(); - - return ( - - - - - - ); -} diff --git a/webapp/channels/src/i18n/en.json b/webapp/channels/src/i18n/en.json index 6d4437e8fd..5165a3391a 100644 --- a/webapp/channels/src/i18n/en.json +++ b/webapp/channels/src/i18n/en.json @@ -3755,7 +3755,6 @@ "generic_icons.lock.circleSolid": "Lock Circle Solid Icon", "generic_icons.login.gitlab": "Gitlab Icon", "generic_icons.login.google": "Google Icon", - "generic_icons.login.oneLogin": "One Login Icon", "generic_icons.login.openid": "OpenID Icon", "generic_icons.logout": "Logout Icon", "generic_icons.mail": "Mail Icon",