git ssb

10+

Matt McKegg / patchwork



Commit c173c2b41b860fbb9c38b6c51a466f9652d0461f

tweak progress display

Matt McKegg committed on 5/13/2018, 11:50:29 AM
Parent: a64c5f3b893f894105903efc339ec3209633ef1d

Files changed

modules/app/html/progress-notifier.jschanged
modules/app/html/progress-notifier.jsView
@@ -44,10 +44,10 @@
4444 return 1
4545 }
4646 })
4747
48- var hidden = sustained(computed([waiting, replicateProgress.incompleteFeeds, pending, pendingMigration], (waiting, incomplete, pending, pendingMigration) => {
49- return !waiting && incomplete < 5 && !pending && !pendingMigration
48 + var hidden = sustained(computed([waiting, downloadProgress, pending, pendingMigration], (waiting, downloadProgress, pending, pendingMigration) => {
49 + return !waiting && downloadProgress === 1 && !pending && !pendingMigration
5050 }), 500)
5151
5252 // HACK: css animations take up WAY TO MUCH cpu, remove from dom when inactive
5353 var displaying = computed(sustained(hidden, 500, x => !x), hidden => !hidden)
@@ -56,9 +56,9 @@
5656 h('div.status', [
5757 when(displaying, h('Loading -small', [
5858 when(pendingMigration,
5959 [h('span.info', i18n('Upgrading database')), h('progress', { style: {'margin-left': '10px'}, min: 0, max: 1, value: migrationProgress })],
60- when(computed(replicateProgress.incompleteFeeds, (v) => v > 5),
60 + when(computed(downloadProgress, (v) => v < 1),
6161 [h('span.info', i18n('Downloading new messages')), h('progress', { style: {'margin-left': '10px'}, min: 0, max: 1, value: downloadProgress })],
6262 when(pending, [
6363 [h('span.info', i18n('Indexing database')), h('progress', { style: {'margin-left': '10px'}, min: 0, max: 1, value: indexProgress })]
6464 ], i18n('Scuttling...'))

Built with git-ssb-web