git ssb

16+

Dominic / patchbay



Commit d7f7025973a74edf124dc7a5e5cf20aa2a013e9b

add copy-paste images

mixmix committed on 10/10/2018, 9:54:31 PM
Parent: 9ed5958b4528f84958df37e404fc8ec072d3632b

Files changed

message/html/compose.jschanged
message/html/compose.jsView
@@ -3,8 +3,9 @@
33 const ssbMentions = require('ssb-mentions')
44 const extend = require('xtend')
55 const addSuggest = require('suggest-box')
66 const blobFiles = require('ssb-blob-files')
7 +const get = require('lodash/get')
78
89 exports.gives = nest('message.html.compose')
910
1011 exports.needs = nest({
@@ -81,8 +82,17 @@
8182 clearTimeout(blurTimeout)
8283 blurTimeout = setTimeout(() => textAreaFocused.set(false), 200)
8384 },
8485 'ev-focus': send(textAreaFocused.set, true),
86 + 'ev-paste': ev => {
87 + const files = get(ev, 'clipboardData.files')
88 + if (!files || !files.length) return
89 + const opts = {
90 + stripExif: api.settings.obs.get('patchbay.removeExif', true),
91 + isPrivate
92 + }
93 + blobFiles(files, api.sbot.obs.connection, opts, afterBlobed)
94 + },
8595 placeholder
8696 })
8797 textArea.publish = publish // TODO: fix - clunky api for the keyboard shortcut to target
8898

Built with git-ssb-web