git ssb

16+

Dominic / patchbay



Tree: 037127e09fb5086a0e1db6fa75e539505b0e0e1d

Files: 037127e09fb5086a0e1db6fa75e539505b0e0e1d / app / sync / goTo.js

446 bytesRaw
1const nest = require('depnest')
2
3exports.gives = nest({ 'app.sync.goTo': true })
4
5exports.needs = nest({
6 'app.html.tabs': 'first',
7 'app.sync.addPage': 'first'
8})
9
10exports.create = function (api) {
11 return nest('app.sync.goTo', function goTo (path, change) {
12 const tabs = api.app.html.tabs()
13
14 if (tabs.has(path)) {
15 tabs.select(path)
16 return true
17 }
18
19 api.app.sync.addPage(path, true, false)
20 return change
21 })
22}
23
24

Built with git-ssb-web