From 910cae8562aee7b182e6de322f516a533c6aa818 Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Thu, 10 Jun 2021 10:31:05 +0200 Subject: [PATCH] Hide
on home if no elements above Signed-off-by: Thomas Citharel --- js/src/views/Home.vue | 28 +++++++++++++++++++++------- 1 file changed, 21 insertions(+), 7 deletions(-) diff --git a/js/src/views/Home.vue b/js/src/views/Home.vue index f9581114c..fa743a7e9 100644 --- a/js/src/views/Home.vue +++ b/js/src/views/Home.vue @@ -189,10 +189,7 @@ }} -
+

{{ $t("Your upcoming events") }}

@@ -236,7 +233,7 @@
-
+

{{ $t("Last week") }}

@@ -250,7 +247,7 @@
-
+

{{ $t("Events nearby") }}

@@ -285,7 +282,12 @@
-
+

{{ $t("Last published events") }} @@ -586,6 +588,18 @@ export default class Home extends Vue { }); } } + + get canShowMyUpcomingEvents(): boolean { + return this.currentActor.id != undefined && this.goingToEvents.size > 0; + } + + get canShowLastWeekEvents(): boolean { + return this.currentActor && this.lastWeekEvents.length > 0; + } + + get canShowCloseEvents(): boolean { + return this.closeEvents.total > 0; + } }