-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from ReputationVIP/team-settings
Add TeamSettings React component
- Loading branch information
Showing
10 changed files
with
87 additions
and
43 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
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 |
---|---|---|
|
@@ -51,6 +51,7 @@ [email protected] | |
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
[email protected] | ||
|
@@ -61,6 +62,7 @@ [email protected] | |
[email protected] | ||
[email protected] | ||
[email protected] | ||
tmeasday:[email protected] | ||
[email protected] | ||
[email protected] | ||
[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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,25 +1,7 @@ | ||
<head> | ||
<title>simple</title> | ||
<title>MoodTracker.io</title> | ||
</head> | ||
|
||
<body> | ||
<h1>Welcome to Meteor!</h1> | ||
|
||
{{> hello}} | ||
{{> info}} | ||
<div id="render-target"></div> | ||
</body> | ||
|
||
<template name="hello"> | ||
<button>Click Me</button> | ||
<p>You've pressed the button {{counter}} times.</p> | ||
</template> | ||
|
||
<template name="info"> | ||
<h2>Learn Meteor!</h2> | ||
<ul> | ||
<li><a href="https://www.meteor.com/try">Do the Tutorial</a></li> | ||
<li><a href="http://guide.meteor.com">Follow the Guide</a></li> | ||
<li><a href="https://docs.meteor.com">Read the Docs</a></li> | ||
<li><a href="https://forums.meteor.com">Discussions</a></li> | ||
</ul> | ||
</template> |
This file was deleted.
Oops, something went wrong.
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 React from 'react'; | ||
import { Meteor } from 'meteor/meteor'; | ||
import { render } from 'react-dom'; | ||
|
||
import App from '../imports/ui/App.jsx'; | ||
|
||
Meteor.startup(() => { | ||
render(<App />, document.getElementById('render-target')); | ||
}); |
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 @@ | ||
import { Mongo } from 'meteor/mongo'; | ||
|
||
export const Teams = new Mongo.Collection('teams'); |
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,37 @@ | ||
import React, { Component, PropTypes } from 'react'; | ||
import TeamSettings from './TeamSettings'; | ||
import { createContainer } from 'meteor/react-meteor-data'; | ||
|
||
import { Teams } from '../api/teams.js'; | ||
|
||
// App component - represents the whole app | ||
class App extends Component { | ||
|
||
render() { | ||
return ( | ||
<div className="container"> | ||
<header> | ||
<h1>MoodTracker</h1> | ||
|
||
<TeamSettings team={this.props.team} /> | ||
</header> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
App.propTypes = { | ||
team: PropTypes.object.isRequired | ||
}; | ||
|
||
export default createContainer(() => { | ||
if (!Teams.findOne({})) { | ||
Teams.insert({ | ||
name: 'My Team' | ||
}); | ||
} | ||
|
||
return { | ||
team: Teams.findOne({}) | ||
}; | ||
}, App); |
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,28 @@ | ||
import React, { Component, PropTypes } from 'react'; | ||
|
||
export default class TeamParameters extends Component { | ||
render() { | ||
return ( | ||
<div> | ||
<h2>Configure your team settings ({this.props.team.name})</h2> | ||
<form> | ||
<div class="form-row"> | ||
<label for="teamName">Team name</label> | ||
<input id="teamName" type="text" /> | ||
</div> | ||
|
||
<div class="form-row"> | ||
<label for="notificationHour">When will Slack asks your team its daily mood?</label> | ||
<input id="notificationHour" type="text" /> | ||
</div> | ||
|
||
<button type="submit">Update Settings</button> | ||
</form> | ||
</div> | ||
); | ||
} | ||
} | ||
|
||
TeamParameters.propTypes = { | ||
team: PropTypes.object.isRequired | ||
}; |
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