git ssb

10+

Matt McKegg / patchwork



Commit 45eb38ea158546001d22126e5b308ea80452483a

smoother display of peer progress

Matt McKegg committed on 3/13/2017, 5:10:29 PM
Parent: 09787f27813d6ccfb87629fd66c535af51bd57fb

Files changed

modules/progress/html/peer.jschanged
modules/progress/html/render.jschanged
package.jsonchanged
styles/profile-list.mcsschanged
modules/progress/html/peer.jsView
@@ -17,7 +17,7 @@
1717 var value = computed([progress, feeds], (pending, feeds) => {
1818 return (feeds - pending) / feeds
1919 })
2020
21- return when(progress, api.progress.html.render(value))
21 + return api.progress.html.render(value, when(progress, '-pending'))
2222 })
2323 }
modules/progress/html/render.jsView
@@ -4,11 +4,12 @@
44
55 exports.gives = nest('progress.html.render')
66
77 exports.create = function (api) {
8- return nest('progress.html.render', function (pos) {
8 + return nest('progress.html.render', function (pos, classList) {
99 return svg('svg RadialProgress', {
10- viewBox: '-20 -20 240 240'
10 + viewBox: '-20 -20 240 240',
11 + classList
1112 }, [
1213 svg('path', {
1314 d: 'M100,0 a100,100 0 0 1 0,200 a100,100 0 0 1 0,-200',
1415 'stroke-width': 40,
package.jsonView
@@ -29,9 +29,9 @@
2929 "is-visible": "^2.1.1",
3030 "level": "~1.4.0",
3131 "level-memview": "0.0.0",
3232 "micro-css": "^2.0.0",
33- "mutant": "^3.17.0",
33 + "mutant": "^3.18.0",
3434 "mutant-pull-reduce": "^1.1.0",
3535 "non-private-ip": "^1.4.1",
3636 "on-change-network": "0.0.2",
3737 "on-wakeup": "^1.0.1",
styles/profile-list.mcssView
@@ -52,8 +52,13 @@
5252 div.progress {
5353 display: flex
5454 flex-direction: column
5555 svg {
56 + transition: opacity 0.2s
57 + opacity: 0
58 + -pending {
59 + opacity: 1
60 + }
5661 width: 20px
5762 flex: 1
5863 }
5964 }

Built with git-ssb-web