git ssb

16+

Dominic / patchbay



Tree: cb94bd0d83fae7b007a0e33061df18c620bd6cb1

Files: cb94bd0d83fae7b007a0e33061df18c620bd6cb1 / modules / message-confirm.js

704 bytesRaw
1var lightbox = require('hyperlightbox')
2var h = require('hyperscript')
3var u = require('../util')
4//publish or add
5
6exports.publish = []
7exports.message_content = []
8
9exports.message_confirm = function (content, sbot) {
10
11 var lb = lightbox()
12 document.body.appendChild(lb)
13
14 lb.show(h('div.column',
15 u.firstPlug(exports.message_content,
16 {key: "DRAFT", value: {content: content}}, sbot
17 ) || h('pre', JSON.stringify(content, null, 2)),
18 h('div.row',
19 h('button', 'okay', {onclick: function () {
20 u.firstPlug(exports.publish, content, null, sbot)
21 lb.remove()
22 }}),
23 h('button', 'cancel', {onclick: function () {
24 lb.remove()
25 }})
26 )
27 ))
28
29}
30
31
32

Built with git-ssb-web