Commit aa774015a9a51370c874e52e6602d2df530d7186
show pending updates on search page (click to reload)
Matt McKegg committed on 6/30/2017, 2:03:59 AMParent: 6d24d3b0ec25f55f73bfd1236846ed7f528a28f6
Files changed
modules/page/html/render/search.js | changed |
modules/page/html/render/search.js | ||
---|---|---|
@@ -31,8 +31,12 @@ | ||
31 | 31 | const searchHeader = h('div', {className: 'PageHeading'}, [ |
32 | 32 | h('h1', [h('strong', 'Search Results:'), ' ', query.join(' ')]) |
33 | 33 | ]) |
34 | 34 | |
35 | + var updateLoader = h('a Notifier -loader', { href: '#', 'ev-click': refresh }, [ | |
36 | + 'Show ', h('strong', [updates]), ' ', plural(updates, 'update', 'updates') | |
37 | + ]) | |
38 | + | |
35 | 39 | var content = Proxy() |
36 | 40 | var container = h('Scroller', { |
37 | 41 | style: { overflow: 'auto' } |
38 | 42 | }, [ |
@@ -72,9 +76,12 @@ | ||
72 | 76 | }) |
73 | 77 | ], |
74 | 78 | uniqueKey: 'search' |
75 | 79 | }, [ |
76 | - h('div.main', container) | |
80 | + h('div.main', [ | |
81 | + when(updates, updateLoader), | |
82 | + container | |
83 | + ]) | |
77 | 84 | ]) |
78 | 85 | |
79 | 86 | // scoped |
80 | 87 |
Built with git-ssb-web