git ssb

3+

dangerousbeans / scuttle-vue



Commit 5d3463a5a812931815b799819ca80c8f2119bda2

AN IMAGE APPEARED ON THE SCREEN

Joran committed on 11/14/2017, 4:25:01 AM
Parent: de96ef95eaf477616b37340f3d26f317f0b354f0

Files changed

src/components/Message.vuechanged
src/plugins/source_observer.jschanged
src/components/Message.vueView
@@ -1,8 +1,9 @@
11
22 <template>
33 <div class="media">
4- {{ profile_image }}
4 + <img :src="profile_image">
5 + </img>
56
67 <div class="media-body">
78 <h5 class="mt-0">{{ author }}</h5>
89
@@ -30,18 +31,26 @@
3031 data () {
3132 return {
3233 author: "...",
3334 image_url: "http://via.placeholder.com/90x90",
34- api: this.$depject_api
35 + api: this.$depject_api,
36 +
3537 }
3638 },
3739 subscriptions: function () {
38- return {
39- profile_image: this.$observers.cb_obs(
40- this.api.avatar_image[0]
41- )(this.message.value.content.author(), 'tiny', this)
42- }
40 + // var obj = {
41 + // debugger
42 +
43 + // profile_image: Rx.Observable.bindCallback( this.api.avatar_image[0].bind(this) )('@ywmhh72dezK+GrK+/QiYOJ0dKWVuGA/AkpOB/wrWTgk=.ed25519')
44 + // }
45 + // // debugger
46 + //
47 + // return obj
4348 },
49 + computed: {
50 + profile_image: function(){
51 + return vm.$depject_api.blob_url[0]("&aIbhv+YRJ85BAWzI1oCwa9716L5pdvMliMdh4KOT+SE=.sha256") }
52 + },
4453 methods: {
4554 setAuthor(err, a){
4655 if(a[0] == null)
4756 return
src/plugins/source_observer.jsView
@@ -16,10 +16,10 @@
1616 pull.drain(msg => observer.next(msg))
1717 )
1818 }).scan((accumulator, newMsg) => [nn(newMsg), ...accumulator], [])
1919 },
20- cb_obs(f){
21- return Rx.Observable.bindCallback(f)
20 + cb_obs(f, args){
21 + return Rx.Observable.bindCallback(f)(args)
2222 }
2323 }
2424
2525 Vue.prototype.$observers = observers;

Built with git-ssb-web