mirror of
https://github.com/yldio/copilot.git
synced 2024-11-11 05:40:11 +02:00
empty components
This commit is contained in:
parent
542247f72f
commit
44ac7956e2
@ -9,6 +9,7 @@
|
|||||||
"create-new": "Create a new",
|
"create-new": "Create a new",
|
||||||
"add-services": "Add services",
|
"add-services": "Add services",
|
||||||
"no-services": "You don’t have any services. You can either add them by editing a manifest file or by connecting your repo on GitHub or BitBucket.",
|
"no-services": "You don’t have any services. You can either add them by editing a manifest file or by connecting your repo on GitHub or BitBucket.",
|
||||||
|
"no-projects": "You don’t have any projects.",
|
||||||
"edit-project-manifest": "Edit project manifest",
|
"edit-project-manifest": "Edit project manifest",
|
||||||
"or-bring-in-from": "or bring in from",
|
"or-bring-in-from": "or bring in from",
|
||||||
"your-settings": "Your settings",
|
"your-settings": "Your settings",
|
||||||
|
19
frontend/src/components/empty/projects.js
Normal file
19
frontend/src/components/empty/projects.js
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
const React = require('react');
|
||||||
|
const ReactIntl = require('react-intl');
|
||||||
|
|
||||||
|
const Column = require('@ui/components/column');
|
||||||
|
const Row = require('@ui/components/row');
|
||||||
|
|
||||||
|
const {
|
||||||
|
FormattedMessage
|
||||||
|
} = ReactIntl;
|
||||||
|
|
||||||
|
module.exports = () => (
|
||||||
|
<Row>
|
||||||
|
<Column xs={12}>
|
||||||
|
<p name='empty'>
|
||||||
|
<FormattedMessage id='no-projects' />
|
||||||
|
</p>
|
||||||
|
</Column>
|
||||||
|
</Row>
|
||||||
|
);
|
43
frontend/src/components/empty/services.js
Normal file
43
frontend/src/components/empty/services.js
Normal file
@ -0,0 +1,43 @@
|
|||||||
|
const React = require('react');
|
||||||
|
const ReactIntl = require('react-intl');
|
||||||
|
|
||||||
|
const Button = require('@ui/components/button');
|
||||||
|
const Column = require('@ui/components/column');
|
||||||
|
const Row = require('@ui/components/row');
|
||||||
|
|
||||||
|
const {
|
||||||
|
FormattedMessage
|
||||||
|
} = ReactIntl;
|
||||||
|
|
||||||
|
module.exports = () => (
|
||||||
|
<div>
|
||||||
|
<Row name='empty-services'>
|
||||||
|
<Column md={6} xs={12}>
|
||||||
|
<h3>
|
||||||
|
<FormattedMessage id='add-services' />
|
||||||
|
</h3>
|
||||||
|
<p>
|
||||||
|
<FormattedMessage id='no-services' />
|
||||||
|
</p>
|
||||||
|
</Column>
|
||||||
|
</Row>
|
||||||
|
<Row>
|
||||||
|
<Button>
|
||||||
|
<FormattedMessage id='edit-project-manifest' />
|
||||||
|
</Button>
|
||||||
|
</Row>
|
||||||
|
<Row>
|
||||||
|
<p>
|
||||||
|
<FormattedMessage id='or-bring-in-from' />
|
||||||
|
</p>
|
||||||
|
</Row>
|
||||||
|
<Row>
|
||||||
|
<Column>
|
||||||
|
<Button secondary>GitHub</Button>
|
||||||
|
</Column>
|
||||||
|
<Column>
|
||||||
|
<Button secondary>BitBucket</Button>
|
||||||
|
</Column>
|
||||||
|
</Row>
|
||||||
|
</div>
|
||||||
|
);
|
@ -5,6 +5,7 @@ const ReactRouter = require('react-router');
|
|||||||
|
|
||||||
const Button = require('@ui/components/button');
|
const Button = require('@ui/components/button');
|
||||||
const Column = require('@ui/components/column');
|
const Column = require('@ui/components/column');
|
||||||
|
const EmptyProjects = require('@components/empty/projects');
|
||||||
const PropTypes = require('@root/prop-types');
|
const PropTypes = require('@root/prop-types');
|
||||||
const Row = require('@ui/components/row');
|
const Row = require('@ui/components/row');
|
||||||
const selectors = require('@state/selectors');
|
const selectors = require('@state/selectors');
|
||||||
@ -31,13 +32,7 @@ const Projects = ({
|
|||||||
projects = []
|
projects = []
|
||||||
}) => {
|
}) => {
|
||||||
const empty = projects.length ? null : (
|
const empty = projects.length ? null : (
|
||||||
<Row>
|
<EmptyProjects />
|
||||||
<Column xs={12}>
|
|
||||||
<p name='empty'>
|
|
||||||
<FormattedMessage id='no-personal-projects' />
|
|
||||||
</p>
|
|
||||||
</Column>
|
|
||||||
</Row>
|
|
||||||
);
|
);
|
||||||
|
|
||||||
const _projects = projects.map((project) => (
|
const _projects = projects.map((project) => (
|
||||||
|
@ -1,10 +1,8 @@
|
|||||||
const React = require('react');
|
const React = require('react');
|
||||||
const ReactIntl = require('react-intl');
|
|
||||||
const ReactRedux = require('react-redux');
|
const ReactRedux = require('react-redux');
|
||||||
const ReactRouter = require('react-router');
|
const ReactRouter = require('react-router');
|
||||||
|
|
||||||
const Button = require('@ui/components/button');
|
const EmptyServices = require('@components/empty/services');
|
||||||
const Column = require('@ui/components/column');
|
|
||||||
const PropTypes = require('@root/prop-types');
|
const PropTypes = require('@root/prop-types');
|
||||||
const Row = require('@ui/components/row');
|
const Row = require('@ui/components/row');
|
||||||
const selectors = require('@state/selectors');
|
const selectors = require('@state/selectors');
|
||||||
@ -13,10 +11,6 @@ const {
|
|||||||
connect
|
connect
|
||||||
} = ReactRedux;
|
} = ReactRedux;
|
||||||
|
|
||||||
const {
|
|
||||||
FormattedMessage
|
|
||||||
} = ReactIntl;
|
|
||||||
|
|
||||||
const {
|
const {
|
||||||
orgByIdSelector,
|
orgByIdSelector,
|
||||||
projectByIdSelector,
|
projectByIdSelector,
|
||||||
@ -27,39 +21,6 @@ const {
|
|||||||
Link
|
Link
|
||||||
} = ReactRouter;
|
} = ReactRouter;
|
||||||
|
|
||||||
const EmptyServices = () => (
|
|
||||||
<div>
|
|
||||||
<Row name='empty-services'>
|
|
||||||
<Column md={6} xs={12}>
|
|
||||||
<h3>
|
|
||||||
<FormattedMessage id='add-services' />
|
|
||||||
</h3>
|
|
||||||
<p>
|
|
||||||
<FormattedMessage id='no-services' />
|
|
||||||
</p>
|
|
||||||
</Column>
|
|
||||||
</Row>
|
|
||||||
<Row>
|
|
||||||
<Button>
|
|
||||||
<FormattedMessage id='edit-project-manifest' />
|
|
||||||
</Button>
|
|
||||||
</Row>
|
|
||||||
<Row>
|
|
||||||
<p>
|
|
||||||
<FormattedMessage id='or-bring-in-from' />
|
|
||||||
</p>
|
|
||||||
</Row>
|
|
||||||
<Row>
|
|
||||||
<Column>
|
|
||||||
<Button secondary>GitHub</Button>
|
|
||||||
</Column>
|
|
||||||
<Column>
|
|
||||||
<Button secondary>BitBucket</Button>
|
|
||||||
</Column>
|
|
||||||
</Row>
|
|
||||||
</div>
|
|
||||||
);
|
|
||||||
|
|
||||||
const Services = ({
|
const Services = ({
|
||||||
org = {},
|
org = {},
|
||||||
project = {},
|
project = {},
|
||||||
|
Loading…
Reference in New Issue
Block a user