git ssb

2+

ev / mvd



Commit eb81eece1f8795742bebbf3e065d10aff9ed0152

add compose box to front page, and use placeholder in compose

Ev Bogue committed on 5/5/2018, 12:44:07 AM
Parent: 1f6c4dda298d9ced3fc9c8d177119d49758ae537

Files changed

compose.jschanged
views.jschanged
compose.jsView
@@ -44,9 +44,9 @@
4444 var container = h('div.container')
4545 if (opts.messageText)
4646 var textarea = h('textarea.compose', opts.messageText)
4747 else
48- var textarea = h('textarea.compose', {placeholder: 'Write a message' || opts.placeholder})
48 + var textarea = h('textarea.compose', {placeholder: opts.placeholder || 'Write a message'})
4949
5050 var initialButtons = h('span',
5151 h('button.btn', 'Preview', {
5252 onclick: function () {
views.jsView
@@ -16,10 +16,26 @@
1616 ))
1717 }
1818
1919 module.exports.logstream = function () {
20- screen()
20 + var opts = {
21 + "type": 'post',
22 + "placeholder": 'Write a mutable message'
23 + }
2124
25 + var content = h('div.content',
26 + h('div.message', compose(opts))
27 + )
28 +
29 + function mainscreen () {
30 + document.body.appendChild(h('div.screen',
31 + {style: {position: 'absolute', top: '0px', bottom: '0px', left: '0px', right: '0px'}},
32 + hyperscroll(content)
33 + ))
34 + }
35 +
36 + mainscreen()
37 +
2238 function createStream (opts) {
2339 return pull(
2440 More(sbot.createLogStream, opts),
2541 pull.map(function (msg) {

Built with git-ssb-web