git ssb

16+

Dominic / patchbay



Commit 96d0a60a7b7c41087f0c52c4ed0292f86ba7d4b1

renamed tabs to hypertabs

Dominic Tarr committed on 5/12/2016, 9:26:37 AM
Parent: 134d423c26820a78c6bbfbc506df577e0673b6b2

Files changed

modules/tabs.jschanged
modules/tabs.jsView
@@ -1,5 +1,5 @@
1-var tabs = require('tabs')
1+var Tabs = require('hypertabs')
22 var h = require('hyperscript')
33 var pull = require('pull-stream')
44 var u = require('../util')
55
@@ -16,24 +16,27 @@
1616 return fn(path, sbot)
1717 })
1818 }
1919
20- var t = tabs()
20+ var tabs = Tabs()
2121 var main = screen('/')
22- if(main) t.add('main', main, true)
22+ if(main) tabs.add('main', main, true)
2323
24- t.onclick = function (ev) {
24+ tabs.onclick = function (ev) {
2525 var link = ancestor(ev.target)
26- EV = ev
2726 var path = link.hash.substring(1)
28- var el = screen(path)
29- if(el) t.add(path, el, !ev.ctrlKey)
3027
3128 ev.preventDefault()
3229 ev.stopPropagation()
30+
31+ if(tabs.has(path)) return tabs.select(path)
32+
33+ var el = screen(path)
34+ if(el) tabs.add(path, el, !ev.ctrlKey)
35+
3336 }
3437
35- return t
38+ return tabs
3639 }
3740
3841 exports.message_render = []
3942 exports.screen_view = []
@@ -42,4 +45,6 @@
4245
4346
4447
4548
49+
50+

Built with git-ssb-web