git ssb

0+

ev / microbay



forked from Dominic / patchbay

Commit c719e8965e88d58c418ef643791899d3e4df2ed3

default to tabs view

Dominic Tarr committed on 7/30/2016, 4:10:02 AM
Parent: 1a4ccb4dc20d081f7f29e659e14b850e48e14a96

Files changed

modules/app.jschanged
modules/app.jsView
@@ -2,9 +2,9 @@
22 var h = require('hyperscript')
33
44 var screen_view = plugs.first(exports.screen_view = [])
55
6-var status = h('div.status')
6+var status = h('div.status.error') //start off disconnected
77
88 exports.connection_status = function (err) {
99 if(err) status.classList.add('error')
1010 else status.classList.remove('error')
@@ -20,9 +20,12 @@
2020 var screen = h('div.screen.column', status, view)
2121
2222 window.onhashchange = function (ev) {
2323 var _view = view
24- screen.replaceChild(view = screen_view(hash()), _view)
24+ view = screen_view(hash() || 'tabs')
25+
26+ if(_view) screen.replaceChild(view, _view)
27+ else document.body.appendChild(view)
2528 }
2629
2730 return screen
2831
@@ -44,4 +47,6 @@
4447
4548
4649
4750
51+
52+

Built with git-ssb-web