diff --git a/scss/main.scss b/scss/main.scss index 23e8391..cce229a 100644 --- a/scss/main.scss +++ b/scss/main.scss @@ -203,8 +203,8 @@ fieldset .form-check-input:only-child { } } -.files { - .file { +.flex-table { + & > div { display: flex; padding: 0.1rem 0.25rem; @@ -212,7 +212,7 @@ fieldset .form-check-input:only-child { background: #dfdfdf; } - div { + & > div { margin: 0 0.5rem; &:first-child { @@ -223,27 +223,29 @@ fieldset .form-check-input:only-child { margin-right: 0; } } + } +} - .progress { - min-width: 3rem; - align-self: center; +.files .file { + .progress { + min-width: 3rem; + align-self: center; - .progress-bar { - height: 100%; - } + .progress-bar { + height: 100%; } + } - .path { - text-overflow: ellipsis; - white-space: nowrap; - overflow: hidden; - flex-grow: 1; - line-height: 1.7; - } + .path { + text-overflow: ellipsis; + white-space: nowrap; + overflow: hidden; + flex-grow: 1; + line-height: 1.7; + } - select { - min-width: 5rem; - } + select { + min-width: 5rem; } } diff --git a/src/actions/selection.js b/src/actions/selection.js index 810edf5..f6595da 100644 --- a/src/actions/selection.js +++ b/src/actions/selection.js @@ -39,13 +39,13 @@ export default function selectTorrent(ids, action, navigate=true) { const _ids = [ ...Object.values(files) .filter(file => file.torrent_id === t) - .map(file => file.id) - //...Object.values(peers) - // .filter(peer => peer.torrent_id === t) - // .map(peer => peer.id), - //...Object.values(trackers) - // .filter(tracker => tracker.torrent_id === t) - // .map(tracker => tracker.id), + .map(file => file.id), + ...Object.values(peers) + .filter(peer => peer.torrent_id === t) + .map(peer => peer.id), + ...Object.values(trackers) + .filter(tracker => tracker.torrent_id === t) + .map(tracker => tracker.id) ]; if (_ids.length > 0) { dispatch(unsubscribe(..._ids)); diff --git a/src/ui/torrent_details.js b/src/ui/torrent_details.js index 62a15fe..1d1d63c 100644 --- a/src/ui/torrent_details.js +++ b/src/ui/torrent_details.js @@ -26,6 +26,7 @@ import selectTorrent, { NONE } from '../actions/selection'; import { updateResource } from '../actions/resources'; +import { formatBitrate } from '../bitrate'; const dlURI = (uri, password, id) => `${uri.replace('ws', 'http')}/dl/${id}?password=${encodeURIComponent(password)}`; @@ -35,7 +36,6 @@ function basename(path) { } function File({ dispatch, file }) { - // TODO: edit priority const { uri, password } = store.getState().socket; return (
No connected peers.
} +