Browse Source

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>
pull/41785/head
fenn-cs 2 years ago
committed by nextcloud-command
parent
commit
00bb1bc86e
  1. 7
      core/src/components/GlobalSearch/SearchResult.vue
  2. 5
      core/src/views/GlobalSearchModal.vue
  3. 4
      dist/core-global-search.js
  4. 2
      dist/core-global-search.js.map

7
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>

5
core/src/views/GlobalSearchModal.vue

@ -349,11 +349,6 @@ export default {
})
this.results = sortedResults
},
openResult(result) {
if (result.resourceUrl) {
window.location = result.resourceUrl
}
},
mapContacts(contacts) {
return contacts.map(contact => {
return {

4
dist/core-global-search.js
File diff suppressed because it is too large
View File

2
dist/core-global-search.js.map
File diff suppressed because it is too large
View File

Loading…
Cancel
Save