Support partial updates from synapse
This commit is contained in:
parent
02eb65c99e
commit
e4b76d0d59
|
@ -34,4 +34,5 @@
|
||||||
}
|
}
|
||||||
|
|
||||||
background-repeat: no-repeat;
|
background-repeat: no-repeat;
|
||||||
|
background-position: bottom;
|
||||||
}
|
}
|
||||||
|
|
|
@ -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;
|
||||||
|
|
|
@ -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>
|
||||||
|
|
Loading…
Reference in New Issue
Block a user