diff --git a/client/source/sass/components/_progress-bar.scss b/client/source/sass/components/_progress-bar.scss index 6ca89ab1..dd46d7dc 100644 --- a/client/source/sass/components/_progress-bar.scss +++ b/client/source/sass/components/_progress-bar.scss @@ -9,42 +9,54 @@ $progress-bar--fill--selected: #fff; $progress-bar--fill--error: #e95779; .progress-bar { - height: 3px; - position: relative; + display: flex; transition: opacity 0.25s; + width: 100%; z-index: 1; .is-selected.is-stopped & { opacity: 0.5; } - &:after { - background: $progress-bar--background; - content: ''; - height: 1px; - left: 0; - position: absolute; - z-index: 0; - top: 1px; - transition: background 0.25s; - width: 100%; + &__icon { + flex: 0 0 auto; + padding-right: 5px; - .is-selected & { - background: $progress-bar--background--selected; - } + .icon { + display: block; + fill: $green; + height: 12px; + transition: fill 0.25s, opacity 0.25s; + width: 12px; - .is-selected.is-stopped & { - background: $progress-bar--background--selected--stopped; + .is-seeding & { + fill: $progress-bar--fill--completed; + } + + .is-completed &, + .is-stopped & { + fill: $progress-bar--fill--stopped; + } + + .has-error & { + fill: $progress-bar--fill--error; + } + + .is-selected & { + fill: $progress-bar--fill--selected; + } } } &__fill { + align-items: center; background: $progress-bar--fill; bottom: 0; - height: 100%; + height: 3px; left: 0; position: absolute; - top: 0; + top: 50%; + transform: translateY(-50%); transition: background 0.25s, width 0.25s; z-index: 1; @@ -57,12 +69,38 @@ $progress-bar--fill--error: #e95779; background: $progress-bar--fill--stopped; } + .has-error & { + background: $progress-bar--fill--error; + } + .is-selected & { background: $progress-bar--fill--selected; } - .has-error & { - background: $progress-bar--fill--error; + &__wrapper { + flex: 1 1 auto; + position: relative; + + &:after { + background: $progress-bar--background; + content: ''; + height: 1px; + left: 0; + position: absolute; + z-index: 0; + top: 50%; + transform: translateY(-50%); + transition: background 0.25s; + width: 100%; + + .is-selected & { + background: $progress-bar--background--selected; + } + + .is-selected.is-stopped & { + background: $progress-bar--background--selected--stopped; + } + } } } } diff --git a/client/source/sass/components/_torrents.scss b/client/source/sass/components/_torrents.scss index 3a7a35fc..c8b22454 100644 --- a/client/source/sass/components/_torrents.scss +++ b/client/source/sass/components/_torrents.scss @@ -1,21 +1,22 @@ $torrent-list--background: #fff; $torrent-list--border: rgba($background, 0.15); -$torrent--primary--foreground: #333332; +$torrent--primary--foreground: #5b6d7c; $torrent--primary--foreground--stopped: rgba(#333332, 0.5); $torrent--primary--foreground--selected: #fff; $torrent--primary--foreground--selected--stopped: rgba($torrent--primary--foreground--selected, 0.6); -$torrent--secondary--foreground: #807f7e; -$torrent--secondary--foreground--stopped: rgba(#807f7e, 0.5); +$torrent--secondary--foreground: #8899a8; +$torrent--secondary--foreground--stopped: rgba(#8899a8, 0.5); $torrent--secondary--foreground--selected: #fff; $torrent--secondary--foreground--selected--stopped: rgba(#fff, 0.6); -$torrent--tertiary--foreground: #807f7e; -$torrent--tertiary--foreground--stopped: rgba(#807f7e, 0.5); +$torrent--tertiary--foreground: #8899a8; +$torrent--tertiary--foreground--stopped: rgba(#8899a8, 0.5); $torrent--tertiary--foreground--selected: rgba(#fff, 0.9); $torrent--tertiary--foreground--selected--stopped: rgba(#fff, 0.5); $torrent--background--hover: #f6f8fa; $torrent--background--selected: $blue; +$torrent--background--error: #e95779; .torrents { display: flex; @@ -105,6 +106,10 @@ $torrent--background--selected: $blue; &.is-selected { background: $torrent--background--selected; + + &.has-error { + background: $torrent--background--error; + } } &__more-info { diff --git a/client/source/scripts/components/icons/Error.js b/client/source/scripts/components/icons/ErrorIcon.js similarity index 100% rename from client/source/scripts/components/icons/Error.js rename to client/source/scripts/components/icons/ErrorIcon.js diff --git a/client/source/scripts/components/icons/Pause.js b/client/source/scripts/components/icons/PauseIcon.js similarity index 100% rename from client/source/scripts/components/icons/Pause.js rename to client/source/scripts/components/icons/PauseIcon.js diff --git a/client/source/scripts/components/icons/Start.js b/client/source/scripts/components/icons/StartIcon.js similarity index 100% rename from client/source/scripts/components/icons/Start.js rename to client/source/scripts/components/icons/StartIcon.js diff --git a/client/source/scripts/components/icons/Stop.js b/client/source/scripts/components/icons/StopIcon.js similarity index 100% rename from client/source/scripts/components/icons/Stop.js rename to client/source/scripts/components/icons/StopIcon.js diff --git a/client/source/scripts/components/sidebar/StatusFilters.js b/client/source/scripts/components/sidebar/StatusFilters.js index 676453bf..eca17feb 100644 --- a/client/source/scripts/components/sidebar/StatusFilters.js +++ b/client/source/scripts/components/sidebar/StatusFilters.js @@ -5,7 +5,7 @@ import Active from '../../components/icons/Active'; import All from '../../components/icons/All'; import Completed from '../../components/icons/Completed'; import DownloadSmall from '../../components/icons/DownloadSmall'; -import Error from '../../components/icons/Error'; +import ErrorIcon from '../../components/icons/ErrorIcon'; import EventTypes from '../../constants/EventTypes'; import Inactive from '../../components/icons/Inactive'; import propsMap from '../../../../../shared/constants/propsMap'; @@ -104,7 +104,7 @@ export default class StatusFilters extends React.Component { { label: 'Error', slug: 'error', - icon: + icon: } ]; diff --git a/client/source/scripts/components/sidebar/TrackerFilters.js b/client/source/scripts/components/sidebar/TrackerFilters.js index a78e5151..3dae3430 100644 --- a/client/source/scripts/components/sidebar/TrackerFilters.js +++ b/client/source/scripts/components/sidebar/TrackerFilters.js @@ -1,13 +1,7 @@ import classnames from 'classnames'; import React from 'react'; -import Active from '../../components/icons/Active'; -import All from '../../components/icons/All'; -import Completed from '../../components/icons/Completed'; -import DownloadSmall from '../../components/icons/DownloadSmall'; -import Error from '../../components/icons/Error'; import EventTypes from '../../constants/EventTypes'; -import Inactive from '../../components/icons/Inactive'; import propsMap from '../../../../../shared/constants/propsMap'; import SidebarFilter from './SidebarFilter'; import TorrentFilterStore from '../../stores/TorrentFilterStore'; diff --git a/client/source/scripts/components/torrent-details/TorrentHeading.js b/client/source/scripts/components/torrent-details/TorrentHeading.js index 2d0c256d..f1ac25c1 100644 --- a/client/source/scripts/components/torrent-details/TorrentHeading.js +++ b/client/source/scripts/components/torrent-details/TorrentHeading.js @@ -8,13 +8,13 @@ import ETA from '../icons/ETA'; import EventTypes from '../../constants/EventTypes'; import File from '../icons/File'; import format from '../../util/formatData'; -import Pause from '../../components/icons/Pause'; +import PauseIcon from '../../components/icons/PauseIcon'; import PriorityMeter from '../filesystem/PriorityMeter'; import ProgressBar from '../ui/ProgressBar'; import propsMap from '../../../../../shared/constants/propsMap'; import Ratio from '../../components/icons/Ratio'; -import Start from '../../components/icons/Start'; -import Stop from '../../components/icons/Stop'; +import StartIcon from '../../components/icons/StartIcon'; +import StopIcon from '../../components/icons/StopIcon'; import stringUtil from '../../../../../shared/util/stringUtil'; import TorrentActions from '../../actions/TorrentActions'; import TorrentStore from '../../stores/TorrentStore'; @@ -61,9 +61,9 @@ export default class TorrentHeading extends React.Component { let currentStatus = this.state.optimisticData.currentStatus || this.getCurrentStatus(torrent.status); let statusIcons = { - 'pause': , - 'start': , - 'stop': + 'pause': , + 'start': , + 'stop': }; let torrentActions = ['start', 'pause', 'stop']; let torrentActionElements = []; diff --git a/client/source/scripts/components/torrent-list/Action.js b/client/source/scripts/components/torrent-list/Action.js index 9eb81014..99b9295c 100644 --- a/client/source/scripts/components/torrent-list/Action.js +++ b/client/source/scripts/components/torrent-list/Action.js @@ -1,6 +1,6 @@ import React from 'react'; -import Stop from '../icons/Stop'; +import StopIcon from '../icons/StopIcon'; export default class Action extends React.Component { render() { diff --git a/client/source/scripts/components/torrent-list/ActionBar.js b/client/source/scripts/components/torrent-list/ActionBar.js index 4856b307..b62b1a2c 100644 --- a/client/source/scripts/components/torrent-list/ActionBar.js +++ b/client/source/scripts/components/torrent-list/ActionBar.js @@ -3,11 +3,11 @@ import React from 'react'; import Action from './Action'; import Add from '../icons/Add'; import EventTypes from '../../constants/EventTypes'; -import Pause from '../icons/Pause'; +import PauseIcon from '../icons/PauseIcon'; import Remove from '../icons/Remove'; import SortDropdown from './SortDropdown'; -import Start from '../icons/Start'; -import Stop from '../icons/Stop'; +import StartIcon from '../icons/StartIcon'; +import StopIcon from '../icons/StopIcon'; import stringUtil from '../../../../../shared/util/stringUtil'; import TorrentActions from '../../actions/TorrentActions'; import TorrentFilterStore from '../../stores/TorrentFilterStore'; @@ -121,11 +121,11 @@ export default class ActionBar extends React.Component {
- } + } clickHandler={this.handleStart} /> - } + } clickHandler={this.handleStop} /> - } + } clickHandler={this.handlePause} />
diff --git a/client/source/scripts/components/torrent-list/Torrent.js b/client/source/scripts/components/torrent-list/Torrent.js index 4b96f935..42225adf 100644 --- a/client/source/scripts/components/torrent-list/Torrent.js +++ b/client/source/scripts/components/torrent-list/Torrent.js @@ -5,6 +5,7 @@ import DotsMini from '../icons/DotsMini'; import EventTypes from '../../constants/EventTypes'; import format from '../../util/formatData'; import ProgressBar from '../ui/ProgressBar'; +import {torrentStatusIcons} from '../../util/torrentStatusIcons'; import {torrentStatusClasses} from '../../util/torrentStatusClasses'; const METHODS_TO_BIND = [ @@ -48,6 +49,7 @@ export default class Torrent extends React.Component { let uploadTotal = format.data(torrent.uploadTotal); let torrentClasses = torrentStatusClasses(torrent, this.props.selected ? 'is-selected' : null, 'torrent'); + let torrentStatusIcon = torrentStatusIcons(torrent.status); return (
  • - +