mirror of
				https://gitlab.com/Alamantus/Readlebee.git
				synced 2025-11-04 02:07:11 +01:00 
			
		
		
		
	Add header to show search term
This commit is contained in:
		
							parent
							
								
									c4f657b7b4
								
							
						
					
					
						commit
						8a4d68b026
					
				
					 2 changed files with 10 additions and 2 deletions
				
			
		| 
						 | 
				
			
			@ -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>`}
 | 
			
		||||
        <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.results.works < 1
 | 
			
		||||
        ${!controller.doneSearching || controller.results.works < 1
 | 
			
		||||
        ? null
 | 
			
		||||
        : [
 | 
			
		||||
          html`<h2>${__('search.books_header')}</h2>`,
 | 
			
		||||
| 
						 | 
				
			
			
 | 
			
		|||
		Loading…
	
	Add table
		
		Reference in a new issue