git ssb

0+

alanz / patchwork



forked from Matt McKegg / patchwork

Commit 18d5d5c12c41651882d96e8d597c169e95dc4e73

open links to blobs in default browser

Matt McKegg committed on 2/19/2017, 6:21:07 AM
Parent: 971116f7265467d698bd470e648c81292c00a108

Files changed

main-window.jschanged
main-window.jsView
@@ -22,9 +22,10 @@
2222 )
2323
2424 var api = entry(sockets, nest({
2525 'page.html.render': 'first',
26- 'keys.sync.id': 'first'
26+ 'keys.sync.id': 'first',
27+ 'blob.sync.url': 'first'
2728 }))
2829
2930 var renderPage = api.page.html.render
3031 var id = api.keys.sync.id()
@@ -134,8 +135,10 @@
134135 if (href) {
135136 var url = Url.parse(href)
136137 if (url.host) {
137138 electron.shell.openExternal(href)
139+ } else if (href.charAt(0) === '&') {
140+ electron.shell.openExternal(api.blob.sync.url(href))
138141 } else if (href !== '#') {
139142 setView(href)
140143 }
141144 }

Built with git-ssb-web