2018-03-25 18:03:08 +00:00
|
|
|
// License: LGPL-3.0-or-later
|
2018-03-25 17:30:42 +00:00
|
|
|
const R = require('ramda')
|
|
|
|
const flatMap = require('flyd/module/flatmap')
|
|
|
|
const flyd = require('flyd')
|
|
|
|
const h = require('snabbdom/h')
|
|
|
|
flyd.mergeAll = require('flyd/module/mergeall')
|
|
|
|
|
2018-10-11 16:35:53 +00:00
|
|
|
|
2018-03-25 17:30:42 +00:00
|
|
|
const button = (text, stream) =>
|
|
|
|
h('button.button--tiny.u-marginRight--10', {on: {click: stream}}
|
|
|
|
, [h('i.fa.fa-plus.u-marginRight--5') , text ])
|
|
|
|
|
|
|
|
const view = state =>
|
|
|
|
h('section.timeline-actions.u-padding--10', [
|
|
|
|
button('Note', state.newNote$)
|
|
|
|
, button('Email', state.clickComposing$)
|
2018-10-11 16:35:53 +00:00
|
|
|
, button('Donation', () => appl.open_donation_modal(state.supporter$().id,
|
|
|
|
() => {state.offsiteDonationForm.saved$(Math.random())}
|
|
|
|
)
|
|
|
|
)
|
|
|
|
]
|
|
|
|
)
|
2018-03-25 17:30:42 +00:00
|
|
|
|
|
|
|
module.exports = {view}
|
|
|
|
|