diff options
author | fenn-cs <fenn25.fn@gmail.com> | 2023-11-28 10:05:07 +0100 |
---|---|---|
committer | Ferdinand Thiessen <opensource@fthiessen.de> | 2023-11-30 18:33:10 +0100 |
commit | 71d7a99a524a808e14b633d543823cb66d9844d0 (patch) | |
tree | 99a0cd0227c31a3db1961f324053133654468a9c /core/src | |
parent | fdaa6e7c951926c3e2f4669ee6bf5c511d7f22e7 (diff) | |
download | nextcloud-server-71d7a99a524a808e14b633d543823cb66d9844d0.tar.gz nextcloud-server-71d7a99a524a808e14b633d543823cb66d9844d0.zip |
Migrate openResult method to SearchResult component
After moving the `SearchResult` to its own component and leaving
out the openResult method, the search results do not lead anywhere but
but error out.
Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
Diffstat (limited to 'core/src')
-rw-r--r-- | core/src/components/GlobalSearch/SearchResult.vue | 7 | ||||
-rw-r--r-- | core/src/views/GlobalSearchModal.vue | 5 |
2 files changed, 6 insertions, 6 deletions
diff --git a/core/src/components/GlobalSearch/SearchResult.vue b/core/src/components/GlobalSearch/SearchResult.vue index 7647ca298ed..a35395922d1 100644 --- a/core/src/components/GlobalSearch/SearchResult.vue +++ b/core/src/components/GlobalSearch/SearchResult.vue @@ -2,7 +2,7 @@ <NcListItem class="result-items__item" :name="title" :bold="false" - @click="openResult(result)"> + @click="openResult(resourceUrl)"> <template #icon> <div aria-hidden="true" class="result-items__item-icon" @@ -91,6 +91,11 @@ export default { thumbnailErrorHandler() { this.thumbnailHasError = true }, + openResult(url) { + if (url) { + window.location = url + } + }, }, } </script> diff --git a/core/src/views/GlobalSearchModal.vue b/core/src/views/GlobalSearchModal.vue index e764800cfc2..74f0750c55e 100644 --- a/core/src/views/GlobalSearchModal.vue +++ b/core/src/views/GlobalSearchModal.vue @@ -348,11 +348,6 @@ export default { }) this.results = sortedResults }, - openResult(result) { - if (result.resourceUrl) { - window.location = result.resourceUrl - } - }, mapContacts(contacts) { return contacts.map(contact => { return { |