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