diff --git a/changes/changelog.d/419.enhancement b/changes/changelog.d/419.enhancement new file mode 100644 index 000000000..f4716b53e --- /dev/null +++ b/changes/changelog.d/419.enhancement @@ -0,0 +1 @@ +Favorites radio will not be visible if the user does not have any favorites (#419) \ No newline at end of file diff --git a/front/src/components/favorites/List.vue b/front/src/components/favorites/List.vue index d1bde0935..6402d417f 100644 --- a/front/src/components/favorites/List.vue +++ b/front/src/components/favorites/List.vue @@ -16,7 +16,7 @@ 1 favorite - +
@@ -115,7 +115,10 @@ export default { return { title: this.$pgettext('Head/Favorites/Title', 'Your Favorites') } - } + }, + hasFavorites () { + return this.$store.state.favorites.count > 0 + }, }, methods: { updateQueryString: function() { diff --git a/front/src/components/library/Radios.vue b/front/src/components/library/Radios.vue index 9b2f7bf82..9f59db514 100644 --- a/front/src/components/library/Radios.vue +++ b/front/src/components/library/Radios.vue @@ -10,7 +10,7 @@ Instance radios
- +
@@ -144,7 +144,13 @@ export default { searchPlaceholder, title } - } + }, + isAuthenticated () { + return this.$store.state.auth.authenticated + }, + hasFavorites () { + return this.$store.state.favorites.count > 0 + }, }, methods: { updateQueryString: _.debounce(function() {