Commit f4097436ca51813b562fc191008b76f8bcb6c71b
sidebar tweaks
mix irving committed on 1/30/2018, 4:49:38 AMParent: f8a1584b10d1efe0f61f8a5aa9c5ac472da2dd42
Files changed
app/html/sideNav/sideNavDiscovery.js | changed |
app/page/blogShow.js | changed |
app/page/blogShow.mcss | changed |
app/html/sideNav/sideNavDiscovery.js | ||
---|---|---|
@@ -17,8 +17,9 @@ | ||
17 | 17 | 'about.obs.name': 'first', |
18 | 18 | 'feed.pull.private': 'first', |
19 | 19 | 'keys.sync.id': 'first', |
20 | 20 | 'history.sync.push': 'first', |
21 | + 'history.obs.store': 'first', | |
21 | 22 | 'message.html.subject': 'first', |
22 | 23 | 'sbot.obs.localPeers': 'first', |
23 | 24 | 'translations.sync.strings': 'first', |
24 | 25 | 'unread.sync.isUnread': 'first' |
@@ -39,9 +40,23 @@ | ||
39 | 40 | }, |
40 | 41 | 'app.html.sideNav': sideNav, |
41 | 42 | }) |
42 | 43 | |
44 | + function isMatch (location) { | |
45 | + if (location.page) { | |
46 | + if (location.page.match(/^blog/)) return true | |
47 | + if (location.page.match(/^thread/)) return true | |
48 | + if (location.page.match(/^user/)) return true | |
49 | + } | |
50 | + if (location.key) { | |
51 | + return true | |
52 | + } | |
53 | + return false | |
54 | + } | |
55 | + | |
43 | 56 | function sideNav (location) { |
57 | + if (!isMatch(location)) return | |
58 | + | |
44 | 59 | const strings = api.translations.sync.strings() |
45 | 60 | const myKey = api.keys.sync.id() |
46 | 61 | |
47 | 62 | var nearby = api.sbot.obs.localPeers() |
app/page/blogShow.js | ||
---|---|---|
@@ -39,9 +39,9 @@ | ||
39 | 39 | |
40 | 40 | const { timeago, channel, markdown, compose } = api.message.html |
41 | 41 | |
42 | 42 | return h('Page -blogShow', [ |
43 | - api.app.html.sideNav({ page: 'discover' }), // HACK to highlight discover | |
43 | + api.app.html.sideNav({ page: 'blogShow' }), // HACK to highlight discover | |
44 | 44 | h('Scroller.content', [ |
45 | 45 | h('section.top', [ |
46 | 46 | api.app.html.topNav(location) |
47 | 47 | ]), |
Built with git-ssb-web