Add header to show search term
This commit is contained in:
parent
c4f657b7b4
commit
8a4d68b026
|
@ -31,6 +31,8 @@
|
|||
},
|
||||
"search": {
|
||||
"header": "Search",
|
||||
"loading": "Loading...",
|
||||
"results_header": "Results for:",
|
||||
"people_header": "People",
|
||||
"series_header": "Series",
|
||||
"books_header": "Books",
|
||||
|
|
|
@ -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>`,
|
||||
|
|
Loading…
Reference in New Issue