Commit eb81eece1f8795742bebbf3e065d10aff9ed0152
add compose box to front page, and use placeholder in compose
Ev Bogue committed on 5/5/2018, 12:44:07 AMParent: 1f6c4dda298d9ced3fc9c8d177119d49758ae537
Files changed
compose.js | changed |
views.js | changed |
compose.js | ||
---|---|---|
@@ -44,9 +44,9 @@ | ||
44 | 44 … | var container = h('div.container') |
45 | 45 … | if (opts.messageText) |
46 | 46 … | var textarea = h('textarea.compose', opts.messageText) |
47 | 47 … | 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'}) | |
49 | 49 … | |
50 | 50 … | var initialButtons = h('span', |
51 | 51 … | h('button.btn', 'Preview', { |
52 | 52 … | onclick: function () { |
views.js | ||
---|---|---|
@@ -16,10 +16,26 @@ | ||
16 | 16 … | )) |
17 | 17 … | } |
18 | 18 … | |
19 | 19 … | module.exports.logstream = function () { |
20 | - screen() | |
20 … | + var opts = { | |
21 … | + "type": 'post', | |
22 … | + "placeholder": 'Write a mutable message' | |
23 … | + } | |
21 | 24 … | |
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 … | + | |
22 | 38 … | function createStream (opts) { |
23 | 39 … | return pull( |
24 | 40 … | More(sbot.createLogStream, opts), |
25 | 41 … | pull.map(function (msg) { |
Built with git-ssb-web