diff --git a/web/src/routes/+page.svelte b/web/src/routes/+page.svelte index 92ea588..4842ffc 100644 --- a/web/src/routes/+page.svelte +++ b/web/src/routes/+page.svelte @@ -285,107 +285,134 @@ -
-
+
+ +
- - -
-
- - +
+ + +
+
+ + +
-
-
+
- -
+ +
-
- - {#if searchResult && searchResult.facet_counts && searchResult.facet_counts.length > 0} -
- {#each searchResult.facet_counts as facet} - {#if facet.field_name === 'tags' || facet.field_name === 'created_date'} - - {/if} - {/each} -
- {/if} - - -
- {#if isLoading} -

{$_('loading')}

- {:else if searchResult && searchResult.hits.length > 0} - {#if searchResult['search_time_ms'] > 0} -

- {$_('searchSummary', { values: { - found: searchResult['found'].toLocaleString(), - outOf: searchResult['out_of'].toLocaleString(), - time: searchResult['search_time_ms'] - }})} -

- {/if} -
- {#each searchResult.hits as hit, index} - - -
openModal(index)} - > -
-

- {getEntityTitle(hit.document)} -

-

- {formatDistanceToNow(new Date(hit.document.file_created_at * 1000), { - addSuffix: true - })} -

-
-
- +
+
+ + {#if searchResult && searchResult.facet_counts && searchResult.facet_counts.length > 0} +
+ {#each searchResult.facet_counts as facet} + {#if facet.field_name === 'tags' || facet.field_name === 'created_date'} + - {#if getAppName(hit.document) !== "unknown"} -
- - {getAppName(hit.document)} + {/if} + {/each} +
+ {/if} + + +
+ {#if isLoading} +

{$_('loading')}

+ {:else if searchResult && searchResult.hits.length > 0} + {#if searchResult['search_time_ms'] > 0} +

+ {$_('searchSummary', { values: { + found: searchResult['found'].toLocaleString(), + outOf: searchResult['out_of'].toLocaleString(), + time: searchResult['search_time_ms'] + }})} +

+ {/if} +
+ {#each searchResult.hits as hit, index} + + +
openModal(index)} + > +
+

+ {getEntityTitle(hit.document)} +

+

+ {formatDistanceToNow(new Date(hit.document.file_created_at * 1000), { + addSuffix: true + })} +

- {/if} -
+
+ + {#if getAppName(hit.document) !== "unknown"} +
+ + {getAppName(hit.document)} +
+ {/if} +
+
+ {/each}
- {/each} + {:else if searchString} +

{$_('noResults')}

+ {:else} +

+ {/if}
- {:else if searchString} -

{$_('noResults')}

- {:else} -

- {/if} -
+ + + + + {#if searchResult && searchResult.hits.length && showModal} @@ -408,17 +435,3 @@ openModal((selectedImage - 1 + searchResult.hits.length) % searchResult.hits.length)} /> {/if} - -