Files: 6e4c70b8d1f36db6aa1bba43786d168752b19240 / app / html / topNav / topNavAddressBook.js
665 bytesRaw
1 | const nest = require('depnest') |
2 | const { h } = require('mutant') |
3 | |
4 | exports.gives = nest('app.html.topNav') |
5 | |
6 | exports.needs = nest({ |
7 | 'translations.sync.strings': 'first' |
8 | }) |
9 | |
10 | exports.create = (api) => { |
11 | return nest('app.html.topNav', (location, input) => { |
12 | if (location.page !== 'addressBook') return |
13 | |
14 | const strings = api.translations.sync.strings() |
15 | |
16 | return h('TopNav -addressBook', [ |
17 | h('div.search', [ |
18 | h('i.fa.fa-search'), |
19 | h('input', { |
20 | placeholder: strings.addressBook.action.find[location.section], |
21 | autofocus: 'autofocus', |
22 | 'ev-input': e => input.set(e.target.value) |
23 | }) |
24 | ]) |
25 | ]) |
26 | }) |
27 | } |
28 |
Built with git-ssb-web