From 701e626d1855beecb16433dec5a2ec9076951aba Mon Sep 17 00:00:00 2001 From: fenn-cs Date: Sat, 18 Nov 2023 13:40:04 +0100 Subject: [PATCH] Move search result section to component & hide thumbnail if error The section that handles the search result list item is big and complex enough to have it's own component. Inside this component, a new method is added to hide the thumbnail preview if the image load errors out. Signed-off-by: fenn-cs Signed-off-by: nextcloud-command --- .../GlobalSearch/CustomDateRangeModal.vue | 2 +- .../components/GlobalSearch/SearchResult.vue | 168 ++++++++++++++++++ core/src/views/GlobalSearchModal.vue | 101 +---------- dist/core-global-search.js | 4 +- dist/core-global-search.js.map | 2 +- 5 files changed, 175 insertions(+), 102 deletions(-) create mode 100644 core/src/components/GlobalSearch/SearchResult.vue diff --git a/core/src/components/GlobalSearch/CustomDateRangeModal.vue b/core/src/components/GlobalSearch/CustomDateRangeModal.vue index 8effdcf0fe0..0ba6ddca015 100644 --- a/core/src/components/GlobalSearch/CustomDateRangeModal.vue +++ b/core/src/components/GlobalSearch/CustomDateRangeModal.vue @@ -5,7 +5,7 @@ :show.sync="isModalOpen" :size="'small'" :clear-view-delay="0" - :title="t('Custom date range')" + :title="t('core', 'Custom date range')" @close="closeModal">
diff --git a/core/src/components/GlobalSearch/SearchResult.vue b/core/src/components/GlobalSearch/SearchResult.vue new file mode 100644 index 00000000000..7647ca298ed --- /dev/null +++ b/core/src/components/GlobalSearch/SearchResult.vue @@ -0,0 +1,168 @@ + + + + + diff --git a/core/src/views/GlobalSearchModal.vue b/core/src/views/GlobalSearchModal.vue index a9d422e0ff8..d7e911c35fa 100644 --- a/core/src/views/GlobalSearchModal.vue +++ b/core/src/views/GlobalSearchModal.vue @@ -97,30 +97,7 @@ {{ providerResult.provider }}
    - - - - +