Skip to content

Commit

Permalink
Check in-app search availability
Browse files Browse the repository at this point in the history
Only show in-app serach button if available for specific app
 in question.

Signed-off-by: fenn-cs <fenn25.fn@gmail.com>
Signed-off-by: nextcloud-command <nextcloud-command@users.noreply.github.com>
  • Loading branch information
Fenn-CS authored and nextcloud-command committed Nov 14, 2023
1 parent 04f2a19 commit 987ac1e
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 6 deletions.
7 changes: 4 additions & 3 deletions core/src/views/GlobalSearchModal.vue
Original file line number Diff line number Diff line change
Expand Up @@ -124,13 +124,13 @@
</ul>
<div class="result-footer">
<NcButton type="tertiary-no-background" @click="loadMoreResultsForProvider(providerResult.id)">
Load more results
{{ t('core', 'Load more results') }}
<template #icon>
<DotsHorizontalIcon :size="20" />
</template>
</NcButton>
<NcButton alignment="end-reverse" type="tertiary-no-background">
Search in {{ providerResult.provider }}
<NcButton v-if="providerResult.inAppSearch" alignment="end-reverse" type="tertiary-no-background">
{{ t('core', 'Search in') }} {{ providerResult.provider }}
<template #icon>
<ArrowRight :size="20" />
</template>
Expand Down Expand Up @@ -288,6 +288,7 @@ export default {
newResults.push({
id: provider.id,
provider: provider.name,
inAppSearch: provider.inAppSearch,
results: response.data.ocs.data.entries,
})
Expand Down
4 changes: 2 additions & 2 deletions dist/core-global-search.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dist/core-global-search.js.map

Large diffs are not rendered by default.

0 comments on commit 987ac1e

Please sign in to comment.