git ssb

0+

ev / microbay



forked from Dominic / patchbay

Commit 7745cee71776d98cebb4b0e9225e82484ffb1792

Merge branch 'tweaks' of ssb://%Hq+YIFBq9MM1Idy4+IB05MHcVaRgNyG4UJARn8C/2ck=.sha256 into styles

Ev Bogue committed on 9/9/2016, 4:41:20 PM
Parent: 89f33f4a320148796631bda325c47c569d9630e6
Parent: 56281fc6758e5edb39a262b90900a7e5f0bed393

Files changed

modules/avatar-image.jschanged
modules/compose.jschanged
modules/file-input.jschanged
modules/git.jschanged
modules/message.jschanged
modules/tabs.jschanged
modules/avatar_fallback.pngadded
package.jsonchanged
modules/avatar-image.jsView
@@ -1,8 +1,9 @@
11
22 var getAvatar = require('ssb-avatar')
33 var h = require('hyperscript')
44 var ref = require('ssb-ref')
5 +var path = require('path')
56
67 var plugs = require('../plugs')
78 var sbot_query = plugs.first(exports.sbot_query = [])
89 var blob_url = require('../plugs').first(exports.blob_url = [])
@@ -10,9 +11,9 @@
1011 var pull = require('pull-stream')
1112
1213 var id = require('../keys').id
1314
14-var default_avatar = '&qjeAs8+uMXLlyovT4JnEpMwTNDx/QXHfOl2nv2u0VCM=.sha256'
15 +var default_avatar = path.join(__dirname, 'avatar_fallback.png')
1516
1617 var avatars = AVATARS = {}
1718
1819 function isFunction (f) {
@@ -77,9 +78,9 @@
7778 exports.avatar_image = function (author, classes) {
7879 classes = classes || ''
7980 if(classes && 'string' === typeof classes) classes = '.avatar--'+classes
8081
81- var img = h('img'+classes, {src: blob_url(default_avatar)})
82 + var img = h('img'+classes, {src: default_avatar})
8283 // getAvatar({links: sbot_links}, id, author, function (err, avatar) {
8384 // if (err) return console.error(err)
8485 // if(ref.isBlob(avatar.image))
8586 // img.src = blob_url(avatar.image)
modules/compose.jsView
@@ -27,9 +27,11 @@
2727
2828 var blur
2929 ta.addEventListener('focus', function () {
3030 clearTimeout(blur)
31- ta.style.height = '200px'
31 + if(!ta.value) {
32 + ta.style.height = '200px'
33 + }
3234 accessories.style.display = 'block'
3335 })
3436 ta.addEventListener('blur', function () {
3537 //don't shrink right away, so there is time
modules/file-input.jsView
@@ -12,8 +12,9 @@
1212
1313 return h('input', { type: 'file',
1414 onchange: function (ev) {
1515 var file = ev.target.files[0]
16 + if (!file) return
1617 var reader = new FileReader()
1718 reader.onload = function () {
1819 pull(
1920 pull.values(split(new Buffer(reader.result), 64*1024)),
modules/git.jsView
@@ -257,11 +257,10 @@
257257 return div
258258 }
259259
260260 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)),
264263 c.refs ? h('ul', Object.keys(c.refs).map(function (ref) {
265264 var rev = c.refs[ref]
266265 return h('li',
267266 shortRefName(ref) + ': ',
@@ -280,15 +279,15 @@
280279 h('li', '+ ', c.commits_more, ' more') : null)
281280 ] : null,
282281 Array.isArray(c.issues) ? c.issues.map(function (issue) {
283282 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))
286285 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))
289288 }) : null
290- )
289 + ]
291290 }
292291
293292 if(c.type === 'issue-edit') {
294293 return h('div',
modules/message.jsView
@@ -19,9 +19,9 @@
1919
2020 var links = []
2121 for(var k in CACHE) {
2222 var _msg = CACHE[k]
23- if(_msg.content.type == 'post' && Array.isArray(_msg.content.mentions)) {
23 + if(Array.isArray(_msg.content.mentions)) {
2424 for(var i = 0; i < _msg.content.mentions.length; i++)
2525 if(_msg.content.mentions[i].link == msg.key)
2626 links.push(k)
2727 }
modules/tabs.jsView
@@ -131,9 +131,12 @@
131131 return
132132
133133 // activate the search field
134134 case 191: // /
135- search.activate('?', ev)
135 + if (ev.shiftKey)
136 + search.activate('?', ev)
137 + else
138 + search.activate('/', ev)
136139 return
137140
138141 // navigate to a feed
139142 case 50: // 2
modules/avatar_fallback.png
modules/avatar_fallback.png
package.jsonView
@@ -1,8 +1,8 @@
11 {
22 "name": "patchbay",
33 "description": "a pluggable patchwork",
4- "version": "3.0.0",
4 + "version": "3.0.1",
55 "homepage": "https://github.com/dominictarr/patchbay",
66 "repository": {
77 "type": "git",
88 "url": "git://github.com/dominictarr/patchbay.git"

Built with git-ssb-web