Update webapp/components/FilterMenu/OrderByFilter.vue

Co-authored-by: Hannes Heine <heine.hannes@gmail.com>
This commit is contained in:
Wolfgang Huß 2023-06-01 17:11:05 +02:00 committed by mahula
parent 203b809294
commit 87c47bc83d

View File

@ -63,28 +63,14 @@ export default {
} }
}, },
buttonTitle(buttonType) { buttonTitle(buttonType) {
let title
switch (buttonType) { switch (buttonType) {
case 'asc': case 'asc':
if (this.orderedByCreationDate) { return this.orderedByCreationDate ? this.$t('filter-menu.order.oldest.hint') : this.$t('filter-menu.order.last.hint')
title = this.$t('filter-menu.order.oldest.hint')
} else {
title = this.$t('filter-menu.order.last.hint')
}
break
case 'desc': case 'desc':
if (this.orderedByCreationDate) { return this.orderedByCreationDate ? this.$t('filter-menu.order.newest.hint') : this.$t('filter-menu.order.next.hint')
title = this.$t('filter-menu.order.newest.hint')
} else {
title = this.$t('filter-menu.order.next.hint')
}
break
default: default:
title = '' return ''
break
} }
return title
}, },
}, },
} }