-
Notifications
You must be signed in to change notification settings - Fork 98
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(zimbra): change content and add guides on onboarding
ref: MANAGER-14642 Signed-off-by: Guillaume Hyenne <[email protected]>
- Loading branch information
Showing
4 changed files
with
97 additions
and
27 deletions.
There are no files selected for viewing
14 changes: 11 additions & 3 deletions
14
packages/manager/apps/zimbra/public/translations/onboarding/Messages_fr_FR.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,13 @@ | ||
{ | ||
"title": "Zimbra", | ||
"description": "L'offre email Zimbra sera bientôt disponible. Vous souhaitez rejoindre la Beta Zimbra ?", | ||
"orderButtonLabel": "Rejoindre la beta" | ||
"title": "Suite collaborative Zimbra", | ||
"description": "Communiquer et collaborer en entreprise grâce à la suite Zimbra", | ||
"orderButtonLabel": "Commander", | ||
"moreInfoButtonLabel": "Découvrir la solution Zimbra", | ||
"card_guide_category": "Tutoriel", | ||
"card_guide_title_1": "Premiers pas avec l'offre Zimbra", | ||
"card_guide_title_2": "Configurer son compte Zimbra", | ||
"card_guide_title_3": "Maitriser le webmail Zimbra", | ||
"card_guide_description_1": "Découvrez comment créer vos premières boites mail et administrer votre service", | ||
"card_guide_description_2": "Apprenez à configurer et utiliser votre compre Zimbra sur un terminal externe (PC ou smartphone)", | ||
"card_guide_description_3": "Découvrez les fonctionnalités de l'interface web Zimbra" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
79 changes: 56 additions & 23 deletions
79
packages/manager/apps/zimbra/src/pages/onboarding/index.tsx
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,43 +1,76 @@ | ||
import React from 'react'; | ||
import React, { useContext, useMemo } from 'react'; | ||
import { useTranslation } from 'react-i18next'; | ||
import { OnboardingLayout } from '@ovh-ux/manager-react-components'; | ||
import { | ||
ButtonType, | ||
PageLocation, | ||
useOvhTracking, | ||
} from '@ovh-ux/manager-react-shell-client'; | ||
import { Card, OnboardingLayout } from '@ovh-ux/manager-react-components'; | ||
import { ShellContext } from '@ovh-ux/manager-react-shell-client'; | ||
import onboardingImgSrc from './onboarding-img.png'; | ||
import { JOIN_ZIMBRA_BETA } from '@/tracking.constant'; | ||
import { | ||
ZIMBRA_ADMINISTRATOR_GUIDE, | ||
ZIMBRA_HOW_TO_CONFIGURE_GUIDE, | ||
ZIMBRA_WEBMAIL_GUIDE, | ||
} from '@/guides.constants'; | ||
|
||
export default function Onboarding() { | ||
const { t } = useTranslation('onboarding'); | ||
|
||
const title: string = t('title'); | ||
const description: string = t('description'); | ||
const { trackClick } = useOvhTracking(); | ||
const context = useContext(ShellContext); | ||
const { ovhSubsidiary } = context.environment.getUser(); | ||
|
||
const onOrderButtonClick = () => { | ||
trackClick({ | ||
location: PageLocation.page, | ||
buttonType: ButtonType.button, | ||
actionType: 'navigation', | ||
actions: [JOIN_ZIMBRA_BETA], | ||
}); | ||
|
||
window.open( | ||
'https://labs.ovhcloud.com/en/zimbra-beta/', | ||
'https://www.ovh.com/fr/order/webcloud/?zimbra#/webCloud/zimbra/select?selection=%7E(zimbra%7E(offer%7E%27zimbra-account-pp-starter%7Epricing%7E%27default%7Equantity%7E1))', // @todo: should be changed when we have all the URLs | ||
'_blank', | ||
'noopener', | ||
); | ||
}; | ||
|
||
const onboardingGuides = [ | ||
{ | ||
key: 1, | ||
href: useMemo(() => { | ||
return ( | ||
ZIMBRA_ADMINISTRATOR_GUIDE[ovhSubsidiary] || | ||
ZIMBRA_ADMINISTRATOR_GUIDE.DEFAULT | ||
); | ||
}, [ZIMBRA_ADMINISTRATOR_GUIDE, ovhSubsidiary]), | ||
}, | ||
{ | ||
key: 2, | ||
href: useMemo(() => { | ||
return ( | ||
ZIMBRA_HOW_TO_CONFIGURE_GUIDE[ovhSubsidiary] || | ||
ZIMBRA_HOW_TO_CONFIGURE_GUIDE.DEFAULT | ||
); | ||
}, [ZIMBRA_HOW_TO_CONFIGURE_GUIDE, ovhSubsidiary]), | ||
}, | ||
{ | ||
key: 3, | ||
href: useMemo(() => { | ||
return ( | ||
ZIMBRA_WEBMAIL_GUIDE[ovhSubsidiary] || ZIMBRA_WEBMAIL_GUIDE.DEFAULT | ||
); | ||
}, [ZIMBRA_WEBMAIL_GUIDE, ovhSubsidiary]), | ||
}, | ||
]; | ||
|
||
return ( | ||
<OnboardingLayout | ||
title={title} | ||
title={t('title')} | ||
img={{ src: onboardingImgSrc }} | ||
description={description} | ||
description={t('description')} | ||
orderButtonLabel={t('orderButtonLabel')} | ||
onOrderButtonClick={onOrderButtonClick} | ||
></OnboardingLayout> | ||
moreInfoButtonLabel={t('moreInfoButtonLabel')} | ||
moreInfoHref="https://www.ovhcloud.com/fr/emails/zimbra-emails/" // @todo: should be changed when we have all the URLs | ||
> | ||
{onboardingGuides.map(({ href, key }) => ( | ||
<Card | ||
href={href} | ||
texts={{ | ||
category: t('card_guide_category'), | ||
description: t(`card_guide_description_${key}`), | ||
title: t(`card_guide_title_${key}`), | ||
}} | ||
/> | ||
))} | ||
</OnboardingLayout> | ||
); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters