Openverse is a search engine for openly-licensed media. This monorepo includes all application code.
Prevent hiding and reappearing of 'Load more' button and meta search (#1546)
Dhruv Bhanushalicede054dfb3f
diff --git a/src/components/VLoadMore.vue b/src/components/VLoadMore.vueindex 442e0669d..741ec6f8e 100644--- a/src/components/VLoadMore.vue+++ b/src/components/VLoadMore.vue@@ -1,9 +1,9 @@<template><VButton- v-show="canLoadMore"+ v-show="!endOfResults"size="large"variant="full"- :disabled="isFetching"+ :disabled="!canLoadMore || isFetching"data-testid="load-more"@click="onLoadMore">@@ -43,14 +43,20 @@ export default defineComponent({})}const isFetching = computed(() => mediaStore.fetchState.isFetching)+ const endOfResults = computed(+ () => !(canLoadMore.value || isFetching.value)+ )- const buttonLabel = computed(() => i18n.t('browse-page.load'))+ const buttonLabel = computed(() =>+ i18n.t(`browse-page.${isFetching.value ? 'loading' : 'load'}`)+ )return {buttonLabel,isFetching,onLoadMore,canLoadMore,+ endOfResults,}},})diff --git a/src/components/VSearchGrid.vue b/src/components/VSearchGrid.vueindex fcec1f9b1..ee18147a4 100644--- a/src/components/VSearchGrid.vue+++ b/src/components/VSearchGrid.vue@@ -19,7 +19,6 @@<slot name="media" /><VMetaSearchForm- v-if="!fetchState.isFetching":type="metaSearchFormType":has-no-results="hasNoResults":query="query"diff --git a/src/locales/en.json b/src/locales/en.jsonindex f296c6d57..13bb1f774 100644--- a/src/locales/en.json+++ b/src/locales/en.json@@ -370,6 +370,7 @@"all-result-count": "{localeCount} result|{localeCount} results","all-result-count-more": "Over {localeCount} result|Over {localeCount} results","load": "Load more results",+ "loading": "Loading...","fetching-error": "Error fetching {type}:","search-rating": {"content": "Are these results relevant?",