git ssb

16+

Dominic / patchbay



Commit 787f858837541c7b94531c9b98603402cfb7f06b

Merge remote-tracking branch 'ssb/master' into about_refactor

mix irving committed on 12/30/2016, 9:55:01 PM
Parent: 1462eddad93e346c412fe00dd5fb4468adf1ee04
Parent: 5cb4510e7266ce92c57a4468efce4479ec64d714

Files changed

modules_basic/avatar-image.jschanged
package.jsonchanged
modules_basic/avatar-image.jsView
@@ -33,8 +33,10 @@
3333 var waiting = []
3434
3535 var last = 0
3636
37 +var cache = {}
38 +
3739 exports.create = function (api) {
3840 var avatars = {}
3941
4042 //blah blah
@@ -89,20 +91,25 @@
8991 avatar_image: function (author, classes) {
9092 classes = classes || ''
9193 if(classes && 'string' === typeof classes) classes = '.avatar--'+classes
9294
93- var img = visualize(new Buffer(author.substring(1), 'base64'), 256)
95 + function gen (id) {
96 + if(cache[id]) return h('img', {src: cache[id]})
97 + var img = visualize(new Buffer(author.substring(1), 'base64'), 256)
98 + cache[id] = img.src
99 + return img
100 + }
101 +
102 + var img = ready && avatars[author] ? h('img', {src: api.blob_url(avatars[author].image)}) : gen(author)
103 +
94104 ;(classes || '').split('.').filter(Boolean).forEach(function (c) {
95105 img.classList.add(c)
96106 })
97107
98- function go () {
99- if(avatars[author]) img.src = api.blob_url(avatars[author].image)
100- }
101-
102108 if(!ready)
103- waiting.push(go)
104- else go()
109 + waiting.push(function () {
110 + if(avatars[author]) img.src = api.blob_url(avatars[author].image)
111 + })
105112
106113 return img
107114 }
108115 }
package.jsonView
@@ -1,8 +1,8 @@
11 {
22 "name": "patchbay",
33 "description": "a pluggable patchwork",
4- "version": "6.1.5",
4 + "version": "6.1.6",
55 "homepage": "https://github.com/dominictarr/patchbay",
66 "repository": {
77 "type": "git",
88 "url": "git://github.com/dominictarr/patchbay.git"
@@ -22,9 +22,9 @@
2222 "hyperprogress": "0.1.0",
2323 "hyperscript": "^1.4.7",
2424 "hypertabs": "^3.0.0",
2525 "insert-css": "^2.0.0",
26- "is-visible": "^2.0.4",
26 + "is-visible": "^2.1.1",
2727 "kvgraph": "^0.1.0",
2828 "map-filter-reduce": "^3.0.1",
2929 "micro-css": "^0.6.2",
3030 "mime-types": "^2.1.11",
@@ -35,9 +35,9 @@
3535 "pull-many": "^1.0.7",
3636 "pull-next": "^0.0.1",
3737 "pull-paramap": "^1.1.6",
3838 "pull-reconnect": "^0.0.3",
39- "pull-scroll": "^0.2.0",
39 + "pull-scroll": "^0.3.3",
4040 "pull-stream": "^3.4.5",
4141 "scuttlebot": "^8.7.2",
4242 "setimmediate": "^1.0.5",
4343 "simple-mime": "^0.1.0",
@@ -57,9 +57,9 @@
5757 "ssb-sort": "^1.0.0",
5858 "ssb-ws": "^0.6.2",
5959 "suggest-box": "^2.2.1",
6060 "text-node-searcher": "^1.1.0",
61- "visualize-buffer": "0.0.0"
61 + "visualize-buffer": "0.0.1"
6262 },
6363 "devDependencies": {
6464 "browselectrify": "^1.0.1",
6565 "electro": "^2.0.3",

Built with git-ssb-web