git ssb

3+

dangerousbeans / scuttle-vue



Commit 2c9debe895029d2020d827bbb60f3d96115d2e8d

markdown

Joran committed on 11/11/2017, 6:18:47 AM
Parent: 8f6cde9a147df8d5000afd84a4653031fe7f06ee

Files changed

package-lock.jsonchanged
src/components/Message.vuechanged
package-lock.jsonView
The diff is too large to show. Use a local git client to view these changes.
Old file size: 370916 bytes
New file size: 370896 bytes
src/components/Message.vueView
@@ -3,10 +3,12 @@
33 <div class="media">
44 <img class="d-flex mr-3" :alt="author">
55 <div class="media-body">
66 <h5 class="mt-0">{{ author }}</h5>
7- {{ message.value.content.text() }}
87
8 + <span v-html="content_text()"></span>
9 +
10 +
911 <p>
1012 {{ message.value.content.type() }}
1113 </p>
1214 </div>
@@ -17,9 +19,10 @@
1719
1820 // var pull = require('pull-stream')
1921 import Rx from 'rxjs/RX'
2022 import { Observable } from 'rxjs/Observable'
21-const nn = require('nevernull');
23 +const nn = require('nevernull')
24 +const md = require('ssb-markdown')
2225
2326 export default {
2427 name: 'message',
2528 props: ['message'],
@@ -30,12 +33,18 @@
3033 },
3134 methods: {
3235 setAuthor(err, a){
3336 this.author = nn(a[0]).name()
37 + },
38 + content_text()
39 + {
40 + return md.block( this.message.value.content.text() )
3441 }
3542 },
3643 created() {
37- this.$depject_api.signifier[0](this.message.value.author(), this.setAuthor)
44 + this.$depject_api.signifier[0](
45 + this.message.value.author(), this.setAuthor
46 + )
3847 }
3948 }
4049
4150 </script>

Built with git-ssb-web