@strapi/admin 4.1.4-alpha.2 → 4.2.0-alpha.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.env +0 -0
- package/admin/src/app.js +7 -4
- package/admin/src/components/GuidedTour/Homepage/index.js +13 -3
- package/admin/src/components/GuidedTour/Modal/index.js +4 -1
- package/admin/src/components/GuidedTour/layout.js +9 -0
- package/admin/src/content-manager/components/Inputs/index.js +3 -4
- package/admin/src/hooks/index.js +1 -0
- package/admin/src/hooks/useFetchPluginsFromMarketPlace/index.js +49 -0
- package/admin/src/pages/AuthPage/index.js +1 -0
- package/admin/src/pages/InstalledPluginsPage/Plugins.js +15 -6
- package/admin/src/{hooks/useFetchInstalledPlugins → pages/InstalledPluginsPage}/utils/api.js +4 -2
- package/admin/src/pages/MarketplacePage/MarketplaceBanner/Wrapper.js +28 -0
- package/admin/src/pages/MarketplacePage/MarketplaceBanner/index.js +37 -0
- package/admin/src/pages/MarketplacePage/PluginCard/Wrapper.js +148 -0
- package/admin/src/pages/MarketplacePage/PluginCard/index.js +185 -0
- package/admin/src/pages/MarketplacePage/Wrapper.js +5 -0
- package/admin/src/pages/MarketplacePage/assets/marketplace-coming-soon.png +0 -0
- package/admin/src/pages/MarketplacePage/index.js +107 -199
- package/admin/src/translations/en.json +15 -18
- package/admin/src/translations/ja.json +2 -2
- package/admin/src/translations/ko.json +2 -2
- package/build/01a600d9e6e0dea21e33.png +0 -0
- package/build/4362.dbe98749.chunk.js +1 -0
- package/build/9260.d9bb874f.chunk.js +2 -0
- package/build/{9260.fa40c7bd.chunk.js.LICENSE.txt → 9260.d9bb874f.chunk.js.LICENSE.txt} +0 -0
- package/build/Admin-authenticatedApp.a24ebaa0.chunk.js +1 -0
- package/build/Admin_homePage.86604515.chunk.js +1 -0
- package/build/Admin_marketplace.419010d8.chunk.js +1 -0
- package/build/Admin_pluginsPage.7d1bd7ce.chunk.js +1 -0
- package/build/admin-users.1fda1f27.chunk.js +1 -0
- package/build/content-manager.31be1448.chunk.js +1 -0
- package/build/en-json.bce44d39.chunk.js +1 -0
- package/build/index.html +1 -1
- package/build/ja-json.e13f04e8.chunk.js +1 -0
- package/build/ko-json.2200c9c9.chunk.js +1 -0
- package/build/{main.7fa5bc38.js → main.4ea77c5f.js} +2 -2
- package/build/{main.7fa5bc38.js.LICENSE.txt → main.4ea77c5f.js.LICENSE.txt} +0 -0
- package/build/{runtime~main.7bb09ab1.js → runtime~main.83b9ee0b.js} +1 -1
- package/index.js +53 -244
- package/package.json +7 -5
- package/server/controllers/admin.js +1 -12
- package/server/routes/serve-admin-panel.js +1 -1
- package/utils/create-cache-dir.js +119 -0
- package/utils/get-custom-webpack-config.js +38 -0
- package/utils/index.js +13 -0
- package/utils/should-build-admin.js +51 -0
- package/utils/watch-admin-files.js +56 -0
- package/webpack.config.js +36 -3
- package/admin/src/assets/images/icon_made-by-strapi.svg +0 -5
- package/admin/src/hooks/useFetchInstalledPlugins/index.js +0 -23
- package/admin/src/hooks/useFetchMarketplacePlugins/index.js +0 -23
- package/admin/src/hooks/useFetchMarketplacePlugins/utils/api.js +0 -17
- package/admin/src/pages/MarketplacePage/components/EmptyPluginSearch/EmptyPluginGrid.js +0 -27
- package/admin/src/pages/MarketplacePage/components/EmptyPluginSearch/index.js +0 -30
- package/admin/src/pages/MarketplacePage/components/PluginCard/index.js +0 -186
- package/admin/src/pages/MarketplacePage/utils/api.js +0 -9
- package/build/4362.5c92d240.chunk.js +0 -1
- package/build/90f49a385afb000fb1d4.svg +0 -5
- package/build/9260.fa40c7bd.chunk.js +0 -2
- package/build/Admin-authenticatedApp.6d27d55a.chunk.js +0 -1
- package/build/Admin_homePage.964ff5d7.chunk.js +0 -1
- package/build/Admin_marketplace.89a0a014.chunk.js +0 -1
- package/build/Admin_pluginsPage.97a514db.chunk.js +0 -1
- package/build/admin-users.2740c223.chunk.js +0 -1
- package/build/content-manager.e1189026.chunk.js +0 -1
- package/build/en-json.086acf41.chunk.js +0 -1
- package/build/ja-json.46e29f04.chunk.js +0 -1
- package/build/ko-json.dd36fdc0.chunk.js +0 -1
|
@@ -0,0 +1,185 @@
|
|
|
1
|
+
/**
|
|
2
|
+
*
|
|
3
|
+
* PluginCard
|
|
4
|
+
*
|
|
5
|
+
*/
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import React from 'react';
|
|
8
|
+
import PropTypes from 'prop-types';
|
|
9
|
+
import { FormattedMessage } from 'react-intl';
|
|
10
|
+
import { Button, PopUpWarning, CheckPermissions } from '@strapi/helper-plugin';
|
|
11
|
+
import adminPermissions from '../../../permissions';
|
|
12
|
+
import Wrapper from './Wrapper';
|
|
13
|
+
|
|
14
|
+
/* eslint-disable react/no-unused-state */
|
|
15
|
+
class PluginCard extends React.Component {
|
|
16
|
+
state = {
|
|
17
|
+
boostrapCol: 'col-lg-4',
|
|
18
|
+
showModalAutoReload: false,
|
|
19
|
+
showModalEnv: false,
|
|
20
|
+
};
|
|
21
|
+
|
|
22
|
+
componentDidMount() {
|
|
23
|
+
// Listen window resize.
|
|
24
|
+
window.addEventListener('resize', this.setBoostrapCol);
|
|
25
|
+
this.setBoostrapCol();
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
componentWillUnmount() {
|
|
29
|
+
window.removeEventListener('resize', this.setBoostrapCol);
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
setBoostrapCol = () => {
|
|
33
|
+
let boostrapCol = 'col-lg-4';
|
|
34
|
+
|
|
35
|
+
if (window.innerWidth > 1680) {
|
|
36
|
+
boostrapCol = 'col-lg-3';
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
if (window.innerWidth > 2300) {
|
|
40
|
+
boostrapCol = 'col-lg-2';
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
this.setState({ boostrapCol });
|
|
44
|
+
};
|
|
45
|
+
|
|
46
|
+
handleDownloadPlugin = e => {
|
|
47
|
+
const {
|
|
48
|
+
autoReload,
|
|
49
|
+
currentEnvironment,
|
|
50
|
+
downloadPlugin,
|
|
51
|
+
history: { push },
|
|
52
|
+
isAlreadyInstalled,
|
|
53
|
+
plugin: { id },
|
|
54
|
+
} = this.props;
|
|
55
|
+
|
|
56
|
+
if (!autoReload) {
|
|
57
|
+
this.setState({ showModalAutoReload: true });
|
|
58
|
+
} else if (currentEnvironment !== 'development') {
|
|
59
|
+
this.setState({ showModalEnv: true });
|
|
60
|
+
} else if (!isAlreadyInstalled) {
|
|
61
|
+
downloadPlugin(id);
|
|
62
|
+
} else {
|
|
63
|
+
push('/list-plugins');
|
|
64
|
+
}
|
|
65
|
+
};
|
|
66
|
+
|
|
67
|
+
render() {
|
|
68
|
+
const buttonClass = !this.props.isAlreadyInstalled ? 'primary' : 'secondary';
|
|
69
|
+
const buttonLabel = this.props.isAlreadyInstalled
|
|
70
|
+
? 'app.components.PluginCard.Button.label.install'
|
|
71
|
+
: 'app.components.PluginCard.Button.label.download';
|
|
72
|
+
|
|
73
|
+
const settingsComponent = null;
|
|
74
|
+
|
|
75
|
+
const descriptions = {
|
|
76
|
+
short:
|
|
77
|
+
this.props.plugin.id === 'support-us' ? (
|
|
78
|
+
<FormattedMessage id={this.props.plugin.description.short} />
|
|
79
|
+
) : (
|
|
80
|
+
this.props.plugin.description.short
|
|
81
|
+
),
|
|
82
|
+
long:
|
|
83
|
+
this.props.plugin.id === 'support-us' ? (
|
|
84
|
+
<FormattedMessage
|
|
85
|
+
id={this.props.plugin.description.long || this.props.plugin.description.short}
|
|
86
|
+
/>
|
|
87
|
+
) : (
|
|
88
|
+
this.props.plugin.description.long || this.props.plugin.description.short
|
|
89
|
+
),
|
|
90
|
+
};
|
|
91
|
+
|
|
92
|
+
return (
|
|
93
|
+
<Wrapper className={this.state.boostrapCol}>
|
|
94
|
+
<div className="wrapper">
|
|
95
|
+
<div className="cardTitle">
|
|
96
|
+
<div className="frame">
|
|
97
|
+
<span className="helper" />
|
|
98
|
+
<img src={this.props.plugin.logo} alt="icon" />
|
|
99
|
+
</div>
|
|
100
|
+
<div
|
|
101
|
+
onClick={e => {
|
|
102
|
+
// FIXME: dead link as we are changing the naming. Would be better to use a url comming from the api call directly
|
|
103
|
+
window.open(
|
|
104
|
+
`https://github.com/strapi/strapi/tree/master/packages/strapi-plugin-${this.props.plugin.id}`,
|
|
105
|
+
'_blank'
|
|
106
|
+
);
|
|
107
|
+
}}
|
|
108
|
+
>
|
|
109
|
+
{this.props.plugin.name} <i className="fa fa-external-link-alt" />
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
<div className="cardDescription">{descriptions.long}</div>
|
|
113
|
+
<div className="cardFooter" onClick={e => e.stopPropagation()}>
|
|
114
|
+
<div className="cardFooterButton">
|
|
115
|
+
<CheckPermissions permissions={adminPermissions.marketplace.install}>
|
|
116
|
+
<Button
|
|
117
|
+
className={`${buttonClass} button`}
|
|
118
|
+
label={buttonLabel}
|
|
119
|
+
type="button"
|
|
120
|
+
onClick={this.handleDownloadPlugin}
|
|
121
|
+
/>
|
|
122
|
+
</CheckPermissions>
|
|
123
|
+
</div>
|
|
124
|
+
{this.props.isAlreadyInstalled ? (
|
|
125
|
+
settingsComponent
|
|
126
|
+
) : (
|
|
127
|
+
<div className="compatible">
|
|
128
|
+
<i className={`fa fa-${this.props.plugin.isCompatible ? 'check' : 'times'}`} />
|
|
129
|
+
<FormattedMessage
|
|
130
|
+
id={`app.components.PluginCard.compatible${
|
|
131
|
+
this.props.plugin.id === 'support-us' ? 'Community' : ''
|
|
132
|
+
}`}
|
|
133
|
+
/>
|
|
134
|
+
</div>
|
|
135
|
+
)}
|
|
136
|
+
</div>
|
|
137
|
+
</div>
|
|
138
|
+
|
|
139
|
+
<PopUpWarning
|
|
140
|
+
content={{
|
|
141
|
+
message: 'app.components.PluginCard.PopUpWarning.install.impossible.autoReload.needed',
|
|
142
|
+
title: 'app.components.PluginCard.PopUpWarning.install.impossible.title',
|
|
143
|
+
confirm: 'app.components.PluginCard.PopUpWarning.install.impossible.confirm',
|
|
144
|
+
}}
|
|
145
|
+
isOpen={this.state.showModalAutoReload}
|
|
146
|
+
onlyConfirmButton
|
|
147
|
+
onConfirm={() => this.setState({ showModalAutoReload: false })}
|
|
148
|
+
popUpWarningType="warning"
|
|
149
|
+
/>
|
|
150
|
+
<PopUpWarning
|
|
151
|
+
content={{
|
|
152
|
+
message: 'app.components.PluginCard.PopUpWarning.install.impossible.environment',
|
|
153
|
+
title: 'app.components.PluginCard.PopUpWarning.install.impossible.title',
|
|
154
|
+
confirm: 'app.components.PluginCard.PopUpWarning.install.impossible.confirm',
|
|
155
|
+
}}
|
|
156
|
+
isOpen={this.state.showModalEnv}
|
|
157
|
+
onlyConfirmButton
|
|
158
|
+
onConfirm={() => this.setState({ showModalEnv: false })}
|
|
159
|
+
popUpWarningType="warning"
|
|
160
|
+
/>
|
|
161
|
+
</Wrapper>
|
|
162
|
+
);
|
|
163
|
+
}
|
|
164
|
+
}
|
|
165
|
+
|
|
166
|
+
PluginCard.defaultProps = {
|
|
167
|
+
isAlreadyInstalled: false,
|
|
168
|
+
plugin: {
|
|
169
|
+
description: '',
|
|
170
|
+
id: '',
|
|
171
|
+
name: '',
|
|
172
|
+
price: 0,
|
|
173
|
+
ratings: 5,
|
|
174
|
+
},
|
|
175
|
+
};
|
|
176
|
+
|
|
177
|
+
PluginCard.propTypes = {
|
|
178
|
+
currentEnvironment: PropTypes.string.isRequired,
|
|
179
|
+
downloadPlugin: PropTypes.func.isRequired,
|
|
180
|
+
history: PropTypes.object.isRequired,
|
|
181
|
+
isAlreadyInstalled: PropTypes.bool,
|
|
182
|
+
plugin: PropTypes.object,
|
|
183
|
+
};
|
|
184
|
+
|
|
185
|
+
export default PluginCard;
|
|
@@ -1,219 +1,127 @@
|
|
|
1
|
-
import React, { useEffect
|
|
1
|
+
import React, { useEffect } from 'react';
|
|
2
2
|
import { useIntl } from 'react-intl';
|
|
3
|
+
import styled from 'styled-components';
|
|
3
4
|
import { Helmet } from 'react-helmet';
|
|
4
|
-
import {
|
|
5
|
-
import matchSorter from 'match-sorter';
|
|
6
|
-
import {
|
|
7
|
-
AnErrorOccurred,
|
|
8
|
-
CheckPagePermissions,
|
|
9
|
-
useFocusWhenNavigate,
|
|
10
|
-
useTracking,
|
|
11
|
-
LoadingIndicatorPage,
|
|
12
|
-
useNotification,
|
|
13
|
-
} from '@strapi/helper-plugin';
|
|
14
|
-
import { Grid, GridItem } from '@strapi/design-system/Grid';
|
|
5
|
+
import { pxToRem, CheckPagePermissions, useTracking } from '@strapi/helper-plugin';
|
|
15
6
|
import { Layout, HeaderLayout, ContentLayout } from '@strapi/design-system/Layout';
|
|
16
|
-
import {
|
|
17
|
-
import { Searchbar } from '@strapi/design-system/Searchbar';
|
|
7
|
+
import { Flex } from '@strapi/design-system/Flex';
|
|
18
8
|
import { Box } from '@strapi/design-system/Box';
|
|
9
|
+
import { Stack } from '@strapi/design-system/Stack';
|
|
19
10
|
import { LinkButton } from '@strapi/design-system/LinkButton';
|
|
20
|
-
import {
|
|
21
|
-
import
|
|
22
|
-
|
|
23
|
-
import PluginCard from './components/PluginCard';
|
|
24
|
-
import { EmptyPluginSearch } from './components/EmptyPluginSearch';
|
|
25
|
-
import { fetchAppInformation } from './utils/api';
|
|
26
|
-
import useFetchInstalledPlugins from '../../hooks/useFetchInstalledPlugins';
|
|
27
|
-
import useFetchMarketplacePlugins from '../../hooks/useFetchMarketplacePlugins';
|
|
11
|
+
import { Main } from '@strapi/design-system/Main';
|
|
12
|
+
import { Typography } from '@strapi/design-system/Typography';
|
|
13
|
+
import ExternalLink from '@strapi/icons/ExternalLink';
|
|
28
14
|
import adminPermissions from '../../permissions';
|
|
15
|
+
import MarketplacePicture from './assets/marketplace-coming-soon.png';
|
|
29
16
|
|
|
30
|
-
const
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
17
|
+
const CenterTypography = styled(Typography)`
|
|
18
|
+
text-align: center;
|
|
19
|
+
`;
|
|
20
|
+
|
|
21
|
+
const Img = styled.img`
|
|
22
|
+
width: ${190 / 16}rem;
|
|
23
|
+
`;
|
|
24
|
+
|
|
25
|
+
const StackCentered = styled(Stack)`
|
|
26
|
+
align-items: center;
|
|
27
|
+
`;
|
|
41
28
|
|
|
42
29
|
const MarketPlacePage = () => {
|
|
43
30
|
const { formatMessage } = useIntl();
|
|
44
31
|
const { trackUsage } = useTracking();
|
|
45
|
-
const { notifyStatus } = useNotifyAT();
|
|
46
|
-
const trackUsageRef = useRef(trackUsage);
|
|
47
|
-
const toggleNotification = useNotification();
|
|
48
|
-
const [searchQuery, setSearchQuery] = useState('');
|
|
49
|
-
|
|
50
|
-
useFocusWhenNavigate();
|
|
51
|
-
|
|
52
|
-
const marketplaceTitle = formatMessage({
|
|
53
|
-
id: 'admin.pages.MarketPlacePage.title',
|
|
54
|
-
defaultMessage: 'Marketplace',
|
|
55
|
-
});
|
|
56
|
-
|
|
57
|
-
const notifyMarketplaceLoad = () => {
|
|
58
|
-
notifyStatus(
|
|
59
|
-
formatMessage(
|
|
60
|
-
{
|
|
61
|
-
id: 'app.utils.notify.data-loaded',
|
|
62
|
-
defaultMessage: 'The {target} has loaded',
|
|
63
|
-
},
|
|
64
|
-
{ target: marketplaceTitle }
|
|
65
|
-
)
|
|
66
|
-
);
|
|
67
|
-
};
|
|
68
|
-
|
|
69
|
-
const {
|
|
70
|
-
status: marketplacePluginsStatus,
|
|
71
|
-
data: marketplacePluginsResponse,
|
|
72
|
-
} = useFetchMarketplacePlugins(notifyMarketplaceLoad);
|
|
73
|
-
|
|
74
|
-
const {
|
|
75
|
-
status: installedPluginsStatus,
|
|
76
|
-
data: installedPluginsResponse,
|
|
77
|
-
} = useFetchInstalledPlugins();
|
|
78
|
-
|
|
79
|
-
const { data: appInfoResponse, status: appInfoStatus } = useQuery(
|
|
80
|
-
'app-information',
|
|
81
|
-
fetchAppInformation,
|
|
82
|
-
{
|
|
83
|
-
onError: () => {
|
|
84
|
-
toggleNotification({
|
|
85
|
-
type: 'warning',
|
|
86
|
-
message: { id: 'notification.error', defaultMessage: 'An error occured' },
|
|
87
|
-
});
|
|
88
|
-
},
|
|
89
|
-
}
|
|
90
|
-
);
|
|
91
|
-
|
|
92
|
-
const isLoading = [marketplacePluginsStatus, installedPluginsStatus, appInfoStatus].includes(
|
|
93
|
-
'loading'
|
|
94
|
-
);
|
|
95
|
-
|
|
96
|
-
const hasFailed = [marketplacePluginsStatus, installedPluginsStatus, appInfoStatus].includes(
|
|
97
|
-
'error'
|
|
98
|
-
);
|
|
99
32
|
|
|
100
33
|
useEffect(() => {
|
|
101
|
-
|
|
102
|
-
}, []);
|
|
34
|
+
trackUsage('didGoToMarketplace');
|
|
35
|
+
}, [trackUsage]);
|
|
103
36
|
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
<Layout>
|
|
107
|
-
<ContentLayout>
|
|
108
|
-
<Box paddingTop={8}>
|
|
109
|
-
<AnErrorOccurred />
|
|
110
|
-
</Box>
|
|
111
|
-
</ContentLayout>
|
|
112
|
-
</Layout>
|
|
113
|
-
);
|
|
114
|
-
}
|
|
115
|
-
|
|
116
|
-
if (isLoading) {
|
|
117
|
-
return (
|
|
37
|
+
return (
|
|
38
|
+
<CheckPagePermissions permissions={adminPermissions.marketplace.main}>
|
|
118
39
|
<Layout>
|
|
119
|
-
<Main
|
|
120
|
-
<
|
|
40
|
+
<Main>
|
|
41
|
+
<Helmet
|
|
42
|
+
title={formatMessage({
|
|
43
|
+
id: 'admin.pages.MarketPlacePage.helmet',
|
|
44
|
+
defaultMessage: 'Marketplace - Plugins',
|
|
45
|
+
})}
|
|
46
|
+
/>
|
|
47
|
+
<HeaderLayout
|
|
48
|
+
title={formatMessage({
|
|
49
|
+
id: 'admin.pages.MarketPlacePage.title',
|
|
50
|
+
defaultMessage: 'Marketplace',
|
|
51
|
+
})}
|
|
52
|
+
subtitle={formatMessage({
|
|
53
|
+
id: 'admin.pages.MarketPlacePage.subtitle',
|
|
54
|
+
defaultMessage: 'Get more out of Strapi',
|
|
55
|
+
})}
|
|
56
|
+
/>
|
|
57
|
+
<ContentLayout>
|
|
58
|
+
<StackCentered
|
|
59
|
+
spacing={0}
|
|
60
|
+
hasRadius
|
|
61
|
+
background="neutral0"
|
|
62
|
+
shadow="tableShadow"
|
|
63
|
+
paddingTop={10}
|
|
64
|
+
paddingBottom={10}
|
|
65
|
+
>
|
|
66
|
+
<Box paddingBottom={7}>
|
|
67
|
+
<Img
|
|
68
|
+
alt={formatMessage({
|
|
69
|
+
id: 'admin.pages.MarketPlacePage.illustration',
|
|
70
|
+
defaultMessage: 'marketplace illustration',
|
|
71
|
+
})}
|
|
72
|
+
src={MarketplacePicture}
|
|
73
|
+
/>
|
|
74
|
+
</Box>
|
|
75
|
+
<Typography variant="alpha">
|
|
76
|
+
{formatMessage({
|
|
77
|
+
id: 'admin.pages.MarketPlacePage.coming-soon.1',
|
|
78
|
+
defaultMessage: 'A new way to make Strapi awesome.',
|
|
79
|
+
})}
|
|
80
|
+
</Typography>
|
|
81
|
+
<Typography variant="alpha" textColor="primary700">
|
|
82
|
+
{formatMessage({
|
|
83
|
+
id: 'admin.pages.MarketPlacePage.published',
|
|
84
|
+
defaultMessage: 'Finally here.',
|
|
85
|
+
})}
|
|
86
|
+
</Typography>
|
|
87
|
+
<Flex maxWidth={pxToRem(620)} paddingTop={3}>
|
|
88
|
+
<CenterTypography variant="epsilon" textColor="neutral600">
|
|
89
|
+
{formatMessage({
|
|
90
|
+
id: 'admin.pages.MarketPlacePage.content.subtitle.published',
|
|
91
|
+
defaultMessage:
|
|
92
|
+
'The web marketplace helps you get the most of Strapi. In addition, we are working hard to offer the best experience to discover and install plugins, directly from the app.',
|
|
93
|
+
})}
|
|
94
|
+
</CenterTypography>
|
|
95
|
+
</Flex>
|
|
96
|
+
<Stack paddingTop={6} horizontal spacing={2}>
|
|
97
|
+
<LinkButton
|
|
98
|
+
href="https://market.strapi.io"
|
|
99
|
+
size="L"
|
|
100
|
+
variant="primary"
|
|
101
|
+
endIcon={<ExternalLink />}
|
|
102
|
+
>
|
|
103
|
+
{formatMessage({
|
|
104
|
+
id: 'admin.pages.MarketPlacePage.submit.market.link',
|
|
105
|
+
defaultMessage: 'Visit the web marketplace',
|
|
106
|
+
})}
|
|
107
|
+
</LinkButton>
|
|
108
|
+
<LinkButton
|
|
109
|
+
href="https://market.strapi.io/submit-plugin"
|
|
110
|
+
size="L"
|
|
111
|
+
variant="secondary"
|
|
112
|
+
>
|
|
113
|
+
{formatMessage({
|
|
114
|
+
id: 'admin.pages.MarketPlacePage.submit.plugin.link',
|
|
115
|
+
defaultMessage: 'Submit your plugin',
|
|
116
|
+
})}
|
|
117
|
+
</LinkButton>
|
|
118
|
+
</Stack>
|
|
119
|
+
</StackCentered>
|
|
120
|
+
</ContentLayout>
|
|
121
121
|
</Main>
|
|
122
122
|
</Layout>
|
|
123
|
-
|
|
124
|
-
}
|
|
125
|
-
|
|
126
|
-
const searchResults = matchSearch(marketplacePluginsResponse.data, searchQuery);
|
|
127
|
-
const installedPluginNames = installedPluginsResponse.plugins.map(plugin => plugin.packageName);
|
|
128
|
-
|
|
129
|
-
return (
|
|
130
|
-
<Layout>
|
|
131
|
-
<Main>
|
|
132
|
-
<Helmet
|
|
133
|
-
title={formatMessage({
|
|
134
|
-
id: 'admin.pages.MarketPlacePage.helmet',
|
|
135
|
-
defaultMessage: 'Marketplace - Plugins',
|
|
136
|
-
})}
|
|
137
|
-
/>
|
|
138
|
-
<HeaderLayout
|
|
139
|
-
title={formatMessage({
|
|
140
|
-
id: 'admin.pages.MarketPlacePage.title',
|
|
141
|
-
defaultMessage: 'Marketplace',
|
|
142
|
-
})}
|
|
143
|
-
subtitle={formatMessage({
|
|
144
|
-
id: 'admin.pages.MarketPlacePage.subtitle',
|
|
145
|
-
defaultMessage: 'Get more out of Strapi',
|
|
146
|
-
})}
|
|
147
|
-
primaryAction={
|
|
148
|
-
<LinkButton
|
|
149
|
-
startIcon={<Upload />}
|
|
150
|
-
variant="tertiary"
|
|
151
|
-
href="https://market.strapi.io/submit-plugin"
|
|
152
|
-
onClick={() => trackUsage('didSubmitPlugin')}
|
|
153
|
-
>
|
|
154
|
-
{formatMessage({
|
|
155
|
-
id: 'admin.pages.MarketPlacePage.submit.plugin.link',
|
|
156
|
-
defaultMessage: 'Submit your plugin',
|
|
157
|
-
})}
|
|
158
|
-
</LinkButton>
|
|
159
|
-
}
|
|
160
|
-
/>
|
|
161
|
-
<ContentLayout>
|
|
162
|
-
<Box width="25%" paddingBottom={4}>
|
|
163
|
-
<Searchbar
|
|
164
|
-
name="searchbar"
|
|
165
|
-
onClear={() => setSearchQuery('')}
|
|
166
|
-
value={searchQuery}
|
|
167
|
-
onChange={e => setSearchQuery(e.target.value)}
|
|
168
|
-
clearLabel={formatMessage({
|
|
169
|
-
id: 'admin.pages.MarketPlacePage.search.clear',
|
|
170
|
-
defaultMessage: 'Clear the plugin search',
|
|
171
|
-
})}
|
|
172
|
-
placeholder={formatMessage({
|
|
173
|
-
id: 'admin.pages.MarketPlacePage.search.placeholder',
|
|
174
|
-
defaultMessage: 'Search for a plugin',
|
|
175
|
-
})}
|
|
176
|
-
>
|
|
177
|
-
{formatMessage({
|
|
178
|
-
id: 'admin.pages.MarketPlacePage.search.placeholder',
|
|
179
|
-
defaultMessage: 'Search for a plugin',
|
|
180
|
-
})}
|
|
181
|
-
</Searchbar>
|
|
182
|
-
</Box>
|
|
183
|
-
{searchQuery.length > 0 && !searchResults.length ? (
|
|
184
|
-
<EmptyPluginSearch
|
|
185
|
-
content={formatMessage(
|
|
186
|
-
{
|
|
187
|
-
id: 'admin.pages.MarketPlacePage.search.empty',
|
|
188
|
-
defaultMessage: 'No result for "{target}"',
|
|
189
|
-
},
|
|
190
|
-
{ target: searchQuery }
|
|
191
|
-
)}
|
|
192
|
-
/>
|
|
193
|
-
) : (
|
|
194
|
-
<Grid gap={4}>
|
|
195
|
-
{searchResults.map(plugin => (
|
|
196
|
-
<GridItem col={4} s={6} xs={12} style={{ height: '100%' }} key={plugin.id}>
|
|
197
|
-
<PluginCard
|
|
198
|
-
plugin={plugin}
|
|
199
|
-
installedPluginNames={installedPluginNames}
|
|
200
|
-
useYarn={appInfoResponse.data.useYarn}
|
|
201
|
-
/>
|
|
202
|
-
</GridItem>
|
|
203
|
-
))}
|
|
204
|
-
</Grid>
|
|
205
|
-
)}
|
|
206
|
-
</ContentLayout>
|
|
207
|
-
</Main>
|
|
208
|
-
</Layout>
|
|
123
|
+
</CheckPagePermissions>
|
|
209
124
|
);
|
|
210
125
|
};
|
|
211
126
|
|
|
212
|
-
|
|
213
|
-
<CheckPagePermissions permissions={adminPermissions.marketplace.main}>
|
|
214
|
-
<MarketPlacePage />
|
|
215
|
-
</CheckPagePermissions>
|
|
216
|
-
);
|
|
217
|
-
|
|
218
|
-
export { MarketPlacePage };
|
|
219
|
-
export default ProtectedMarketPlace;
|
|
127
|
+
export default MarketPlacePage;
|
|
@@ -58,21 +58,6 @@
|
|
|
58
58
|
"Auth.privacy-policy-agreement.policy": "privacy policy",
|
|
59
59
|
"Auth.privacy-policy-agreement.terms": "terms",
|
|
60
60
|
"Auth.reset-password.title": "Reset password",
|
|
61
|
-
"admin.pages.MarketPlacePage.helmet": "Marketplace - Plugins",
|
|
62
|
-
"admin.pages.MarketPlacePage.title": "Marketplace",
|
|
63
|
-
"admin.pages.MarketPlacePage.subtitle": "Get more out of Strapi",
|
|
64
|
-
"admin.pages.MarketPlacePage.plugin.info.text": "Learn more",
|
|
65
|
-
"admin.pages.MarketPlacePage.plugin.info.label": "Learn more about {pluginName}",
|
|
66
|
-
"admin.pages.MarketPlacePage.plugin.copy": "Copy install command",
|
|
67
|
-
"admin.pages.MarketPlacePage.plugin.copy.success": "Install command ready to be pasted in your terminal",
|
|
68
|
-
"admin.pages.MarketPlacePage.plugin.installed": "Installed",
|
|
69
|
-
"admin.pages.MarketPlacePage.plugin.info": "Learn more",
|
|
70
|
-
"admin.pages.MarketPlacePage.submit.plugin.link": "Submit your plugin",
|
|
71
|
-
"admin.pages.MarketPlacePage.plugin.tooltip.verified": "Plugin verified by Strapi",
|
|
72
|
-
"admin.pages.MarketPlacePage.search.placeholder": "Search for a plugin",
|
|
73
|
-
"admin.pages.MarketPlacePage.search.clear": "Clear the plugin search",
|
|
74
|
-
"admin.pages.MarketPlacePage.search.empty": "No result for \"{target}\"",
|
|
75
|
-
"admin.pages.MarketPlacePage.plugin.tooltip.madeByStrapi": "Made by Strapi",
|
|
76
61
|
"Content Manager": "Content Manager",
|
|
77
62
|
"Content Type Builder": "Content-Types Builder",
|
|
78
63
|
"Documentation": "Documentation",
|
|
@@ -242,6 +227,18 @@
|
|
|
242
227
|
"Users.components.List.empty": "There is no users...",
|
|
243
228
|
"Users.components.List.empty.withFilters": "There is no users with the applied filters...",
|
|
244
229
|
"Users.components.List.empty.withSearch": "There is no users corresponding to the search ({search})...",
|
|
230
|
+
"admin.pages.MarketPlacePage.blog.link": "Read our blog post",
|
|
231
|
+
"admin.pages.MarketPlacePage.coming-soon.1": "A new way to make Strapi awesome.",
|
|
232
|
+
"admin.pages.MarketPlacePage.coming-soon.2": "Coming soon.",
|
|
233
|
+
"admin.pages.MarketPlacePage.content.subtitle": "The new marketplace will help you get more out of Strapi. We are working hard to offer the best experience to discover and install plugins.",
|
|
234
|
+
"admin.pages.MarketPlacePage.content.subtitle.published": "The web marketplace helps you get the most of Strapi. In addition, we are working hard to offer the best experience to discover and install plugins, directly from the app.",
|
|
235
|
+
"admin.pages.MarketPlacePage.helmet": "Marketplace - Plugins",
|
|
236
|
+
"admin.pages.MarketPlacePage.illustration": "marketplace illustration",
|
|
237
|
+
"admin.pages.MarketPlacePage.market.link": "Visit the web marketplace",
|
|
238
|
+
"admin.pages.MarketPlacePage.published": "Finally here.",
|
|
239
|
+
"admin.pages.MarketPlacePage.submit.plugin.link": "Submit your plugin",
|
|
240
|
+
"admin.pages.MarketPlacePage.subtitle": "Get more out of Strapi",
|
|
241
|
+
"admin.pages.MarketPlacePage.title": "Marketplace",
|
|
245
242
|
"anErrorOccurred": "Woops! Something went wrong. Please, try again.",
|
|
246
243
|
"app.components.GuidedTour.skip": "Skip the tour",
|
|
247
244
|
"app.components.GuidedTour.title": "3 steps to get started",
|
|
@@ -357,8 +354,8 @@
|
|
|
357
354
|
"app.components.PluginCard.compatible": "Compatible with your app",
|
|
358
355
|
"app.components.PluginCard.compatibleCommunity": "Compatible with the community",
|
|
359
356
|
"app.components.PluginCard.more-details": "More details",
|
|
360
|
-
"app.components.ToggleCheckbox.off-label": "
|
|
361
|
-
"app.components.ToggleCheckbox.on-label": "
|
|
357
|
+
"app.components.ToggleCheckbox.off-label": "False",
|
|
358
|
+
"app.components.ToggleCheckbox.on-label": "True",
|
|
362
359
|
"app.components.UpgradePlanModal.button": "Learn more",
|
|
363
360
|
"app.components.UpgradePlanModal.limit-reached": "You have reached the limit",
|
|
364
361
|
"app.components.UpgradePlanModal.text-ce": "Community Edition",
|
|
@@ -704,4 +701,4 @@
|
|
|
704
701
|
"request.error.model.unknown": "This model doesn't exist",
|
|
705
702
|
"skipToContent": "Skip to content",
|
|
706
703
|
"submit": "Submit"
|
|
707
|
-
}
|
|
704
|
+
}
|
|
@@ -315,8 +315,8 @@
|
|
|
315
315
|
"app.components.PluginCard.compatible": "アプリとの互換性",
|
|
316
316
|
"app.components.PluginCard.compatibleCommunity": "コミュニティとの互換性",
|
|
317
317
|
"app.components.PluginCard.more-details": "詳細を見る",
|
|
318
|
-
"app.components.ToggleCheckbox.off-label": "
|
|
319
|
-
"app.components.ToggleCheckbox.on-label": "
|
|
318
|
+
"app.components.ToggleCheckbox.off-label": "False",
|
|
319
|
+
"app.components.ToggleCheckbox.on-label": "True",
|
|
320
320
|
"app.components.UpgradePlanModal.button": "Learn more",
|
|
321
321
|
"app.components.UpgradePlanModal.limit-reached": "You have reached the limit",
|
|
322
322
|
"app.components.UpgradePlanModal.text-ce": "Community Edition",
|
|
@@ -317,8 +317,8 @@
|
|
|
317
317
|
"app.components.PluginCard.compatible": "이 애플리케이션에 호환됩니다.",
|
|
318
318
|
"app.components.PluginCard.compatibleCommunity": "션뮤니티에 호환됩니다.",
|
|
319
319
|
"app.components.PluginCard.more-details": "[더보기]",
|
|
320
|
-
"app.components.ToggleCheckbox.off-label": "
|
|
321
|
-
"app.components.ToggleCheckbox.on-label": "
|
|
320
|
+
"app.components.ToggleCheckbox.off-label": "False",
|
|
321
|
+
"app.components.ToggleCheckbox.on-label": "True",
|
|
322
322
|
"app.components.UpgradePlanModal.button": "Learn more",
|
|
323
323
|
"app.components.UpgradePlanModal.limit-reached": "You have reached the limit",
|
|
324
324
|
"app.components.UpgradePlanModal.text-ce": "Community Edition",
|
|
Binary file
|