Fix torrent details

This commit is contained in:
John Furrow
2016-03-27 16:02:45 -07:00
parent 6f2a6cda79
commit cdedf60093
4 changed files with 108 additions and 100 deletions
@@ -57,6 +57,77 @@ $torrent-details--header--icon--default--fill: rgba(#4d6f87, 0.5);
height: auto !important;
}
&__heading {
color: $torrent-details--header--name--foreground;
font-size: 1.7em;
font-weight: 300;
}
&__sub-heading {
display: flex;
margin-bottom: $spacing-unit * 1/4;
&__secondary {
color: $torrent-details--header--tertiary--foreground;
display: flex;
flex: 1 0 auto;
&:first-child {
justify-content: flex-start;
}
&:last-child {
justify-content: flex-end;
}
}
&__tertiary {
flex: 0 0 auto;
margin-right: 1em;
.icon {
fill: $torrent-details--header--icon--default--fill;
height: 12px;
margin-right: 3px;
margin-top: -3px;
vertical-align: middle;
width: 12px;
}
.priority-meter {
display: inline-block;
margin-top: -1px;
margin-right: 6px;
vertical-align: middle;
&__wrapper {
margin-top: -3px;
padding: 0;
}
}
&--download {
color: $blue;
.icon {
fill: $blue;
}
}
&--upload {
color: $green;
.icon {
fill: $green;
}
}
&:last-child {
margin-right: 0;
}
}
}
&__header {
box-shadow: 0 1px 0 $torrent-details--header--border;
flex: 0 0 auto;
@@ -180,78 +251,12 @@ $torrent-details--header--icon--default--fill: rgba(#4d6f87, 0.5);
}
}
}
}
.torrent-details {
&__detail {
&__heading {
color: $torrent-details--header--name--foreground;
font-size: 1.7em;
font-weight: 300;
}
&__sub-heading {
display: flex;
margin-bottom: $spacing-unit * 1/4;
&__secondary {
color: $torrent-details--header--tertiary--foreground;
display: flex;
flex: 1 0 auto;
&:first-child {
justify-content: flex-start;
}
&:last-child {
justify-content: flex-end;
}
}
&__tertiary {
flex: 0 0 auto;
margin-right: 1em;
.icon {
fill: $torrent-details--header--icon--default--fill;
height: 12px;
margin-right: 3px;
margin-top: -3px;
vertical-align: middle;
width: 12px;
}
.priority-meter {
display: inline-block;
margin-top: -1px;
margin-right: 6px;
vertical-align: middle;
&__wrapper {
margin-top: -3px;
padding: 0;
}
}
&--download {
color: $blue;
.icon {
fill: $blue;
}
}
&--upload {
color: $green;
.icon {
fill: $green;
}
}
&:last-child {
margin-right: 0;
}
&__label {
margin-right: 0.5em;
opacity: 0.5;
}
}
}
+6 -3
View File
@@ -164,15 +164,18 @@ $torrent--background--error: #e95779;
}
&--secondary {
align-items: flex-end;
color: $torrent--secondary--foreground;
flex: 0 0 245px;
font-size: 0.75em;
min-width: 255px;
min-width: 200px;
text-align: right;
white-space: nowrap;
vertical-align: baseline;
.is-actively-downloading & {
min-width: 265px;
}
li {
display: inline-block;
font-weight: 500;
@@ -280,7 +283,7 @@ $torrent--background--error: #e95779;
}
&--speed {
width: 60px;
width: 65px;
&--download,
&--upload {
@@ -18,58 +18,58 @@ export default class TorrentGeneralInfo extends React.Component {
return (
<ul>
<li className="torrent__details--size">
<span className="torrent__details__label">Size</span>
<li className="torrent-details__detail--size">
<span className="torrent-details__detail__label">Size</span>
{totalSize.value}
<em className="unit">{totalSize.unit}</em>
</li>
<li className="torrent__details--completed">
<span className="torrent__details__label">Downloaded</span>
<li className="torrent-details__detail--completed">
<span className="torrent-details__detail__label">Downloaded</span>
{torrent.percentComplete}
<em className="unit">%</em>
</li>
<li className="torrent__details--added">
<span className="torrent__details__label">Added</span>
<li className="torrent-details__detail--added">
<span className="torrent-details__detail__label">Added</span>
{addedString}
</li>
<li className="torrent__details--peers">
<span className="torrent__details__label">Peers</span>
<li className="torrent-details__detail--peers">
<span className="torrent-details__detail__label">Peers</span>
{torrent.connectedPeers} of {torrent.totalPeers}
</li>
<li className="torrent__details--seeds">
<span className="torrent__details__label">Seeds</span>
<li className="torrent-details__detail--seeds">
<span className="torrent-details__detail__label">Seeds</span>
{torrent.connectedSeeds} of {torrent.totalSeeds}
</li>
<li className="torrent__details--seeds">
<span className="torrent__details__label">Hash</span>
<li className="torrent-details__detail--seeds">
<span className="torrent-details__detail__label">Hash</span>
{torrent.hash}
</li>
<li className="torrent__details--seeds">
<span className="torrent__details__label">Tracker Message</span>
<li className="torrent-details__detail--seeds">
<span className="torrent-details__detail__label">Tracker Message</span>
{torrent.message}
</li>
<li className="torrent__details--seeds">
<span className="torrent__details__label">Creation Date</span>
<li className="torrent-details__detail--seeds">
<span className="torrent-details__detail__label">Creation Date</span>
{creationString}
</li>
<li className="torrent__details--seeds">
<span className="torrent__details__label">Location</span>
<li className="torrent-details__detail--seeds">
<span className="torrent-details__detail__label">Location</span>
{torrent.basePath}
</li>
<li className="torrent__details--seeds">
<span className="torrent__details__label">Scheduler</span>
<li className="torrent-details__detail--seeds">
<span className="torrent-details__detail__label">Scheduler</span>
{torrent.ignoreScheduler === '1' ? 'Ignored' : 'Obeyed'}
</li>
<li className="torrent__details--seeds">
<span className="torrent__details__label">Comment</span>
<li className="torrent-details__detail--seeds">
<span className="torrent-details__detail__label">Comment</span>
{torrent.comment.substr(10)}
</li>
<li className="torrent__details--seeds">
<span className="torrent__details__label">Type</span>
<li className="torrent-details__detail--seeds">
<span className="torrent-details__detail__label">Type</span>
{torrent.isPrivate === '0' ? 'Public' : 'Private'}
</li>
<li className="torrent__details--seeds">
<span className="torrent__details__label">Free Disk Space</span>
<li className="torrent-details__detail--seeds">
<span className="torrent-details__detail__label">Free Disk Space</span>
{freeDiskSpace.value}
<em className="unit">{freeDiskSpace.unit}</em>
</li>
+1 -1
View File
@@ -89,7 +89,7 @@ gulp.task('images', () => {
gulp.task('sass', () => {
return gulp.src(dirs.src + '/' + dirs.styles + '/' + files.mainStyles + '.scss')
.pipe(gulpif(development, sourcemaps.init()))
.pipe(sass().on('error', () => {
.pipe(sass().on('error', (error) => {
gutil.log(
gutil.colors.green('Sass Error!\n'),
'\n',