From 8a4d68b02620f66abcd2a02a47f5998c7dfc7825 Mon Sep 17 00:00:00 2001 From: Robbie Antenesse Date: Mon, 16 Sep 2019 12:47:47 -0600 Subject: [PATCH] Add header to show search term --- app/i18n/locales/en.json | 2 ++ app/views/search/index.js | 10 ++++++++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/app/i18n/locales/en.json b/app/i18n/locales/en.json index 8ae26c2..6f45b28 100644 --- a/app/i18n/locales/en.json +++ b/app/i18n/locales/en.json @@ -31,6 +31,8 @@ }, "search": { "header": "Search", + "loading": "Loading...", + "results_header": "Results for:", "people_header": "People", "series_header": "Series", "books_header": "Books", diff --git a/app/views/search/index.js b/app/views/search/index.js index 79e8a58..10908e5 100644 --- a/app/views/search/index.js +++ b/app/views/search/index.js @@ -20,10 +20,16 @@ export const searchView = (state, emit, i18n) => { html`

${__('search.header')}

+
- ${controller.doneSearching ? null : html`

`} +

+ ${controller.doneSearching + ? html`${__('search.results_header')} ${controller.state.lastSearch}` + : html` ${__('search.loading')}` + } +

- ${controller.results.works < 1 + ${!controller.doneSearching || controller.results.works < 1 ? null : [ html`

${__('search.books_header')}

`,