From 21325a014de5627b96cb27b9d139a4e1584cf51e Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 29 Nov 2021 09:31:39 +0100 Subject: [PATCH 1/7] Handle tzinfo being absent Closes #962 Signed-off-by: Thomas Citharel --- lib/service/timezone_detector.ex | 3 +++ 1 file changed, 3 insertions(+) diff --git a/lib/service/timezone_detector.ex b/lib/service/timezone_detector.ex index 91d002b9f..4ca534a7f 100644 --- a/lib/service/timezone_detector.ex +++ b/lib/service/timezone_detector.ex @@ -18,6 +18,9 @@ defmodule Mobilizon.Service.TimezoneDetector do {:error, :time_zone_not_found} -> fallback + + {:error, :enoent} -> + fallback end end From 3fb0265d2d0bd172b37e2053d1e3cadf6b358abe Mon Sep 17 00:00:00 2001 From: Thomas Citharel Date: Mon, 29 Nov 2021 09:50:26 +0100 Subject: [PATCH 2/7] Refresh loggeduser information before the final step of onboarding Otherwise we endup in a loop Closes #964 Signed-off-by: Thomas Citharel --- js/src/components/NavBar.vue | 5 +++++ js/src/views/Home.vue | 3 ++- js/src/views/User/SettingsOnboard.vue | 9 ++++++++- 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/js/src/components/NavBar.vue b/js/src/components/NavBar.vue index 8034e3f1c..e0bfbe69c 100644 --- a/js/src/components/NavBar.vue +++ b/js/src/components/NavBar.vue @@ -272,6 +272,11 @@ export default class NavBar extends Vue { // If we don't have any identities, the user has validated their account, // is logging for the first time but didn't create an identity somehow if (this.identities.length === 0) { + console.debug( + "We have no identities listed for current user", + this.identities + ); + console.debug("Pushing route to REGISTER_PROFILE"); try { await this.$router.push({ name: RouteName.REGISTER_PROFILE, diff --git a/js/src/views/Home.vue b/js/src/views/Home.vue index 7af4b9dcd..49a0eff56 100644 --- a/js/src/views/Home.vue +++ b/js/src/views/Home.vue @@ -406,7 +406,6 @@ import Subtitle from "../components/Utils/Subtitle.vue"; DateComponent, EventParticipationCard, MultiCard, - "settings-onboard": () => import("./User/SettingsOnboard.vue"), }, metaInfo() { return { @@ -569,7 +568,9 @@ export default class Home extends Vue { @Watch("loggedUser") detectEmptyUserSettings(loggedUser: IUser): void { + console.debug("Try to detect empty user settings", loggedUser); if (loggedUser?.id && loggedUser?.settings === null) { + console.debug("No user settings, pushing to onboarding assistant"); this.$router.push({ name: RouteName.WELCOME_SCREEN, params: { step: "1" }, diff --git a/js/src/views/User/SettingsOnboard.vue b/js/src/views/User/SettingsOnboard.vue index d0920768d..f5ef580b6 100644 --- a/js/src/views/User/SettingsOnboard.vue +++ b/js/src/views/User/SettingsOnboard.vue @@ -49,7 +49,8 @@