-
Notifications
You must be signed in to change notification settings - Fork 519
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #15212 from akeneo/CXP-723
CXP-723: Extract scope list and add multi step wizard with permissions
- Loading branch information
Showing
24 changed files
with
694 additions
and
224 deletions.
There are no files selected for viewing
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
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
10 changes: 10 additions & 0 deletions
10
...neo/Connectivity/Connection/back/Infrastructure/Symfony/Resources/config/feature_flag.yml
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,6 +1,16 @@ | ||
parameters: | ||
env(FLAG_MARKETPLACE_ACTIVATE_ENABLED): 0 | ||
env(FLAG_CONNECT_APP_WITH_PERMISSIONS_ENABLED): 0 | ||
|
||
services: | ||
akeneo_connectivity.connection.marketplace_activate.feature: | ||
class: Akeneo\Platform\Bundle\FeatureFlagBundle\Configuration\EnvVarFeatureFlag | ||
arguments: | ||
- '%env(bool:FLAG_MARKETPLACE_ACTIVATE_ENABLED)%' | ||
public: true | ||
|
||
akeneo_connectivity.connection.connect_app_with_permissions.feature: | ||
class: Akeneo\Platform\Bundle\FeatureFlagBundle\Configuration\EnvVarFeatureFlag | ||
arguments: | ||
- '%env(bool:FLAG_CONNECT_APP_WITH_PERMISSIONS_ENABLED)%' | ||
public: true |
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
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
121 changes: 0 additions & 121 deletions
121
src/Akeneo/Connectivity/Connection/front/src/connect/components/AppWizard/ScopeList.tsx
This file was deleted.
Oops, something went wrong.
66 changes: 66 additions & 0 deletions
66
...neo/Connectivity/Connection/front/src/connect/components/AppWizard/ScopeListContainer.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 |
---|---|---|
@@ -0,0 +1,66 @@ | ||
import React, {FC} from 'react'; | ||
import styled from 'styled-components'; | ||
import {getColor, getFontSize, Link, CheckRoundIcon} from 'akeneo-design-system'; | ||
import {useTranslate} from '../../../shared/translate'; | ||
import {ScopeItem, ScopeList} from '../ScopeList'; | ||
import ScopeMessage from '../../../model/Apps/scope-message'; | ||
|
||
const AppTitle = styled.h2` | ||
color: ${getColor('grey', 140)}; | ||
font-size: 28px; | ||
font-weight: normal; | ||
line-height: 28px; | ||
margin: 0; | ||
`; | ||
|
||
const Helper = styled.div` | ||
color: ${getColor('grey', 120)}; | ||
font-size: ${getFontSize('default')}; | ||
font-weight: normal; | ||
line-height: 18px; | ||
margin: 17px 0 19px 0; | ||
width: 280px; | ||
`; | ||
|
||
interface Props { | ||
appName: string; | ||
scopeMessages: ScopeMessage[]; | ||
} | ||
|
||
export const ScopeListContainer: FC<Props> = ({appName, scopeMessages}) => { | ||
const translate = useTranslate(); | ||
|
||
const title = | ||
scopeMessages.length === 0 | ||
? translate('akeneo_connectivity.connection.connect.apps.wizard.authorize.no_scope_title', { | ||
app_name: appName, | ||
}) | ||
: translate('akeneo_connectivity.connection.connect.apps.wizard.authorize.title', {app_name: appName}); | ||
|
||
return ( | ||
<> | ||
<AppTitle>{title}</AppTitle> | ||
<Helper> | ||
<p>{translate('akeneo_connectivity.connection.connect.apps.wizard.authorize.helper')}</p> | ||
<Link | ||
href={ | ||
'https://help.akeneo.com/pim/serenity/articles/how-to-connect-my-pim-with-apps.html#all-editions-authorization-step' | ||
} | ||
> | ||
{translate('akeneo_connectivity.connection.connect.apps.wizard.authorize.helper_link')} | ||
</Link> | ||
</Helper> | ||
{0 === scopeMessages.length ? ( | ||
<ScopeItem key='0'> | ||
<CheckRoundIcon | ||
size={24} | ||
title={translate('akeneo_connectivity.connection.connect.apps.wizard.authorize.no_scope')} | ||
/> | ||
{translate('akeneo_connectivity.connection.connect.apps.wizard.authorize.no_scope')} | ||
</ScopeItem> | ||
) : ( | ||
<ScopeList scopeMessages={scopeMessages} /> | ||
)} | ||
</> | ||
); | ||
}; |
Oops, something went wrong.