diff --git a/changes/changelog.d/892.add.placeholder.widget b/changes/changelog.d/892.add.placeholder.widget
new file mode 100644
index 000000000..31cf6e5b0
--- /dev/null
+++ b/changes/changelog.d/892.add.placeholder.widget
@@ -0,0 +1 @@
+Display placeholder on homepage when there are no playlists (#892)
diff --git a/front/src/components/playlists/PlaceholderWidget.vue b/front/src/components/playlists/PlaceholderWidget.vue
new file mode 100644
index 000000000..d72ab95fb
--- /dev/null
+++ b/front/src/components/playlists/PlaceholderWidget.vue
@@ -0,0 +1,18 @@
+
+
+
+
+
+
diff --git a/front/src/components/playlists/Widget.vue b/front/src/components/playlists/Widget.vue
index b018f9731..9cd1c1d16 100644
--- a/front/src/components/playlists/Widget.vue
+++ b/front/src/components/playlists/Widget.vue
@@ -9,7 +9,12 @@
-
+
+
+
+
+
+
@@ -17,6 +22,7 @@
import _ from '@/lodash'
import axios from 'axios'
import PlaylistCard from '@/components/playlists/Card'
+import PlaceholderWidget from '@/components/playlists/PlaceholderWidget'
export default {
props: {
@@ -24,7 +30,8 @@ export default {
url: {type: String, required: true}
},
components: {
- PlaylistCard
+ PlaylistCard,
+ PlaceholderWidget
},
data () {
return {
@@ -39,6 +46,11 @@ export default {
created () {
this.fetchData(this.url)
},
+ computed: {
+ playlistsExist: function () {
+ return this.objects.length > 0
+ }
+ },
methods: {
fetchData (url) {
if (!url) {