Skip to content

Commit

Permalink
feat: add empty state on loChaList #114
Browse files Browse the repository at this point in the history
  • Loading branch information
wazolab committed Dec 9, 2024
1 parent 4ea504b commit a0ceb90
Show file tree
Hide file tree
Showing 5 changed files with 21 additions and 2 deletions.
13 changes: 12 additions & 1 deletion components/LoChaList.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ function scrollLoad() {
</script>

<template>
<div>
<div v-if="loChas.length">
<el-space v-infinite-scroll="scrollLoad" fill :size="20">
<lo-cha-item
v-for="(loCha, index) in lazyLoChas"
Expand All @@ -50,4 +50,15 @@ function scrollLoad() {

<iframe name="hidden_josm_target" style="display: none" />
</div>
<el-empty
v-else
:description="$t('loChas.noData')"
:image-size="50"
>
<nuxt-link to="/">
<el-button type="info">
{{ $t('app.back') }}
</el-button>
</nuxt-link>
</el-empty>
</template>
3 changes: 3 additions & 0 deletions locales/en.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ export default {
tags_more: '(and more)',
validate_selection: 'Validate all filtered',
},
loChas: {
noData: 'No group of data',
},
project: {
control: 'Control',
details: 'Details',
Expand Down
3 changes: 3 additions & 0 deletions locales/es.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ export default {
tags_more: '(y mas)',
validate_selection: 'Validar objetos filtrados',
},
loChas: {
noData: 'Ningún grupo de datos',
},
project: {
control: 'Control',
details: 'Detalle',
Expand Down
3 changes: 3 additions & 0 deletions locales/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ export default {
tags_more: '(et plus)',
validate_selection: 'Valider les objets filtrés',
},
loChas: {
noData: 'Aucun groupe de données',
},
project: {
control: 'Contrôle',
details: 'Détails',
Expand Down
1 change: 0 additions & 1 deletion pages/[project]/changes_logs.vue
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,6 @@ function matchFilterBySelectors(selectors: string[]) {
<li>{{ $t('logs.data_details_manual') }}</li>
</ul>
<lo-cha-list
v-if="loChas?.length"
:project-slug="projectSlug"
:lo-chas="loChasWithFilter"
@accept="handleAccept([$event])"
Expand Down

0 comments on commit a0ceb90

Please sign in to comment.