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) {
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
},
},
}