diff options
author | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-12-05 12:32:35 -1000 |
---|---|---|
committer | cel <cel@f/6sQ6d2CMxRUhLpspgGIulDxDCwYD7DzFzPNr7u5AU=.ed25519> | 2019-12-07 16:48:17 -1000 |
commit | d7c4e48d49294efeb2d0597185956e18d20df928 (patch) | |
tree | 5c27bf4b414c4fbd27126aa430e1e8bf9d581353 /lib | |
parent | ea522127885486018de1547de0db04f3d3144eb6 (diff) | |
download | patchfoo-d7c4e48d49294efeb2d0597185956e18d20df928.tar.gz patchfoo-d7c4e48d49294efeb2d0597185956e18d20df928.zip |
Add content warning field in composer
Diffstat (limited to 'lib')
-rw-r--r-- | lib/serve.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/serve.js b/lib/serve.js index 759477d..41d4d6f 100644 --- a/lib/serve.js +++ b/lib/serve.js @@ -1217,7 +1217,7 @@ Serve.prototype.block = function (path) { ph('h2', ['Block ', self.phIdLink(id)]), ph('form', {action: '', method: 'post', enctype: 'multipart/form-data'}, [ 'Reason: ', ph('input', {name: 'reason', value: reason || '', - style: 'width: 100%', + className: 'wide', placeholder: 'spam, abuse, etc.'}), self.phMsgActions(content), ]), @@ -3688,7 +3688,7 @@ Serve.prototype.composer = function (opts, cb) { h('input', {type: 'hidden', name: 'url', value: self.req.url}), h('input', {type: 'hidden', name: 'composer_id', value: opts.id}), opts.recps ? self.app.render.privateLine(opts.recps, true, done()) : - opts.private ? h('div', h('input.recps-input', {name: 'recps', + opts.private ? h('div', h('input.wide', {name: 'recps', size: 70, value: data.recps || '', placeholder: 'recipient ids'})) : '', channel != null ? h('div', '#', h('input', {name: 'channel', placeholder: 'channel', @@ -3700,6 +3700,9 @@ Serve.prototype.composer = function (opts, cb) { ) ) : '', closeIssueCheckbox(done()), + h('div', h('input.wide', {name: 'content_warning', size: 70, + value: data.content_warning || '', + placeholder: 'Content Warning'})), h('textarea', { id: opts.id, name: 'text', @@ -3878,6 +3881,7 @@ Serve.prototype.composer = function (opts, cb) { } ] } + if (data.content_warning) content.contentWarning = String(data.content_warning) if (channel) content.channel = data.channel done(function (err) { |