Added team name

This commit is contained in:
Chris Blanchard 2015-08-05 01:06:09 +01:00
parent 708ace40d9
commit e49f4ffa77
3 changed files with 25 additions and 26 deletions

View File

@ -509,16 +509,15 @@ var Gatherers = React.createClass({
var online= (<div className="dot online"></div>);
var division = (<span className="label label-primary">{gatherer.user.ability.division}</span>);
var action;
var lifeform = (
gatherer.user.ability.lifeforms.map(function (lifeform) {
return (<span className="label label-default"
key={[lifeform, gatherer.id].join("-")}>{lifeform}</span>);
})
);
var team = (<span className="label label-primary">{gatherer.user.team.name}</span>);
if (self.props.gather.state === 'gathering') {
action = (
gatherer.user.ability.lifeforms.map(function (lifeform) {
return (<span className="label label-default"
key={[lifeform, gatherer.id].join("-")}>{lifeform}</span>);
})
);
}
var action;
if (self.props.gather.state === "election") {
var votes = self.props.gather.gatherers.reduce(function (acc, voter) {
@ -543,8 +542,8 @@ var Gatherers = React.createClass({
return (
<tr key={gatherer.user.id}>
<td className="col-md-6">{online} {gatherer.user.username}</td>
<td className="col-md-3">{division}&nbsp;</td>
<td className="col-md-3">{online} {gatherer.user.username}</td>
<td className="col-md-6">{lifeform} {division} {team}</td>
<td className="col-md-3 text-right">{action}&nbsp;</td>
</tr>
);

View File

@ -15,10 +15,11 @@
this.time_zone = user['time_zone'];
this.avatar = client.baseUrl + user['avatar'];
this.admin = user['admin'];
// this.steam = {
// url: user['steam']['url'],
// nickname: user['steam']['nickname']
// };
this.team = user['team'];
this.steam = {
url: user['steam']['url'],
nickname: user['steam']['nickname']
};
this.ability = {
division: "Div " + (Math.floor(Math.random() * 4) + 1),
lifeforms: [["Lerk", "Onos", "Fade"][Math.floor(Math.random() * 3)]],

View File

@ -509,16 +509,15 @@ var Gatherers = React.createClass({displayName: "Gatherers",
var online= (React.createElement("div", {className: "dot online"}));
var division = (React.createElement("span", {className: "label label-primary"}, gatherer.user.ability.division));
var action;
var lifeform = (
gatherer.user.ability.lifeforms.map(function (lifeform) {
return (React.createElement("span", {className: "label label-default",
key: [lifeform, gatherer.id].join("-")}, lifeform));
})
);
var team = (React.createElement("span", {className: "label label-primary"}, gatherer.user.team.name));
if (self.props.gather.state === 'gathering') {
action = (
gatherer.user.ability.lifeforms.map(function (lifeform) {
return (React.createElement("span", {className: "label label-default",
key: [lifeform, gatherer.id].join("-")}, lifeform));
})
);
}
var action;
if (self.props.gather.state === "election") {
var votes = self.props.gather.gatherers.reduce(function (acc, voter) {
@ -543,8 +542,8 @@ var Gatherers = React.createClass({displayName: "Gatherers",
return (
React.createElement("tr", {key: gatherer.user.id},
React.createElement("td", {className: "col-md-6"}, online, " ", gatherer.user.username),
React.createElement("td", {className: "col-md-3"}, division, " "),
React.createElement("td", {className: "col-md-3"}, online, " ", gatherer.user.username),
React.createElement("td", {className: "col-md-6"}, lifeform, " ", division, " ", team),
React.createElement("td", {className: "col-md-3 text-right"}, action, " ")
)
);