From 745ffdab2d2a6a40ebcd8ab40cd3acc7abcdd020 Mon Sep 17 00:00:00 2001 From: Noel De Martin Date: Mon, 12 Dec 2022 10:04:52 +0100 Subject: [PATCH] MOBILE-4081 login: Change get started url MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-authored-by: Pau Ferrer OcaƱa --- src/core/features/login/components/site-help/site-help.ts | 6 +++--- .../login/components/site-onboarding/site-onboarding.ts | 4 ++-- src/core/features/login/services/login-helper.ts | 2 ++ 3 files changed, 7 insertions(+), 5 deletions(-) diff --git a/src/core/features/login/components/site-help/site-help.ts b/src/core/features/login/components/site-help/site-help.ts index fe3f42bf0..35cf48cd6 100644 --- a/src/core/features/login/components/site-help/site-help.ts +++ b/src/core/features/login/components/site-help/site-help.ts @@ -16,7 +16,7 @@ import { Component } from '@angular/core'; import { CoreUtils } from '@services/utils/utils'; import { ModalController, Translate } from '@singletons'; -import { CoreLoginHelperProvider } from '@features/login/services/login-helper'; +import { CoreLoginHelperProvider, GET_STARTED_URL } from '@features/login/services/login-helper'; /** * Component that displays help to connect to a site. @@ -34,12 +34,12 @@ export class CoreLoginSiteHelpComponent { canScanQR: boolean; constructor() { + const getStartedTitle = Translate.instant('core.login.faqsetupsitelinktitle'); this.canScanQR = CoreUtils.canScanQR(); this.urlImageHtml = CoreLoginHelperProvider.FAQ_URL_IMAGE_HTML; this.qrCodeImageHtml = CoreLoginHelperProvider.FAQ_QRCODE_IMAGE_HTML; - this.setupLinkHtml = 'https://moodle.com/getstarted/'; + this.setupLinkHtml = `${GET_STARTED_URL}`; } /** diff --git a/src/core/features/login/components/site-onboarding/site-onboarding.ts b/src/core/features/login/components/site-onboarding/site-onboarding.ts index 3a15a6f03..b80736975 100644 --- a/src/core/features/login/components/site-onboarding/site-onboarding.ts +++ b/src/core/features/login/components/site-onboarding/site-onboarding.ts @@ -16,7 +16,7 @@ import { Component } from '@angular/core'; import { CoreConfig } from '@services/config'; import { CoreUtils } from '@services/utils/utils'; -import { CoreLoginHelperProvider } from '@features/login/services/login-helper'; +import { CoreLoginHelperProvider, GET_STARTED_URL } from '@features/login/services/login-helper'; import { ModalController } from '@singletons'; /** @@ -79,7 +79,7 @@ export class CoreLoginSiteOnboardingComponent { this.saveOnboardingDone(); - CoreUtils.openInBrowser('https://moodle.com/getstarted/', { showBrowserWarning: false }); + CoreUtils.openInBrowser(GET_STARTED_URL, { showBrowserWarning: false }); ModalController.dismiss(); } diff --git a/src/core/features/login/services/login-helper.ts b/src/core/features/login/services/login-helper.ts index 153bbe1d0..cee8bec6a 100644 --- a/src/core/features/login/services/login-helper.ts +++ b/src/core/features/login/services/login-helper.ts @@ -43,6 +43,8 @@ import { CoreLoginError } from '@classes/errors/loginerror'; const PASSWORD_RESETS_CONFIG_KEY = 'password-resets'; +export const GET_STARTED_URL = 'https://moodle.com'; + /** * Helper provider that provides some common features regarding authentication. */