From d57d9dd3e8597ba28b5e275f887831e0df3d8a70 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Milo=C5=A1=20Paunovi=C4=87?= Date: Thu, 8 Aug 2024 16:31:36 +0200 Subject: [PATCH] fix(ui): graciously handle situation with no tutorial flows loaded (#4609) --- ui/src/components/layout/TopNavBar.vue | 3 ++- ui/src/components/onboarding/VueTour.vue | 23 ++++++++++++----------- ui/src/stores/core.js | 15 ++++++++++++--- ui/src/translations/en.json | 1 + ui/src/translations/fr.json | 1 + 5 files changed, 28 insertions(+), 15 deletions(-) diff --git a/ui/src/components/layout/TopNavBar.vue b/ui/src/components/layout/TopNavBar.vue index a1d037c1ba..370ff216d0 100644 --- a/ui/src/components/layout/TopNavBar.vue +++ b/ui/src/components/layout/TopNavBar.vue @@ -124,6 +124,7 @@ }, computed: { ...mapState("api", ["version"]), + ...mapState("core", ["tutorialFlows"]), ...mapGetters("core", ["guidedProperties"]), ...mapGetters("auth", ["user"]), displayNavBar() { @@ -131,7 +132,7 @@ }, tourEnabled(){ // Temporary solution to not showing the tour menu item for EE - return !Object.keys(this.user).length + return this.tutorialFlows?.length && !Object.keys(this.user).length } }, methods: { diff --git a/ui/src/components/onboarding/VueTour.vue b/ui/src/components/onboarding/VueTour.vue index b83a0059d0..f2c050970d 100644 --- a/ui/src/components/onboarding/VueTour.vue +++ b/ui/src/components/onboarding/VueTour.vue @@ -27,7 +27,7 @@
- +