Add header to show search term

This commit is contained in:
Robbie Antenesse 2019-09-16 12:47:47 -06:00
parent c4f657b7b4
commit 8a4d68b026
2 changed files with 10 additions and 2 deletions

View File

@ -31,6 +31,8 @@
},
"search": {
"header": "Search",
"loading": "Loading...",
"results_header": "Results for:",
"people_header": "People",
"series_header": "Series",
"books_header": "Books",

View File

@ -20,10 +20,16 @@ export const searchView = (state, emit, i18n) => {
html`<section>
<h1 class="title">${__('search.header')}</h1>
<article>
${controller.doneSearching ? null : html`<h2><i class="icon-loading animate-spin"></i></h2>`}
${controller.results.works < 1
<article>
<h2>
${controller.doneSearching
? html`<span>${__('search.results_header')}</span> <code>${controller.state.lastSearch}</code>`
: html`<i class="icon-loading animate-spin"></i> <span>${__('search.loading')}</span>`
}
</h2>
${!controller.doneSearching || controller.results.works < 1
? null
: [
html`<h2>${__('search.books_header')}</h2>`,