Commit bc401ec925285916d52684d8cc403f293dcbfa57

Authored by themeteorchef
1 parent 5c607b0299
Exists in master

force git to recognize casing on file names

imports/ui/components/Loading.js
File was created 1 import React from 'react';
2
3 const Loading = () => (
4 <svg
5 version="1.1"
6 className="loading"
7 xmlns="http://www.w3.org/2000/svg"
8 x="0px"
9 y="0px"
10 width="40px"
11 height="40px"
12 viewBox="0 0 40 40"
13 enableBackground="new 0 0 40 40">
14 <path
15 opacity="1.0"
16 fill="#eee"
17 d="M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,
18 14.946,14.946s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,
19 5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634c0-6.425,
20 5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,
21 26.541,26.626,31.749,20.201,31.749z"/>
22 <path
23 fill="#da5347"
24 d="M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0
25 C22.32,8.481,24.301,9.057,26.013,10.047z">
26 </path>
27 </svg>
28 );
29
30 export default Loading;
31
imports/ui/components/document.js
1 import React from 'react'; File was deleted
2 import { Row, Col, ListGroupItem, FormControl, Button } from 'react-bootstrap';
3 import { Bert } from 'meteor/themeteorchef:bert';
4 import { updateDocument, removeDocument } from '../../api/documents/methods.js';
5
6 const handleUpdateDocument = (documentId, event) => {
7 const title = event.target.value.trim();
8 if (title !== '' && event.keyCode === 13) {
9 updateDocument.call({
10 _id: documentId,
11 update: { title },
12 }, (error) => {
13 if (error) {
14 Bert.alert(error.reason, 'danger');
15 } else {
16 Bert.alert('Document updated!', 'success');
17 }
18 });
19 }
20 };
21
22 const handleRemoveDocument = (documentId, event) => {
23 event.preventDefault();
24 // this should be replaced with a styled solution so for now we will
25 // disable the eslint `no-alert`
26 // eslint-disable-next-line no-alert
27 if (confirm('Are you sure? This is permanent.')) {
28 removeDocument.call({
29 _id: documentId,
30 }, (error) => {
31 if (error) {
32 Bert.alert(error.reason, 'danger');
33 } else {
34 Bert.alert('Document removed!', 'success');
35 }
36 });
37 }
38 };
39
40 const Document = ({ document }) => (
41 <ListGroupItem key={ document._id }>
42 <Row>
43 <Col xs={ 8 } sm={ 10 }>
44 <FormControl
45 type="text"
46 defaultValue={ document.title }
47 onKeyUp={ handleUpdateDocument.bind(this, document._id) }
48 />
49 </Col>
50 <Col xs={ 4 } sm={ 2 }>
51 <Button
52 bsStyle="danger"
53 className="btn-block"
54 onClick={ handleRemoveDocument.bind(this, document._id) }>
55 Remove
56 </Button>
57 </Col>
58 </Row>
59 </ListGroupItem>
60 );
61
62 Document.propTypes = {
63 document: React.PropTypes.object,
64 };
65
66 export default Document;
67 1 import React from 'react';
imports/ui/components/loading.js
1 import React from 'react'; File was deleted
2
3 const Loading = () => (
4 <svg
5 version="1.1"
6 className="loading"
7 xmlns="http://www.w3.org/2000/svg"
8 x="0px"
9 y="0px"
10 width="40px"
11 height="40px"
12 viewBox="0 0 40 40"
13 enableBackground="new 0 0 40 40">
14 <path
15 opacity="1.0"
16 fill="#eee"
17 d="M20.201,5.169c-8.254,0-14.946,6.692-14.946,14.946c0,8.255,6.692,14.946,
18 14.946,14.946s14.946-6.691,14.946-14.946C35.146,11.861,28.455,5.169,20.201,
19 5.169z M20.201,31.749c-6.425,0-11.634-5.208-11.634-11.634c0-6.425,
20 5.209-11.634,11.634-11.634c6.425,0,11.633,5.209,11.633,11.634C31.834,
21 26.541,26.626,31.749,20.201,31.749z"/>
22 <path
23 fill="#da5347"
24 d="M26.013,10.047l1.654-2.866c-2.198-1.272-4.743-2.012-7.466-2.012h0v3.312h0
25 C22.32,8.481,24.301,9.057,26.013,10.047z">
26 </path>
27 </svg>
28 );
29
30 export default Loading;
31 1 import React from 'react';
imports/ui/layouts/App.js
File was created 1 import React from 'react';
2 import { Grid } from 'react-bootstrap';
3 import AppNavigation from '../containers/AppNavigation.js';
4
5 const App = ({ children }) => (
6 <div>
7 <AppNavigation />
8 <Grid>
9 { children }
10 </Grid>
11 </div>
12 );
13
14 App.propTypes = {
15 children: React.PropTypes.node,
16 };
17
18 export default App;
19
imports/ui/layouts/app.js
1 import React from 'react'; File was deleted
2 import { Grid } from 'react-bootstrap';
3 import AppNavigation from '../containers/AppNavigation.js';
4
5 const App = ({ children }) => (
6 <div>
7 <AppNavigation />
8 <Grid>
9 { children }
10 </Grid>
11 </div>
12 );
13
14 App.propTypes = {
15 children: React.PropTypes.node,
16 };
17
18 export default App;
19 1 import React from 'react';
imports/ui/pages/Index.js
File was created 1 import React from 'react';
2 import { Jumbotron } from 'react-bootstrap';
3
4 const Index = () => (
5 <Jumbotron className="text-center">
6 <h2>Base</h2>
7 <p>A starting point for Meteor applications.</p>
8 <p><a className="btn btn-success" href="https://themeteorchef.com/base" role="button">Read the Documentation</a></p>
9 <p style={ { fontSize: '16px', color: '#aaa' } }>Currently at v4.8.0</p>
10 </Jumbotron>
11 );
12
13 export default Index;
14
imports/ui/pages/Login.js
File was created 1 import React from 'react';
2 import { Link } from 'react-router';
3 import { Row, Col, FormGroup, ControlLabel, FormControl, Button } from 'react-bootstrap';
4 import handleLogin from '../../modules/login';
5
6 export default class Login extends React.Component {
7 componentDidMount() {
8 handleLogin({ component: this });
9 }
10
11 handleSubmit(event) {
12 event.preventDefault();
13 }
14
15 render() {
16 return (<Row>
17 <Col xs={ 12 } sm={ 6 } md={ 4 }>
18 <h4 className="page-header">Login</h4>
19 <form ref="login" className="login" onSubmit={ this.handleSubmit }>
20 <FormGroup>
21 <ControlLabel>Email Address</ControlLabel>
22 <FormControl
23 type="email"
24 ref="emailAddress"
25 name="emailAddress"
26 placeholder="Email Address"
27 />
28 </FormGroup>
29 <FormGroup>
30 <ControlLabel>
31 <span className="pull-left">Password</span>
32 <Link className="pull-right" to="/recover-password">Forgot Password?</Link>
33 </ControlLabel>
34 <FormControl
35 type="password"
36 ref="password"
37 name="password"
38 placeholder="Password"
39 />
40 </FormGroup>
41 <Button type="submit" bsStyle="success">Login</Button>
42 </form>
43 </Col>
44 </Row>);
45 }
46 }
47
imports/ui/pages/Signup.js
File was created 1 import React from 'react';
2 import { Link } from 'react-router';
3 import { Row, Col, FormGroup, ControlLabel, FormControl, Button } from 'react-bootstrap';
4 import handleSignup from '../../modules/signup';
5
6 export default class Signup extends React.Component {
7 componentDidMount() {
8 handleSignup({ component: this });
9 }
10
11 handleSubmit(event) {
12 event.preventDefault();
13 }
14
15 render() {
16 return (<Row>
17 <Col xs={ 12 } sm={ 6 } md={ 4 }>
18 <h4 className="page-header">Sign Up</h4>
19 <form ref="signup" className="signup" onSubmit={ this.handleSubmit }>
20 <Row>
21 <Col xs={ 6 } sm={ 6 }>
22 <FormGroup>
23 <ControlLabel>First Name</ControlLabel>
24 <FormControl
25 type="text"
26 ref="firstName"
27 name="firstName"
28 placeholder="First Name"
29 />
30 </FormGroup>
31 </Col>
32 <Col xs={ 6 } sm={ 6 }>
33 <FormGroup>
34 <ControlLabel>Last Name</ControlLabel>
35 <FormControl
36 type="text"
37 ref="lastName"
38 name="lastName"
39 placeholder="Last Name"
40 />
41 </FormGroup>
42 </Col>
43 </Row>
44 <FormGroup>
45 <ControlLabel>Email Address</ControlLabel>
46 <FormControl
47 type="text"
48 ref="emailAddress"
49 name="emailAddress"
50 placeholder="Email Address"
51 />
52 </FormGroup>
53 <FormGroup>
54 <ControlLabel>Password</ControlLabel>
55 <FormControl
56 type="password"
57 ref="password"
58 name="password"
59 placeholder="Password"
60 />
61 </FormGroup>
62 <Button type="submit" bsStyle="success">Sign Up</Button>
63 </form>
64 <p>Already have an account? <Link to="/login">Log In</Link>.</p>
65 </Col>
66 </Row>);
67 }
68 }
69
imports/ui/pages/index.js
1 import React from 'react'; File was deleted
2 import { Jumbotron } from 'react-bootstrap';
3
4 const Index = () => (
5 <Jumbotron className="text-center">
6 <h2>Base</h2>
7 <p>A starting point for Meteor applications.</p>
8 <p><a className="btn btn-success" href="https://themeteorchef.com/base" role="button">Read the Documentation</a></p>
9 <p style={ { fontSize: '16px', color: '#aaa' } }>Currently at v4.8.0</p>
10 </Jumbotron>
11 );
12
13 export default Index;
14 1 import React from 'react';
imports/ui/pages/login.js
1 import React from 'react'; File was deleted
2 import { Link } from 'react-router';
3 import { Row, Col, FormGroup, ControlLabel, FormControl, Button } from 'react-bootstrap';
4 import handleLogin from '../../modules/login';
5
6 export default class Login extends React.Component {
7 componentDidMount() {
8 handleLogin({ component: this });
9 }
10
11 handleSubmit(event) {
12 event.preventDefault();
13 }
14
15 render() {
16 return (<Row>
17 <Col xs={ 12 } sm={ 6 } md={ 4 }>
18 <h4 className="page-header">Login</h4>
19 <form ref="login" className="login" onSubmit={ this.handleSubmit }>
20 <FormGroup>
21 <ControlLabel>Email Address</ControlLabel>
22 <FormControl
23 type="email"
24 ref="emailAddress"
25 name="emailAddress"
26 placeholder="Email Address"
27 />
28 </FormGroup>
29 <FormGroup>
30 <ControlLabel>
31 <span className="pull-left">Password</span>
32 <Link className="pull-right" to="/recover-password">Forgot Password?</Link>
33 </ControlLabel>
34 <FormControl
35 type="password"
36 ref="password"
37 name="password"
38 placeholder="Password"
39 />
40 </FormGroup>
41 <Button type="submit" bsStyle="success">Login</Button>
42 </form>
43 </Col>
44 </Row>);
45 }
46 }
47 1 import React from 'react';
imports/ui/pages/signup.js
1 import React from 'react'; File was deleted
2 import { Link } from 'react-router';
3 import { Row, Col, FormGroup, ControlLabel, FormControl, Button } from 'react-bootstrap';
4 import handleSignup from '../../modules/signup';
5
6 export default class Signup extends React.Component {
7 componentDidMount() {
8 handleSignup({ component: this });
9 }
10
11 handleSubmit(event) {
12 event.preventDefault();
13 }
14
15 render() {
16 return (<Row>
17 <Col xs={ 12 } sm={ 6 } md={ 4 }>
18 <h4 className="page-header">Sign Up</h4>
19 <form ref="signup" className="signup" onSubmit={ this.handleSubmit }>
20 <Row>
21 <Col xs={ 6 } sm={ 6 }>
22 <FormGroup>
23 <ControlLabel>First Name</ControlLabel>
24 <FormControl
25 type="text"
26 ref="firstName"
27 name="firstName"
28 placeholder="First Name"
29 />
30 </FormGroup>
31 </Col>
32 <Col xs={ 6 } sm={ 6 }>
33 <FormGroup>
34 <ControlLabel>Last Name</ControlLabel>
35 <FormControl
36 type="text"
37 ref="lastName"
38 name="lastName"
39 placeholder="Last Name"
40 />
41 </FormGroup>
42 </Col>
43 </Row>
44 <FormGroup>
45 <ControlLabel>Email Address</ControlLabel>
46 <FormControl
47 type="text"
48 ref="emailAddress"
49 name="emailAddress"
50 placeholder="Email Address"
51 />
52 </FormGroup>
53 <FormGroup>
54 <ControlLabel>Password</ControlLabel>
55 <FormControl
56 type="password"
57 ref="password"
58 name="password"
59 placeholder="Password"
60 />
61 </FormGroup>
62 <Button type="submit" bsStyle="success">Sign Up</Button>
63 </form>
64 <p>Already have an account? <Link to="/login">Log In</Link>.</p>
65 </Col>
66 </Row>);
67 }
68 }
69 1 import React from 'react';