Skip to content

Commit

Permalink
fix: show no results found message when filtering yields no results (#…
Browse files Browse the repository at this point in the history
…103)

* fix: show no results found message when filtering yields no results

* fix: add german translations

* refactor: only switch text instead of whole div
  • Loading branch information
jfrer authored Oct 22, 2024
1 parent edc396b commit ab3064b
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 3 deletions.
5 changes: 4 additions & 1 deletion src/components/workflows/WorkflowsTimeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,10 @@ watch(selectedMetric,
<TimelineItem v-for="gt in sortedGtList" :key="gt.id" :gt="gt" :metric="selectedMetricValue" />
</template>
<template v-else-if="workflowsStore.gt.length > 0 ">
<div class="my-6">{{ $t('no_documents_selected') }}</div>
<div class="my-6">
<span v-if="filtersStore.gt.length > 0">{{ t('no_results_found') }}</span>
<span v-else>{{ t('no_documents_selected') }}</span>
</div>
</template>
<template v-else>
<div class="my-6">{{ $t('error_please_try_again_later') }}</div>
Expand Down
3 changes: 2 additions & 1 deletion src/locales/de.json
Original file line number Diff line number Diff line change
Expand Up @@ -101,5 +101,6 @@
"no_labelling": "Keine Kennzeichnung",
"select_ground_truth": "Ground Truth auswählen",
"filter_by": "Filtern nach",
"metric": "Metric"
"metric": "Metrik",
"no_results_found": "Keine Ergebnisse gefunden."
}
3 changes: 2 additions & 1 deletion src/locales/en.json
Original file line number Diff line number Diff line change
Expand Up @@ -96,5 +96,6 @@
"no_labelling": "No labelling",
"select_ground_truth": "Select Ground Truth",
"filter_by": "Filter by",
"metric": "Metric"
"metric": "Metric",
"no_results_found": "No results found."
}

0 comments on commit ab3064b

Please sign in to comment.