Commit e187d118979cf2dc07864f520c6420966d0955df
sheet-router hack for message routes etc
mix irving committed on 6/21/2017, 11:39:45 AMParent: a2b72d9a23de2990aec7ecbd6a8961f327d2ac9f
Files changed
app/sync/addPage.js | changed |
router/sync/routes.js | changed |
app/sync/addPage.js | ||
---|---|---|
@@ -3,9 +3,9 @@ | ||
3 | 3 | exports.gives = nest({ 'app.sync.addPage': true }) |
4 | 4 | |
5 | 5 | exports.needs = nest({ |
6 | 6 | 'app.html.tabs': 'first', |
7 | - 'router.sync.router': 'map' | |
7 | + 'router.sync.router': 'first' | |
8 | 8 | }) |
9 | 9 | |
10 | 10 | exports.create = function (api) { |
11 | 11 | return nest({ |
@@ -15,8 +15,13 @@ | ||
15 | 15 | // TODO : make it so error catching doesn't need this, move it into goTo |
16 | 16 | function addPage (path, change, split) { |
17 | 17 | const tabs = api.app.html.tabs() |
18 | 18 | |
19 | + | |
20 | + // TOD (mix) : gross sheet-router hack | |
21 | + if (path[0] !== '/') path = '/'+path | |
22 | + console.log(path) | |
23 | + | |
19 | 24 | const page = api.router.sync.router(path) |
20 | 25 | if (!page) return |
21 | 26 | |
22 | 27 | page.id = page.id || path |
Built with git-ssb-web