From 5325029d438ab8d0c75a2b961fb994ecd661ce49 Mon Sep 17 00:00:00 2001 From: Leszek Date: Wed, 22 Jan 2025 15:50:11 +0100 Subject: [PATCH] add Academy link to HelpBubble and update text of other ones --- jsapp/js/components/support/helpBubble.tsx | 27 +++++++++++++++------- jsapp/js/envStore.ts | 3 +++ jsapp/svg-icons/help-academy.svg | 1 + 3 files changed, 23 insertions(+), 8 deletions(-) create mode 100644 jsapp/svg-icons/help-academy.svg diff --git a/jsapp/js/components/support/helpBubble.tsx b/jsapp/js/components/support/helpBubble.tsx index 87372726b3..6b2dc32140 100644 --- a/jsapp/js/components/support/helpBubble.tsx +++ b/jsapp/js/components/support/helpBubble.tsx @@ -148,11 +148,9 @@ class HelpBubble extends React.Component<{}, HelpBubbleState> { onClick={this.close.bind(this)} > -
{t('KoboToolbox Help Center')}
+
{t('Help Center')}

- {t( - 'A vast collection of user support articles and tutorials related to Kobo' - )} + {t('Find answers in our extensive library of user support articles and tutorials.')}

)} @@ -165,11 +163,24 @@ class HelpBubble extends React.Component<{}, HelpBubbleState> { onClick={this.close.bind(this)} > -
{t('KoboToolbox Community Forum')}
+
{t('Community Forum')}

- {t( - 'Post your questions to get answers from experienced Kobo users around the world' - )} + {t('Connect with thousands of KoboToolbox users, ask questions, and share ideas.')} +

+ + )} + + {envStore.isReady && envStore.data.academy_url && ( + + +
{t('KoboToolbox Academy')}
+

+ {t('Enroll in an online self-paced course designed by Kobo staff experts.')}

)} diff --git a/jsapp/js/envStore.ts b/jsapp/js/envStore.ts index 23621c92a2..03eea05bca 100644 --- a/jsapp/js/envStore.ts +++ b/jsapp/js/envStore.ts @@ -13,6 +13,7 @@ export interface EnvironmentResponse { support_email: string; support_url: string; community_url: string; + academy_url: string; project_metadata_fields: EnvStoreFieldItem[]; user_metadata_fields: UserMetadataField[]; sector_choices: string[][]; @@ -101,6 +102,7 @@ export class EnvStoreData { public support_email = ''; public support_url = ''; public community_url = ''; + public academy_url = ''; public min_retry_time = 4; // seconds public max_retry_time: number = 4 * 60; // seconds public project_metadata_fields: EnvStoreFieldItem[] = []; @@ -210,6 +212,7 @@ class EnvStore { this.data.support_email = response.support_email; this.data.support_url = response.support_url; this.data.community_url = response.community_url; + this.data.academy_url = response.academy_url; this.data.min_retry_time = response.frontend_min_retry_time; this.data.max_retry_time = response.frontend_max_retry_time; this.data.project_metadata_fields = response.project_metadata_fields; diff --git a/jsapp/svg-icons/help-academy.svg b/jsapp/svg-icons/help-academy.svg new file mode 100644 index 0000000000..086ba606dd --- /dev/null +++ b/jsapp/svg-icons/help-academy.svg @@ -0,0 +1 @@ + \ No newline at end of file