mirror of
https://github.com/ENSL/ensl_gathers.git
synced 2025-01-19 16:11:01 +00:00
More cool stuff
This commit is contained in:
parent
9b7b1dcf11
commit
74a0468f09
3 changed files with 48 additions and 3 deletions
|
@ -196,6 +196,26 @@ var ChatMessage = React.createClass({
|
|||
}
|
||||
});
|
||||
|
||||
var CurrentUser = React.createClass({
|
||||
getDefaultProps: function () {
|
||||
return {
|
||||
username: "",
|
||||
avatar: ""
|
||||
}
|
||||
},
|
||||
componentDidMount: function () {
|
||||
|
||||
},
|
||||
render: function () {
|
||||
return (
|
||||
<a href="#">{this.props.user.username} <img src={this.props.user.avatar}
|
||||
alt="User Avatar"
|
||||
height="20"
|
||||
width="20" /></a>
|
||||
);
|
||||
}
|
||||
});
|
||||
|
||||
var MessageBar = React.createClass({
|
||||
sendMessage: function (content) {
|
||||
socket.emit("message:new", {
|
||||
|
@ -423,7 +443,7 @@ var Gatherers = React.createClass({
|
|||
commBadge = (<img src="/images/commander.png"
|
||||
alt="Commander"
|
||||
height="20"
|
||||
width="20" />)
|
||||
width="20" />);
|
||||
}
|
||||
|
||||
return (
|
||||
|
@ -474,6 +494,7 @@ function initialiseComponents () {
|
|||
React.render(<UserMenu />, document.getElementById('side-menu'));
|
||||
React.render(<Chatroom />, document.getElementById('chatroom'));
|
||||
React.render(<Gather />, document.getElementById('gathers'));
|
||||
React.render(<CurrentUser />, document.getElementById('currentuser'));
|
||||
};
|
||||
|
||||
initialiseComponents();
|
||||
|
|
File diff suppressed because one or more lines are too long
|
@ -56,6 +56,9 @@
|
|||
</li>
|
||||
</ul>
|
||||
</li>
|
||||
<li id="currentuser">
|
||||
|
||||
</li>
|
||||
</ul>
|
||||
|
||||
<div class="navbar-default sidebar" role="navigation">
|
||||
|
|
Loading…
Reference in a new issue