git ssb

2+

mixmix / ticktack



Commit ff9a800eba7a7ee2f4a807f80c33afa4fa798fa2

implement < Discovery as a back button

mix irving committed on 12/3/2017, 2:46:14 AM
Parent: 930a234f8e8c982d1f957647399cb38c7eae3dba

Files changed

app/html/blogNav.jschanged
app/html/blogNav.jsView
@@ -5,15 +5,17 @@
55 exports.gives = nest('app.html.blogNav')
66
77 exports.needs = nest({
88 'history.sync.push': 'first',
9+ 'history.sync.back': 'first',
910 'translations.sync.strings': 'first',
1011 })
1112
1213 exports.create = (api) => {
1314 return nest('app.html.blogNav', (location) => {
1415 const strings = api.translations.sync.strings()
1516 const goTo = (loc) => () => api.history.sync.push(loc)
17+ const back = () => api.history.sync.back()
1618
1719 if (location.page === 'blogIndex' || location.page === 'blogSearch') {
1820 return h('BlogNav', [
1921 h('div.left', [
@@ -33,9 +35,9 @@
3335 }
3436
3537 return h('BlogNav', [
3638 h('div.left', [
37- h('div.-discovery', { 'ev-click': goTo({ page: 'blogIndex' }) }, [
39+ h('div.-discovery', { 'ev-click': back }, [
3840 h('i.fa.fa-chevron-left'),
3941 strings.blogIndex.title
4042 ]),
4143 ]),

Built with git-ssb-web