git ssb

0+

ev / microbay



forked from Dominic / patchbay

Tree: 5404eb9aac0d3f76707c6bf2fa5b57c55f46cb64

Files: 5404eb9aac0d3f76707c6bf2fa5b57c55f46cb64 / modules / versions.js

819 bytesRaw
1var h = require('hyperscript')
2
3exports.menu_items = function () {
4 return h('a', {href: '#/versions'}, '/versions')
5}
6
7exports.screen_view = function (path) {
8 if(path !== '/versions') return
9
10 if('undefined' === typeof WebBoot)
11 return h('h1', 'must run with web-boot enabled enviroment')
12
13 var content = h('div.column')
14
15 WebBoot.versions(function (err, log) {
16 log.forEach(function (e, i) {
17 content.appendChild(
18 h('div.row',
19 h('a', {
20 href: '#/run:'+e.value,
21 onclick: function () {
22 WebBoot.run(e.value, function () {
23 console.log('rebooting to:', e.value)
24 })
25 }
26 }, ' ', e.value, ' ', new Date(e.ts)),
27 !i && h('label', '(current)')
28 )
29 )
30 })
31
32 })
33
34 return content
35}
36
37

Built with git-ssb-web