diff --git a/imports/ui/components/Loading.js b/imports/ui/components/Loading.js new file mode 100644 index 0000000..e7c7e7e --- /dev/null +++ b/imports/ui/components/Loading.js @@ -0,0 +1,30 @@ +import React from 'react'; + +const Loading = () => ( + + + + + +); + +export default Loading; diff --git a/imports/ui/components/document.js b/imports/ui/components/document.js deleted file mode 100644 index 0cc1ee2..0000000 --- a/imports/ui/components/document.js +++ /dev/null @@ -1,66 +0,0 @@ -import React from 'react'; -import { Row, Col, ListGroupItem, FormControl, Button } from 'react-bootstrap'; -import { Bert } from 'meteor/themeteorchef:bert'; -import { updateDocument, removeDocument } from '../../api/documents/methods.js'; - -const handleUpdateDocument = (documentId, event) => { - const title = event.target.value.trim(); - if (title !== '' && event.keyCode === 13) { - updateDocument.call({ - _id: documentId, - update: { title }, - }, (error) => { - if (error) { - Bert.alert(error.reason, 'danger'); - } else { - Bert.alert('Document updated!', 'success'); - } - }); - } -}; - -const handleRemoveDocument = (documentId, event) => { - event.preventDefault(); - // this should be replaced with a styled solution so for now we will - // disable the eslint `no-alert` - // eslint-disable-next-line no-alert - if (confirm('Are you sure? This is permanent.')) { - removeDocument.call({ - _id: documentId, - }, (error) => { - if (error) { - Bert.alert(error.reason, 'danger'); - } else { - Bert.alert('Document removed!', 'success'); - } - }); - } -}; - -const Document = ({ document }) => ( - - - - - - - - - - -); - -Document.propTypes = { - document: React.PropTypes.object, -}; - -export default Document; diff --git a/imports/ui/components/loading.js b/imports/ui/components/loading.js deleted file mode 100644 index e7c7e7e..0000000 --- a/imports/ui/components/loading.js +++ /dev/null @@ -1,30 +0,0 @@ -import React from 'react'; - -const Loading = () => ( - - - - - -); - -export default Loading; diff --git a/imports/ui/layouts/App.js b/imports/ui/layouts/App.js new file mode 100644 index 0000000..1a8c89c --- /dev/null +++ b/imports/ui/layouts/App.js @@ -0,0 +1,18 @@ +import React from 'react'; +import { Grid } from 'react-bootstrap'; +import AppNavigation from '../containers/AppNavigation.js'; + +const App = ({ children }) => ( +
+ + + { children } + +
+); + +App.propTypes = { + children: React.PropTypes.node, +}; + +export default App; diff --git a/imports/ui/layouts/app.js b/imports/ui/layouts/app.js deleted file mode 100644 index 1a8c89c..0000000 --- a/imports/ui/layouts/app.js +++ /dev/null @@ -1,18 +0,0 @@ -import React from 'react'; -import { Grid } from 'react-bootstrap'; -import AppNavigation from '../containers/AppNavigation.js'; - -const App = ({ children }) => ( -
- - - { children } - -
-); - -App.propTypes = { - children: React.PropTypes.node, -}; - -export default App; diff --git a/imports/ui/pages/Index.js b/imports/ui/pages/Index.js new file mode 100644 index 0000000..02cb4a6 --- /dev/null +++ b/imports/ui/pages/Index.js @@ -0,0 +1,13 @@ +import React from 'react'; +import { Jumbotron } from 'react-bootstrap'; + +const Index = () => ( + +

Base

+

A starting point for Meteor applications.

+

Read the Documentation

+

Currently at v4.8.0

+
+); + +export default Index; diff --git a/imports/ui/pages/Login.js b/imports/ui/pages/Login.js new file mode 100644 index 0000000..7a14d4f --- /dev/null +++ b/imports/ui/pages/Login.js @@ -0,0 +1,46 @@ +import React from 'react'; +import { Link } from 'react-router'; +import { Row, Col, FormGroup, ControlLabel, FormControl, Button } from 'react-bootstrap'; +import handleLogin from '../../modules/login'; + +export default class Login extends React.Component { + componentDidMount() { + handleLogin({ component: this }); + } + + handleSubmit(event) { + event.preventDefault(); + } + + render() { + return ( + +

Login

+
+ + Email Address + + + + + Password + Forgot Password? + + + + +
+ +
); + } +} diff --git a/imports/ui/pages/Signup.js b/imports/ui/pages/Signup.js new file mode 100644 index 0000000..f32bdc6 --- /dev/null +++ b/imports/ui/pages/Signup.js @@ -0,0 +1,68 @@ +import React from 'react'; +import { Link } from 'react-router'; +import { Row, Col, FormGroup, ControlLabel, FormControl, Button } from 'react-bootstrap'; +import handleSignup from '../../modules/signup'; + +export default class Signup extends React.Component { + componentDidMount() { + handleSignup({ component: this }); + } + + handleSubmit(event) { + event.preventDefault(); + } + + render() { + return ( + +

Sign Up

+
+ + + + First Name + + + + + + Last Name + + + + + + Email Address + + + + Password + + + +
+

Already have an account? Log In.

+ +
); + } +} diff --git a/imports/ui/pages/index.js b/imports/ui/pages/index.js deleted file mode 100644 index 02cb4a6..0000000 --- a/imports/ui/pages/index.js +++ /dev/null @@ -1,13 +0,0 @@ -import React from 'react'; -import { Jumbotron } from 'react-bootstrap'; - -const Index = () => ( - -

Base

-

A starting point for Meteor applications.

-

Read the Documentation

-

Currently at v4.8.0

-
-); - -export default Index; diff --git a/imports/ui/pages/login.js b/imports/ui/pages/login.js deleted file mode 100644 index 7a14d4f..0000000 --- a/imports/ui/pages/login.js +++ /dev/null @@ -1,46 +0,0 @@ -import React from 'react'; -import { Link } from 'react-router'; -import { Row, Col, FormGroup, ControlLabel, FormControl, Button } from 'react-bootstrap'; -import handleLogin from '../../modules/login'; - -export default class Login extends React.Component { - componentDidMount() { - handleLogin({ component: this }); - } - - handleSubmit(event) { - event.preventDefault(); - } - - render() { - return ( - -

Login

-
- - Email Address - - - - - Password - Forgot Password? - - - - -
- -
); - } -} diff --git a/imports/ui/pages/signup.js b/imports/ui/pages/signup.js deleted file mode 100644 index f32bdc6..0000000 --- a/imports/ui/pages/signup.js +++ /dev/null @@ -1,68 +0,0 @@ -import React from 'react'; -import { Link } from 'react-router'; -import { Row, Col, FormGroup, ControlLabel, FormControl, Button } from 'react-bootstrap'; -import handleSignup from '../../modules/signup'; - -export default class Signup extends React.Component { - componentDidMount() { - handleSignup({ component: this }); - } - - handleSubmit(event) { - event.preventDefault(); - } - - render() { - return ( - -

Sign Up

-
- - - - First Name - - - - - - Last Name - - - - - - Email Address - - - - Password - - - -
-

Already have an account? Log In.

- -
); - } -}