Support partial updates from synapse

This commit is contained in:
Drew DeVault 2017-08-23 08:27:08 -04:00
parent 02eb65c99e
commit e4b76d0d59
3 changed files with 6 additions and 2 deletions

View File

@ -34,4 +34,5 @@
} }
background-repeat: no-repeat; background-repeat: no-repeat;
background-position: bottom;
} }

View File

@ -7,7 +7,10 @@ export default function torrents(state = {}, action) {
...state, ...state,
...action.resources ...action.resources
.filter(r => r.type === "torrent") .filter(r => r.type === "torrent")
.reduce((s, r) => ({ ...s, [r.id]: r }), {}) .reduce((s, r) => ({
...s,
[r.id]: { ...s[r.id], ...r }
}), {})
}; };
} }
return state; return state;

View File

@ -19,7 +19,7 @@ class TorrentTable extends Component {
key={t.id} key={t.id}
className={`torrent ${"seeding" || t.status}`} className={`torrent ${"seeding" || t.status}`}
style={{ style={{
backgroundSize: `${t.progress * 100}% 100%` backgroundSize: `${t.progress * 100}% 3px`
}} }}
> >
<td> <td>