-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
0 parents
commit cdc15f0
Showing
48 changed files
with
1,100 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
{ | ||
"presets": ["es2015", "react"] | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
node_modules | ||
settings-staging.json | ||
settings-production.json |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# This file contains information which helps Meteor properly upgrade your | ||
# app when you run 'meteor update'. You should check it into version control | ||
# with your project. | ||
|
||
notices-for-0.9.0 | ||
notices-for-0.9.1 | ||
0.9.4-platform-file | ||
notices-for-facebook-graph-api-2 | ||
1.2.0-standard-minifiers-package | ||
1.2.0-meteor-platform-split | ||
1.2.0-cordova-changes | ||
1.2.0-breaking-changes | ||
1.3.0-split-minifiers-package | ||
1.4.0-remove-old-dev-bundle-link | ||
1.4.1-add-shell-server-package | ||
1.4.3-split-account-service-packages |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
local |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
# This file contains a token that is unique to your project. | ||
# Check it into your repository along with the rest of this directory. | ||
# It can be used for purposes such as: | ||
# - ensuring you don't accidentally deploy one app on top of another | ||
# - providing package authors with aggregated statistics | ||
|
||
16be20efyo0qb53r01o |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,32 @@ | ||
# Meteor packages used by this project, one per line. | ||
# Check this file (and the other files in this directory) into your repository. | ||
# | ||
# 'meteor add' and 'meteor remove' will edit this file for you, | ||
# but you can also edit it by hand. | ||
|
||
[email protected] # Packages every Meteor app needs to have | ||
[email protected] # Packages for a great mobile UX | ||
[email protected] # The database Meteor supports right now | ||
[email protected] # Compile .html files into Meteor Blaze views | ||
[email protected] # Reactive variable for tracker | ||
[email protected] # Meteor's client-side reactive programming library | ||
|
||
[email protected] # CSS minifier run for production mode | ||
[email protected] # JS minifier run for production mode | ||
[email protected] # ECMAScript 5 compatibility for older browsers. | ||
[email protected] # Enable ECMAScript2015+ syntax in app code | ||
[email protected] # Server-side component of the `meteor shell` command | ||
|
||
react-meteor-data | ||
alanning:roles | ||
fourseven:scss | ||
twbs:bootstrap | ||
accounts-base | ||
accounts-password | ||
service-configuration | ||
accounts-facebook | ||
accounts-github | ||
accounts-google | ||
themeteorchef:bert | ||
fortawesome:fontawesome | ||
aldeed:collection2-core |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
server | ||
browser |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
[email protected] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,13 @@ | ||
<head> | ||
<meta charset="utf-8"> | ||
<title>Pup</title> | ||
<meta name="description" content="A description for the application."> | ||
<meta name="viewport" content="initial-scale=1, minimal-ui, maximum-scale=1, minimum-scale=1" /> | ||
<link href="https://maxcdn.bootstrapcdn.com/font-awesome/4.7.0/css/font-awesome.min.css" rel="stylesheet" /> | ||
<link rel="shortcut icon" type="image/png" href="/favicon.png?v1" sizes="16x16 32x32 64x64"> | ||
<link rel="apple-touch-icon" sizes="120x120" href="/apple-touch-icon-precomposed.png"> | ||
</head> | ||
|
||
<body> | ||
<div id="react-root"></div> | ||
</body> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
import '../imports/startup/client'; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
/* eslint-disable consistent-return */ | ||
|
||
import { Mongo } from 'meteor/mongo'; | ||
import SimpleSchema from 'simpl-schema'; | ||
|
||
const Documents = new Mongo.Collection('Documents'); | ||
|
||
Documents.allow({ | ||
insert: () => false, | ||
update: () => false, | ||
remove: () => false, | ||
}); | ||
|
||
Documents.deny({ | ||
insert: () => true, | ||
update: () => true, | ||
remove: () => true, | ||
}); | ||
|
||
Documents.schema = new SimpleSchema({ | ||
owner: { | ||
type: String, | ||
label: 'The ID of the user this document belongs to.', | ||
}, | ||
createdAt: { | ||
type: String, | ||
label: 'The date this document was created.', | ||
autoValue() { | ||
if (this.isInsert) return (new Date()).toISOString(); | ||
}, | ||
}, | ||
updatedAt: { | ||
type: String, | ||
label: 'The date this document was last updated.', | ||
autoValue() { | ||
if (this.isInsert || this.isUpdate) return (new Date()).toISOString(); | ||
}, | ||
}, | ||
title: { | ||
type: String, | ||
label: 'The title of the document.', | ||
}, | ||
body: { | ||
type: String, | ||
label: 'The body of the document.', | ||
}, | ||
}); | ||
|
||
Documents.attachSchema(Documents.schema); | ||
|
||
export default Documents; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
import $ from 'jquery'; | ||
import 'jquery-validation'; | ||
|
||
export default (form, options) => $(form).validate(options); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
import React from 'react'; | ||
import { render } from 'react-dom'; | ||
import { Meteor } from 'meteor/meteor'; | ||
import App from '../../ui/layouts/App/App'; | ||
|
||
import '../../ui/stylesheets/app.scss'; | ||
|
||
Meteor.startup(() => render(<App />, document.getElementById('react-root'))); |
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
import React, { PropTypes } from 'react'; | ||
import { Route, Redirect } from 'react-router-dom'; | ||
|
||
const Authenticated = ({ loggingIn, authenticated, component, ...rest }) => ( | ||
<Route | ||
{...rest} | ||
render={(props) => { | ||
if (loggingIn) return <div />; | ||
return authenticated ? | ||
(React.createElement(component, { ...props, loggingIn, authenticated })) : | ||
(<Redirect to="/login" />); | ||
}} | ||
/> | ||
); | ||
|
||
Authenticated.propTypes = { | ||
loggingIn: PropTypes.bool.isRequired, | ||
authenticated: PropTypes.bool.isRequired, | ||
component: PropTypes.func.isRequired, | ||
}; | ||
|
||
export default Authenticated; |
30 changes: 30 additions & 0 deletions
30
imports/ui/components/AuthenticatedNavigation/AuthenticatedNavigation.js
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { LinkContainer } from 'react-router-bootstrap'; | ||
import { Nav, NavItem, NavDropdown, MenuItem } from 'react-bootstrap'; | ||
import { Meteor } from 'meteor/meteor'; | ||
|
||
const AuthenticatedNavigation = ({ name }) => ( | ||
<div> | ||
<Nav> | ||
<LinkContainer to="/documents"> | ||
<NavItem eventKey={1} href="/documents">Documents</NavItem> | ||
</LinkContainer> | ||
</Nav> | ||
<Nav pullRight> | ||
<NavDropdown eventKey={2} title={name} id="user-nav-dropdown"> | ||
<LinkContainer to="/profile"> | ||
<NavItem eventKey={2.1} href="/profile">Profile</NavItem> | ||
</LinkContainer> | ||
<MenuItem divider /> | ||
<MenuItem eventKey={2.2} onClick={() => Meteor.logout()}>Logout</MenuItem> | ||
</NavDropdown> | ||
</Nav> | ||
</div> | ||
); | ||
|
||
AuthenticatedNavigation.propTypes = { | ||
name: PropTypes.string.isRequired, | ||
}; | ||
|
||
export default AuthenticatedNavigation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
|
||
import './InputHint.scss'; | ||
|
||
const InputHint = ({ children }) => ( | ||
<div className="InputHint"> | ||
{children} | ||
</div> | ||
); | ||
|
||
InputHint.propTypes = { | ||
children: PropTypes.node.isRequired, | ||
}; | ||
|
||
export default InputHint; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
@import '../../stylesheets/colors'; | ||
|
||
.InputHint { | ||
display: block; | ||
margin-top: 8px; | ||
font-style: italic; | ||
color: $gray-light; | ||
font-size: 13px; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
import React from 'react'; | ||
import PropTypes from 'prop-types'; | ||
import { Navbar } from 'react-bootstrap'; | ||
import { Link } from 'react-router-dom'; | ||
import PublicNavigation from '../PublicNavigation/PublicNavigation'; | ||
import AuthenticatedNavigation from '../AuthenticatedNavigation/AuthenticatedNavigation'; | ||
|
||
import './Navigation.scss'; | ||
|
||
const Navigation = ({ authenticated, name }) => ( | ||
<Navbar> | ||
<Navbar.Header> | ||
<Navbar.Brand> | ||
<Link to="/">Pup</Link> | ||
</Navbar.Brand> | ||
<Navbar.Toggle /> | ||
</Navbar.Header> | ||
<Navbar.Collapse> | ||
{!authenticated ? <PublicNavigation /> : <AuthenticatedNavigation name={name} />} | ||
</Navbar.Collapse> | ||
</Navbar> | ||
); | ||
|
||
Navigation.defaultProps = { | ||
name: PropTypes.string, | ||
}; | ||
|
||
Navigation.propTypes = { | ||
authenticated: PropTypes.bool.isRequired, | ||
name: PropTypes.string, | ||
}; | ||
|
||
export default Navigation; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
.navbar { | ||
border-radius: 0; | ||
border-left: none; | ||
border-right: none; | ||
border-top: none; | ||
} |
Oops, something went wrong.