git ssb

16+

Dominic / patchbay



Commit e187d118979cf2dc07864f520c6420966d0955df

sheet-router hack for message routes etc

mix irving committed on 6/21/2017, 11:39:45 AM
Parent: a2b72d9a23de2990aec7ecbd6a8961f327d2ac9f

Files changed

app/sync/addPage.jschanged
router/sync/routes.jschanged
app/sync/addPage.jsView
@@ -3,9 +3,9 @@
33 exports.gives = nest({ 'app.sync.addPage': true })
44
55 exports.needs = nest({
66 'app.html.tabs': 'first',
7- 'router.sync.router': 'map'
7+ 'router.sync.router': 'first'
88 })
99
1010 exports.create = function (api) {
1111 return nest({
@@ -15,8 +15,13 @@
1515 // TODO : make it so error catching doesn't need this, move it into goTo
1616 function addPage (path, change, split) {
1717 const tabs = api.app.html.tabs()
1818
19+
20+ // TOD (mix) : gross sheet-router hack
21+ if (path[0] !== '/') path = '/'+path
22+ console.log(path)
23+
1924 const page = api.router.sync.router(path)
2025 if (!page) return
2126
2227 page.id = page.id || path
router/sync/routes.jsView
@@ -25,8 +25,9 @@
2525 profile, blob, thread
2626 } = api.app.page
2727
2828 const routes = [
29+ ['/', () => public()],
2930 ['/errors', () => errors()],
3031 ['/public', () => public()],
3132 ['/private', () => private()],
3233 ['/notifications', () => notifications()],

Built with git-ssb-web