mirror of https://github.com/ENSL/ensl_gathers.git
Added team name
This commit is contained in:
parent
708ace40d9
commit
e49f4ffa77
|
@ -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} </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} </td>
|
||||
</tr>
|
||||
);
|
||||
|
|
|
@ -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)]],
|
||||
|
|
|
@ -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, " ")
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Reference in New Issue