Tweak a couple things on IIDX frontend.
This commit is contained in:
parent
dd9178a88a
commit
8a867ac988
@ -192,6 +192,10 @@ var top_scores = React.createClass({
|
||||
},
|
||||
{
|
||||
name: 'Combo',
|
||||
sort: function(a, b) {
|
||||
return a.combo - b.combo;
|
||||
},
|
||||
reverse: true,
|
||||
render: function(topscore) { return topscore.combo > 0 ? topscore.combo : ''; },
|
||||
},
|
||||
{
|
||||
|
@ -102,10 +102,10 @@ var profile_view = React.createClass({
|
||||
</div>
|
||||
<div className="section">
|
||||
<LabelledSection label="User ID">{player.extid}</LabelledSection>
|
||||
<LabelledSection label="Register Time">
|
||||
<LabelledSection label="Profile Created">
|
||||
<Timestamp timestamp={player.first_play_time}/>
|
||||
</LabelledSection>
|
||||
<LabelledSection label="Last Play Time">
|
||||
<LabelledSection label="Last Played">
|
||||
<Timestamp timestamp={player.last_play_time}/>
|
||||
</LabelledSection>
|
||||
</div>
|
||||
|
@ -219,7 +219,9 @@ var network_records = React.createClass({
|
||||
|
||||
return (
|
||||
<tr key={songid.toString()}>
|
||||
<td className="subheader">{ this.state.versions[songid] }</td>
|
||||
<td className="subheader">{
|
||||
!paginate ? this.state.versions[songid] : "Song / Artist / Difficulties"
|
||||
}</td>
|
||||
<td className="subheader">SPN</td>
|
||||
<td className="subheader">SPH</td>
|
||||
<td className="subheader">SPA</td>
|
||||
@ -469,130 +471,132 @@ var network_records = React.createClass({
|
||||
|
||||
renderBySongIDList: function(songids, showplays) {
|
||||
return (
|
||||
<table className="list records">
|
||||
<thead>
|
||||
<tr>
|
||||
<th className="subheader">Song</th>
|
||||
<th className="subheader">SPN</th>
|
||||
<th className="subheader">SPH</th>
|
||||
<th className="subheader">SPA</th>
|
||||
<th className="subheader">DPN</th>
|
||||
<th className="subheader">DPH</th>
|
||||
<th className="subheader">DPA</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{songids.map(function(songid, index) {
|
||||
if (index < this.state.offset || index >= this.state.offset + this.state.limit) {
|
||||
return null;
|
||||
}
|
||||
|
||||
var records = this.state.records[songid];
|
||||
if (!records) {
|
||||
records = {};
|
||||
}
|
||||
|
||||
var difficulties = this.state.songs[songid].difficulties;
|
||||
var plays = this.getPlays(records);
|
||||
return (
|
||||
<tr key={songid.toString()}>
|
||||
<td className="center">
|
||||
<div>
|
||||
<a href={Link.get('individual_score', songid)}>
|
||||
<div className="songname">{ this.state.songs[songid].name }</div>
|
||||
<div className="songartist">{ this.state.songs[songid].artist }</div>
|
||||
<div className="songgenre">{ this.state.songs[songid].genre }</div>
|
||||
</a>
|
||||
</div>
|
||||
<div className="songdifficulties">
|
||||
{this.renderDifficulty(songid, 0)}
|
||||
<span> / </span>
|
||||
{this.renderDifficulty(songid, 1)}
|
||||
<span> / </span>
|
||||
{this.renderDifficulty(songid, 2)}
|
||||
<span> / </span>
|
||||
{this.renderDifficulty(songid, 3)}
|
||||
<span> / </span>
|
||||
{this.renderDifficulty(songid, 4)}
|
||||
<span> / </span>
|
||||
{this.renderDifficulty(songid, 5)}
|
||||
</div>
|
||||
{ showplays ? <div className="songplays">#{index + 1} - {plays}{plays == 1 ? ' play' : ' plays'}</div> : null }
|
||||
</td>
|
||||
<td className={difficulties[0] > 0 ? "" : "nochart"}>
|
||||
<HighScore
|
||||
players={this.state.players}
|
||||
songid={songid}
|
||||
chart={0}
|
||||
score={records[0]}
|
||||
/>
|
||||
</td>
|
||||
<td className={difficulties[1] > 0 ? "" : "nochart"}>
|
||||
<HighScore
|
||||
players={this.state.players}
|
||||
songid={songid}
|
||||
chart={1}
|
||||
score={records[1]}
|
||||
/>
|
||||
</td>
|
||||
<td className={difficulties[2] > 0 ? "" : "nochart"}>
|
||||
<HighScore
|
||||
players={this.state.players}
|
||||
songid={songid}
|
||||
chart={2}
|
||||
score={records[2]}
|
||||
/>
|
||||
</td>
|
||||
<td className={difficulties[3] > 0 ? "" : "nochart"}>
|
||||
<HighScore
|
||||
players={this.state.players}
|
||||
songid={songid}
|
||||
chart={3}
|
||||
score={records[3]}
|
||||
/>
|
||||
</td>
|
||||
<td className={difficulties[4] > 0 ? "" : "nochart"}>
|
||||
<HighScore
|
||||
players={this.state.players}
|
||||
songid={songid}
|
||||
chart={4}
|
||||
score={records[4]}
|
||||
/>
|
||||
</td>
|
||||
<td className={difficulties[5] > 0 ? "" : "nochart"}>
|
||||
<HighScore
|
||||
players={this.state.players}
|
||||
songid={songid}
|
||||
chart={5}
|
||||
score={records[5]}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
}.bind(this))}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colSpan={7}>
|
||||
{ this.state.offset > 0 ?
|
||||
<Prev onClick={function(event) {
|
||||
var page = this.state.offset - this.state.limit;
|
||||
if (page < 0) { page = 0; }
|
||||
this.setState({offset: page});
|
||||
}.bind(this)}/> : null
|
||||
<div className="section">
|
||||
<table className="list records">
|
||||
<thead>
|
||||
<tr>
|
||||
<th className="subheader">Song / Artist / Difficulties</th>
|
||||
<th className="subheader">SPN</th>
|
||||
<th className="subheader">SPH</th>
|
||||
<th className="subheader">SPA</th>
|
||||
<th className="subheader">DPN</th>
|
||||
<th className="subheader">DPH</th>
|
||||
<th className="subheader">DPA</th>
|
||||
</tr>
|
||||
</thead>
|
||||
<tbody>
|
||||
{songids.map(function(songid, index) {
|
||||
if (index < this.state.offset || index >= this.state.offset + this.state.limit) {
|
||||
return null;
|
||||
}
|
||||
{ (this.state.offset + this.state.limit) < songids.length ?
|
||||
<Next style={ {float: 'right'} } onClick={function(event) {
|
||||
var page = this.state.offset + this.state.limit;
|
||||
if (page >= songids.length) { return }
|
||||
this.setState({offset: page});
|
||||
}.bind(this)}/> :
|
||||
null
|
||||
|
||||
var records = this.state.records[songid];
|
||||
if (!records) {
|
||||
records = {};
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
|
||||
var difficulties = this.state.songs[songid].difficulties;
|
||||
var plays = this.getPlays(records);
|
||||
return (
|
||||
<tr key={songid.toString()} className="header">
|
||||
<td className="center">
|
||||
<div>
|
||||
<a href={Link.get('individual_score', songid)}>
|
||||
<div className="songname">{ this.state.songs[songid].name }</div>
|
||||
<div className="songartist">{ this.state.songs[songid].artist }</div>
|
||||
<div className="songgenre">{ this.state.songs[songid].genre }</div>
|
||||
</a>
|
||||
</div>
|
||||
<div className="songdifficulties">
|
||||
{this.renderDifficulty(songid, 0)}
|
||||
<span> / </span>
|
||||
{this.renderDifficulty(songid, 1)}
|
||||
<span> / </span>
|
||||
{this.renderDifficulty(songid, 2)}
|
||||
<span> / </span>
|
||||
{this.renderDifficulty(songid, 3)}
|
||||
<span> / </span>
|
||||
{this.renderDifficulty(songid, 4)}
|
||||
<span> / </span>
|
||||
{this.renderDifficulty(songid, 5)}
|
||||
</div>
|
||||
{ showplays ? <div className="songplays">#{index + 1} - {plays}{plays == 1 ? ' play' : ' plays'}</div> : null }
|
||||
</td>
|
||||
<td className={difficulties[0] > 0 ? "" : "nochart"}>
|
||||
<HighScore
|
||||
players={this.state.players}
|
||||
songid={songid}
|
||||
chart={0}
|
||||
score={records[0]}
|
||||
/>
|
||||
</td>
|
||||
<td className={difficulties[1] > 0 ? "" : "nochart"}>
|
||||
<HighScore
|
||||
players={this.state.players}
|
||||
songid={songid}
|
||||
chart={1}
|
||||
score={records[1]}
|
||||
/>
|
||||
</td>
|
||||
<td className={difficulties[2] > 0 ? "" : "nochart"}>
|
||||
<HighScore
|
||||
players={this.state.players}
|
||||
songid={songid}
|
||||
chart={2}
|
||||
score={records[2]}
|
||||
/>
|
||||
</td>
|
||||
<td className={difficulties[3] > 0 ? "" : "nochart"}>
|
||||
<HighScore
|
||||
players={this.state.players}
|
||||
songid={songid}
|
||||
chart={3}
|
||||
score={records[3]}
|
||||
/>
|
||||
</td>
|
||||
<td className={difficulties[4] > 0 ? "" : "nochart"}>
|
||||
<HighScore
|
||||
players={this.state.players}
|
||||
songid={songid}
|
||||
chart={4}
|
||||
score={records[4]}
|
||||
/>
|
||||
</td>
|
||||
<td className={difficulties[5] > 0 ? "" : "nochart"}>
|
||||
<HighScore
|
||||
players={this.state.players}
|
||||
songid={songid}
|
||||
chart={5}
|
||||
score={records[5]}
|
||||
/>
|
||||
</td>
|
||||
</tr>
|
||||
);
|
||||
}.bind(this))}
|
||||
</tbody>
|
||||
<tfoot>
|
||||
<tr>
|
||||
<td colSpan={7}>
|
||||
{ this.state.offset > 0 ?
|
||||
<Prev onClick={function(event) {
|
||||
var page = this.state.offset - this.state.limit;
|
||||
if (page < 0) { page = 0; }
|
||||
this.setState({offset: page});
|
||||
}.bind(this)}/> : null
|
||||
}
|
||||
{ (this.state.offset + this.state.limit) < songids.length ?
|
||||
<Next style={ {float: 'right'} } onClick={function(event) {
|
||||
var page = this.state.offset + this.state.limit;
|
||||
if (page >= songids.length) { return }
|
||||
this.setState({offset: page});
|
||||
}.bind(this)}/> :
|
||||
null
|
||||
}
|
||||
</td>
|
||||
</tr>
|
||||
</tfoot>
|
||||
</table>
|
||||
</div>
|
||||
);
|
||||
},
|
||||
|
||||
|
@ -101,8 +101,8 @@ var network_scores = React.createClass({
|
||||
{ window.showdjnames ? <th>DJ Name</th> : null }
|
||||
{ window.showdjnames ? <th>Arcade</th> : null }
|
||||
<th>Timestamp</th>
|
||||
<th>Song</th>
|
||||
<th>Chart</th>
|
||||
<th>Song / Artist</th>
|
||||
<th>Difficulty</th>
|
||||
<th>Score</th>
|
||||
</tr>
|
||||
</thead>
|
||||
|
Loading…
x
Reference in New Issue
Block a user