Commit 7745cee71776d98cebb4b0e9225e82484ffb1792
Merge branch 'tweaks' of ssb://%Hq+YIFBq9MM1Idy4+IB05MHcVaRgNyG4UJARn8C/2ck=.sha256 into styles
Ev Bogue committed on 9/9/2016, 4:41:20 PMParent: 89f33f4a320148796631bda325c47c569d9630e6
Parent: 56281fc6758e5edb39a262b90900a7e5f0bed393
Files changed
modules/avatar-image.js | changed |
modules/compose.js | changed |
modules/file-input.js | changed |
modules/git.js | changed |
modules/message.js | changed |
modules/tabs.js | changed |
modules/avatar_fallback.png | added |
package.json | changed |
modules/avatar-image.js | ||
---|---|---|
@@ -1,8 +1,9 @@ | ||
1 | 1 … | |
2 | 2 … | var getAvatar = require('ssb-avatar') |
3 | 3 … | var h = require('hyperscript') |
4 | 4 … | var ref = require('ssb-ref') |
5 … | +var path = require('path') | |
5 | 6 … | |
6 | 7 … | var plugs = require('../plugs') |
7 | 8 … | var sbot_query = plugs.first(exports.sbot_query = []) |
8 | 9 … | var blob_url = require('../plugs').first(exports.blob_url = []) |
@@ -10,9 +11,9 @@ | ||
10 | 11 … | var pull = require('pull-stream') |
11 | 12 … | |
12 | 13 … | var id = require('../keys').id |
13 | 14 … | |
14 | -var default_avatar = '&qjeAs8+uMXLlyovT4JnEpMwTNDx/QXHfOl2nv2u0VCM=.sha256' | |
15 … | +var default_avatar = path.join(__dirname, 'avatar_fallback.png') | |
15 | 16 … | |
16 | 17 … | var avatars = AVATARS = {} |
17 | 18 … | |
18 | 19 … | function isFunction (f) { |
@@ -77,9 +78,9 @@ | ||
77 | 78 … | exports.avatar_image = function (author, classes) { |
78 | 79 … | classes = classes || '' |
79 | 80 … | if(classes && 'string' === typeof classes) classes = '.avatar--'+classes |
80 | 81 … | |
81 | - var img = h('img'+classes, {src: blob_url(default_avatar)}) | |
82 … | + var img = h('img'+classes, {src: default_avatar}) | |
82 | 83 … | // getAvatar({links: sbot_links}, id, author, function (err, avatar) { |
83 | 84 … | // if (err) return console.error(err) |
84 | 85 … | // if(ref.isBlob(avatar.image)) |
85 | 86 … | // img.src = blob_url(avatar.image) |
modules/compose.js | ||
---|---|---|
@@ -27,9 +27,11 @@ | ||
27 | 27 … | |
28 | 28 … | var blur |
29 | 29 … | ta.addEventListener('focus', function () { |
30 | 30 … | clearTimeout(blur) |
31 | - ta.style.height = '200px' | |
31 … | + if(!ta.value) { | |
32 … | + ta.style.height = '200px' | |
33 … | + } | |
32 | 34 … | accessories.style.display = 'block' |
33 | 35 … | }) |
34 | 36 … | ta.addEventListener('blur', function () { |
35 | 37 … | //don't shrink right away, so there is time |
modules/file-input.js | |||
---|---|---|---|
@@ -12,8 +12,9 @@ | |||
12 | 12 … | ||
13 | 13 … | return h('input', { type: 'file', | |
14 | 14 … | onchange: function (ev) { | |
15 | 15 … | var file = ev.target.files[0] | |
16 … | + if (!file) return | ||
16 | 17 … | var reader = new FileReader() | |
17 | 18 … | reader.onload = function () { | |
18 | 19 … | pull( | |
19 | 20 … | pull.values(split(new Buffer(reader.result), 64*1024)), |
modules/git.js | ||
---|---|---|
@@ -257,11 +257,10 @@ | ||
257 | 257 … | return div |
258 | 258 … | } |
259 | 259 … | |
260 | 260 … | if(c.type === 'git-update') { |
261 | - return h('p', | |
262 | - 'pushed to ', | |
263 | - repoLink(c.repo), | |
261 … | + return [ | |
262 … | + h('p', 'pushed to ', repoLink(c.repo)), | |
264 | 263 … | c.refs ? h('ul', Object.keys(c.refs).map(function (ref) { |
265 | 264 … | var rev = c.refs[ref] |
266 | 265 … | return h('li', |
267 | 266 … | shortRefName(ref) + ': ', |
@@ -280,15 +279,15 @@ | ||
280 | 279 … | h('li', '+ ', c.commits_more, ' more') : null) |
281 | 280 … | ] : null, |
282 | 281 … | Array.isArray(c.issues) ? c.issues.map(function (issue) { |
283 | 282 … | if (issue.merged === true) |
284 | - return ['Merged ', message_link(issue.link), ' in ', | |
285 | - h('code', issue.object), ' ', h('q', issue.label)] | |
283 … | + return h('p', 'Merged ', message_link(issue.link), ' in ', | |
284 … | + h('code', issue.object), ' ', h('q', issue.label)) | |
286 | 285 … | if (issue.open === false) |
287 | - return ['Closed ', message_link(issue.link), ' in ', | |
288 | - h('code', issue.object), ' ', h('q', issue.label)] | |
286 … | + return h('p', 'Closed ', message_link(issue.link), ' in ', | |
287 … | + h('code', issue.object), ' ', h('q', issue.label)) | |
289 | 288 … | }) : null |
290 | - ) | |
289 … | + ] | |
291 | 290 … | } |
292 | 291 … | |
293 | 292 … | if(c.type === 'issue-edit') { |
294 | 293 … | return h('div', |
modules/message.js | ||
---|---|---|
@@ -19,9 +19,9 @@ | ||
19 | 19 … | |
20 | 20 … | var links = [] |
21 | 21 … | for(var k in CACHE) { |
22 | 22 … | var _msg = CACHE[k] |
23 | - if(_msg.content.type == 'post' && Array.isArray(_msg.content.mentions)) { | |
23 … | + if(Array.isArray(_msg.content.mentions)) { | |
24 | 24 … | for(var i = 0; i < _msg.content.mentions.length; i++) |
25 | 25 … | if(_msg.content.mentions[i].link == msg.key) |
26 | 26 … | links.push(k) |
27 | 27 … | } |
modules/tabs.js | ||
---|---|---|
@@ -131,9 +131,12 @@ | ||
131 | 131 … | return |
132 | 132 … | |
133 | 133 … | // activate the search field |
134 | 134 … | case 191: // / |
135 | - search.activate('?', ev) | |
135 … | + if (ev.shiftKey) | |
136 … | + search.activate('?', ev) | |
137 … | + else | |
138 … | + search.activate('/', ev) | |
136 | 139 … | return |
137 | 140 … | |
138 | 141 … | // navigate to a feed |
139 | 142 … | case 50: // 2 |
modules/avatar_fallback.png |
---|
package.json | ||
---|---|---|
@@ -1,8 +1,8 @@ | ||
1 | 1 … | { |
2 | 2 … | "name": "patchbay", |
3 | 3 … | "description": "a pluggable patchwork", |
4 | - "version": "3.0.0", | |
4 … | + "version": "3.0.1", | |
5 | 5 … | "homepage": "https://github.com/dominictarr/patchbay", |
6 | 6 … | "repository": { |
7 | 7 … | "type": "git", |
8 | 8 … | "url": "git://github.com/dominictarr/patchbay.git" |
Built with git-ssb-web