From 5abb89c39e1d8a7fba6ee11813dac839f72af57a Mon Sep 17 00:00:00 2001 From: Chocobozzz Date: Thu, 19 Sep 2019 11:42:04 +0200 Subject: [PATCH] Add message on no result --- src/components/InstancesList.vue | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/src/components/InstancesList.vue b/src/components/InstancesList.vue index 28c71fc..b296d95 100644 --- a/src/components/InstancesList.vue +++ b/src/components/InstancesList.vue @@ -115,10 +115,12 @@ -
-
- Sorry, but we cannot fetch the instances list. Please retry later. -
+
+ Sorry, but we cannot fetch the instances list. Please retry later. +
+ +
+ Sorry, but we did not find any instance matching your filters.
@@ -252,6 +254,7 @@ data () { return { error: false, + noResults: false, instances: [], translatedThemes: { @@ -373,6 +376,8 @@ }, fetchInstances () { + this.noResults = false + const params = { start: 0, count: 250, @@ -394,6 +399,8 @@ axios('https://instances.joinpeertube.org/api/v1/instances', options) .then(response => { this.instances = this.shuffle(response.data.data) + + if (this.instances.length === 0) this.noResults = true }) .catch(err => { console.error(err)