git ssb

2+

mixmix / ticktack



Commit a1bbae564538469f36bbc2ec762417b265367186

Merge branch 'disable-private-blobs'

mix irving committed on 8/18/2017, 7:42:38 AM
Parent: ab05441c8dcd6cad002d31650852562da523e0c2
Parent: b361e2bf3aa5a852f1427695f6377cf100494224

Files changed

message/html/compose.jschanged
message/html/compose.jsView
@@ -66,23 +66,30 @@
6666 placeholder
6767 })
6868 textArea.publish = publish // TODO: fix - clunky api for the keyboard shortcut to target
6969
70- var fileInput = api.blob.html.input(file => {
71- files.push(file)
72- filesById[file.link] = file
70+ var fileInput
71+ if(!meta.recps) {
72+ fileInput = api.blob.html.input(file => {
73+ files.push(file)
74+ filesById[file.link] = file
7375
74- var embed = file.type.match(/^image/) ? '!' : ''
75- var spacer = embed ? '\n' : ' '
76- var insertLink = spacer + embed + '[' + file.name + ']' + '(' + file.link + ')' + spacer
76+ var embed = file.type.match(/^image/) ? '!' : ''
77+ var spacer = embed ? '\n' : ' '
78+ var insertLink = spacer + embed + '[' + file.name + ']' + '(' + file.link + ')' + spacer
7779
78- var pos = textArea.selectionStart
79- textArea.value = textArea.value.slice(0, pos) + insertLink + textArea.value.slice(pos)
80+ var pos = textArea.selectionStart
81+ textArea.value = textArea.value.slice(0, pos) + insertLink + textArea.value.slice(pos)
8082
81- console.log('added:', file)
82- })
83+ console.log('added:', file)
84+ })
8385
84- fileInput.onclick = () => hasContent.set(true)
86+ fileInput.onclick = () => hasContent.set(true)
87+ }
88+ // if fileInput is null, send button moves to the left side
89+ // and we don't want that.
90+ else
91+ fileInput = h('span')
8592
8693 var publishBtn = h('Button -primary', { 'ev-click': publish }, strings.sendMessage)
8794
8895 var actions = h('section.actions', [
@@ -190,4 +197,6 @@
190197 }
191198 }
192199
193200
201+
202+

Built with git-ssb-web