From 03ee9f10fb94bdab9a30145f72440b247b8140eb Mon Sep 17 00:00:00 2001 From: cyril lopez Date: Wed, 28 Feb 2018 10:50:07 +0100 Subject: [PATCH] Add configurations to list-plugins page --- .../admin/src/components/Row/index.js | 31 +++++++++++++++++-- .../src/components/FileIcon/extensions.json | 2 +- .../admin/src/containers/App/index.js | 2 +- 3 files changed, 31 insertions(+), 4 deletions(-) diff --git a/packages/strapi-admin/admin/src/components/Row/index.js b/packages/strapi-admin/admin/src/components/Row/index.js index 4171583636..fc3c012a92 100644 --- a/packages/strapi-admin/admin/src/components/Row/index.js +++ b/packages/strapi-admin/admin/src/components/Row/index.js @@ -8,9 +8,10 @@ import React from 'react'; import PropTypes from 'prop-types'; import cn from 'classnames'; import { FormattedMessage } from 'react-intl'; +import { get } from 'lodash'; // Design -import Ico from 'components/Ico'; +import IcoContainer from 'components/IcoContainer'; import ListRow from 'components/ListRow'; import PopUpWarning from 'components/PopUpWarning'; @@ -31,6 +32,27 @@ class Row extends React.Component { } render() { + const uploadPath = `/plugins/upload/configurations/${get(this.context, ['appEnvironments', '0', 'name'])}`; + const icons = this.props.name === 'upload' ? [ + { + icoType: 'cog', + onClick: (e) => { + e.preventDefault(); + e.stopPropagation(); + this.context.router.history.push(uploadPath); + }, + }, + { + icoType: 'trash', + onClick: this.handleClick, + }, + ] : [ + { + icoType: 'trash', + onClick: this.handleClick, + }, + ]; + return (
@@ -44,7 +66,7 @@ class Row extends React.Component {
- +
- +