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