From e4b76d0d59fc3f03374f9b1f7f22487dabf9a097 Mon Sep 17 00:00:00 2001 From: Drew DeVault Date: Wed, 23 Aug 2017 08:27:08 -0400 Subject: [PATCH] Support partial updates from synapse --- scss/main.scss | 1 + src/reducers/torrents.js | 5 ++++- src/ui/torrent_table.js | 2 +- 3 files changed, 6 insertions(+), 2 deletions(-) diff --git a/scss/main.scss b/scss/main.scss index 32b72ec..32d0b9f 100644 --- a/scss/main.scss +++ b/scss/main.scss @@ -34,4 +34,5 @@ } background-repeat: no-repeat; + background-position: bottom; } diff --git a/src/reducers/torrents.js b/src/reducers/torrents.js index 10ddeaa..47bc643 100644 --- a/src/reducers/torrents.js +++ b/src/reducers/torrents.js @@ -7,7 +7,10 @@ export default function torrents(state = {}, action) { ...state, ...action.resources .filter(r => r.type === "torrent") - .reduce((s, r) => ({ ...s, [r.id]: r }), {}) + .reduce((s, r) => ({ + ...s, + [r.id]: { ...s[r.id], ...r } + }), {}) }; } return state; diff --git a/src/ui/torrent_table.js b/src/ui/torrent_table.js index 85f9d07..db835b2 100644 --- a/src/ui/torrent_table.js +++ b/src/ui/torrent_table.js @@ -19,7 +19,7 @@ class TorrentTable extends Component { key={t.id} className={`torrent ${"seeding" || t.status}`} style={{ - backgroundSize: `${t.progress * 100}% 100%` + backgroundSize: `${t.progress * 100}% 3px` }} >