From d0fe3006bc9aabbb13c2ef7510b3f08b0b6a69d8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Wolfgang=20Hu=C3=9F?= Date: Thu, 1 Jun 2023 17:11:05 +0200 Subject: [PATCH] Update webapp/components/FilterMenu/OrderByFilter.vue Co-authored-by: Hannes Heine --- .../components/FilterMenu/OrderByFilter.vue | 20 +++---------------- 1 file changed, 3 insertions(+), 17 deletions(-) diff --git a/webapp/components/FilterMenu/OrderByFilter.vue b/webapp/components/FilterMenu/OrderByFilter.vue index 799b5e199..5670669a9 100644 --- a/webapp/components/FilterMenu/OrderByFilter.vue +++ b/webapp/components/FilterMenu/OrderByFilter.vue @@ -63,28 +63,14 @@ export default { } }, buttonTitle(buttonType) { - let title switch (buttonType) { case 'asc': - if (this.orderedByCreationDate) { - title = this.$t('filter-menu.order.oldest.hint') - } else { - title = this.$t('filter-menu.order.last.hint') - } - break + return this.orderedByCreationDate ? this.$t('filter-menu.order.oldest.hint') : this.$t('filter-menu.order.last.hint') case 'desc': - if (this.orderedByCreationDate) { - title = this.$t('filter-menu.order.newest.hint') - } else { - title = this.$t('filter-menu.order.next.hint') - } - break - + return this.orderedByCreationDate ? this.$t('filter-menu.order.newest.hint') : this.$t('filter-menu.order.next.hint') default: - title = '' - break + return '' } - return title }, }, }