1
0
Fork 0

Don't use info description

This commit is contained in:
Gregory Eremin 2015-03-15 00:41:32 +07:00
parent ed49a23b94
commit a206266a24
2 changed files with 8 additions and 21 deletions

View File

@ -135,13 +135,12 @@ var Dashboard = React.createClass({
render: function(){ render: function(){
var p = this.getParams(), var p = this.getParams(),
infoImage, infoTitle, infoText, infoImage, infoTitle,
bcApi, bcItems, bcApi, bcItems,
sacApi, sacItems; sacApi, sacItems;
if (p.team) { if (p.team) {
infoTitle = p.team; infoTitle = p.team;
infoText = 'A '+ p.org +' team';
bcApi = '/api/stat/teams/top'; bcApi = '/api/stat/teams/top';
bcItems = ['repo', 'user'], bcItems = ['repo', 'user'],
sacApi = '/api/stat/teams/activity'; sacApi = '/api/stat/teams/activity';
@ -164,7 +163,6 @@ var Dashboard = React.createClass({
var info = Storage.get('org', p.org); var info = Storage.get('org', p.org);
infoImage = info.avatar_url; infoImage = info.avatar_url;
infoTitle = info.login; infoTitle = info.login;
infoText = info.descr;
bcApi = '/api/stat/orgs/top'; bcApi = '/api/stat/orgs/top';
bcItems = ['repo', 'team', 'user'], bcItems = ['repo', 'team', 'user'],
sacApi = '/api/stat/orgs/activity'; sacApi = '/api/stat/orgs/activity';
@ -173,7 +171,7 @@ var Dashboard = React.createClass({
return ( return (
<section className="content"> <section className="content">
<InfoBlock image={infoImage} title={infoTitle} text={infoText} /> <InfoBlock image={infoImage} title={infoTitle} />
<BarChart api={bcApi} params={this.getParams()} items={bcItems} /> <BarChart api={bcApi} params={this.getParams()} items={bcItems} />
<StackedAreaChart api={sacApi} params={this.getParams()} items={sacItems} /> <StackedAreaChart api={sacApi} params={this.getParams()} items={sacItems} />
</section> </section>
@ -204,7 +202,6 @@ var InfoBlock = React.createClass({
<div className={'img'+ (this.props.image ? '' : ' empty')} <div className={'img'+ (this.props.image ? '' : ' empty')}
style={{backgroundImage: "url("+ (this.props.image || '') +")"}} /> style={{backgroundImage: "url("+ (this.props.image || '') +")"}} />
<h1>{this.props.title}</h1> <h1>{this.props.title}</h1>
<p>{this.props.text}</p>
</div> </div>
) )
} }

View File

@ -73,37 +73,27 @@ section {
.info-block { .info-block {
width: 100%; width: 100%;
height: 100px; height: 50px;
margin-bottom: 20px; margin-bottom: 20px;
} }
.info-block .img { .info-block .img {
float: left; float: left;
width: 100px; width: 50px;
height: 100px; height: 50px;
background-color: #ddd;
background-position: center; background-position: center;
background-size: 100% auto; background-size: 100% auto;
margin-right: 20px; margin-right: 10px;
border-radius: 3px; border-radius: 3px;
} }
.info-block .img.empty {
background-color: #ddd;
}
.info-block h1 { .info-block h1 {
font-size: 32px; font-size: 32px;
line-height: 32px; line-height: 50px;
margin: 0; margin: 0;
font-weight: 400; font-weight: 400;
} }
.info-block p {
max-width: 100%;
margin-right: 20px;
white-space: nowrap;
overflow: hidden;
text-overflow: ellipsis;
}
.week-selector { .week-selector {
display: none; display: none;
position: absolute; position: absolute;