git ssb

16+

Dominic / patchbay



Tree: 728c0ce9d46f93e3a253ac9117807be3cd9e4d96

Files: 728c0ce9d46f93e3a253ac9117807be3cd9e4d96 / app / html / page / blob.js

488 bytesRaw
1const nest = require('depnest')
2const ref = require('ssb-ref')
3const { h } = require('mutant')
4
5exports.gives = nest('app.html.page')
6
7exports.needs = nest('blob.sync.url', 'first')
8
9exports.create = (api) => {
10 return nest('app.html.page', blobView)
11
12 function blobView (path) {
13 if (!ref.isBlob(path)) return
14
15 return h('Blob', { id: path, title: path.slice(0, 9) + '...' }, [
16 h('iframe', {
17 src: api.blob.sync.url(path),
18 sandbox: ''
19 })
20 ])
21 }
22}
23
24

Built with git-ssb-web