Commit 84955f6a151e18bfc8131c8ffbcd043272b13500
app.js tidy
mix irving committed on 3/24/2017, 4:03:46 AMParent: 4be1b90efd674f05f2f89a32ee9679a80dab57b8
Files changed
main/html/app.js | changed |
main/html/app.js | ||
---|---|---|
@@ -23,9 +23,9 @@ | ||
23 | 23 | insertCss(css) |
24 | 24 | |
25 | 25 | function onSelect (indexes) { |
26 | 26 | const ids = indexes.map(index => tabs.get(index).content.id) |
27 | - if (!search) { console.log('boo') ; return } | |
27 | + if (!search) { console.log('THERE SHOULD BE A SEARCH, GOT', search) ; return } | |
28 | 28 | |
29 | 29 | if (ids.length > 1) search.input.value = 'split('+ids.join(',')+')' |
30 | 30 | else search.input.value = ids[0] |
31 | 31 | } |
@@ -35,17 +35,11 @@ | ||
35 | 35 | return true |
36 | 36 | } |
37 | 37 | |
38 | 38 | var page = addPage(path, true, false) |
39 | - // const el = api.screen_view(path) | |
40 | - // if (!el) return | |
41 | - // if(!el.title) el.title = path | |
42 | - | |
43 | - // el.scroll = keyscroll(el.querySelector('.Scroller .content')) | |
44 | - // tabs.add(el, change) | |
45 | 39 | return change |
46 | 40 | }) |
47 | - const tabs = Tabs(onSelect, { append: h('div.extra', [ search ]) }) | |
41 | + const tabs = Tabs(onSelect, { append: h('div.navExtra', [ search ]) }) | |
48 | 42 | const App = h('App', tabs) |
49 | 43 | |
50 | 44 | function addPage (link, change, split) { |
51 | 45 | const page = api.router.html.page(link) |
@@ -54,9 +48,9 @@ | ||
54 | 48 | page.id = page.id || link |
55 | 49 | tabs.add(page, change, split) |
56 | 50 | } |
57 | 51 | const initialTabs = ['/public', '/private', '/notifications'] |
58 | - initialTabs.forEach(r => addPage(r)) | |
52 | + initialTabs.forEach(p => addPage(p)) | |
59 | 53 | tabs.select(0) |
60 | 54 | |
61 | 55 | catchClick(App, (link, { ctrlKey: openBackground, isExternal }) => { |
62 | 56 | if (isExternal) api.main.html.externalConfirm(link) |
Built with git-ssb-web