From cdedf600931cc3792f73d7ada620d6bac16c5c86 Mon Sep 17 00:00:00 2001 From: John Furrow Date: Sun, 27 Mar 2016 16:02:45 -0700 Subject: [PATCH] Fix torrent details --- .../components/_torrent-details-panel.scss | 145 +++++++++--------- client/source/sass/components/_torrents.scss | 9 +- .../torrent-details/TorrentGeneralInfo.js | 52 +++---- gulpfile.js | 2 +- 4 files changed, 108 insertions(+), 100 deletions(-) diff --git a/client/source/sass/components/_torrent-details-panel.scss b/client/source/sass/components/_torrent-details-panel.scss index 3dfcce85..c1a03db6 100644 --- a/client/source/sass/components/_torrent-details-panel.scss +++ b/client/source/sass/components/_torrent-details-panel.scss @@ -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; } } } diff --git a/client/source/sass/components/_torrents.scss b/client/source/sass/components/_torrents.scss index ff710b3d..0e1fa6b9 100644 --- a/client/source/sass/components/_torrents.scss +++ b/client/source/sass/components/_torrents.scss @@ -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 { diff --git a/client/source/scripts/components/torrent-details/TorrentGeneralInfo.js b/client/source/scripts/components/torrent-details/TorrentGeneralInfo.js index 7cfe9f28..29a967d6 100644 --- a/client/source/scripts/components/torrent-details/TorrentGeneralInfo.js +++ b/client/source/scripts/components/torrent-details/TorrentGeneralInfo.js @@ -18,58 +18,58 @@ export default class TorrentGeneralInfo extends React.Component { return (