git ssb

16+

Dominic / patchbay



Commit a02496d0475717090976150d52e656f9915bcf7f

Remove hPull function

Charles Lehner committed on 8/14/2016, 4:25:28 AM
Parent: bde94ec16b8af91da0d44e2d4bd6ce54d9c23e65

Files changed

modules/theme.jschanged
modules/theme.jsView
@@ -74,34 +74,30 @@
7474 link.feed ? h('a', {href: '#'+link.feed}, avatar_name(link.feed)) : ''
7575 )
7676 }
7777
78-function hPull() {
79- var args = [].slice.call(arguments)
80- var stream = args.pop()
81- var parent = h.apply(this, args)
82- pull(stream, pull.drain(function (el) {
83- parent.appendChild(el)
84- }, function (err) {
85- if (err) console.error(err)
86- }))
87- return parent
88-}
89-
9078 function theme_view() {
9179 var themeInput
80+ var themesList = h('form.themes__list')
9281
82+ pull(
83+ themes(),
84+ pull.unique('id'),
85+ pull.map(renderTheme),
86+ pull.drain(function (el) {
87+ themesList.appendChild(el)
88+ }, function (err) {
89+ if (err) console.error(err)
90+ })
91+ )
92+
9393 return h('div.column.scroll-y', h('div',
9494 updateForm(h('form.themes__form', {onsubmit: onsubmit, onreset: onreset},
9595 themeInput = h('input.themes__id', {placeholder: 'theme id',
9696 value: link.href}), ' ',
9797 h('input.themes__reset', {type: 'reset'}), ' ',
9898 h('input.themes__submit', {type: 'submit', value: 'Save'}))),
99- hPull('form.themes__list', pull(
100- themes(),
101- pull.unique('id'), // TODO: update existing items with new data
102- pull.map(renderTheme)
103- ))
99+ themesList
104100 ))
105101
106102 function onsubmit(e) {
107103 e.preventDefault()

Built with git-ssb-web