Skip to content

Commit

Permalink
add Academy link to HelpBubble and update text of other ones
Browse files Browse the repository at this point in the history
  • Loading branch information
magicznyleszek committed Jan 22, 2025
1 parent a72f2ef commit 5325029
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 8 deletions.
27 changes: 19 additions & 8 deletions jsapp/js/components/support/helpBubble.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -148,11 +148,9 @@ class HelpBubble extends React.Component<{}, HelpBubbleState> {
onClick={this.close.bind(this)}
>
<i className='k-icon k-icon-help-articles' />
<header>{t('KoboToolbox Help Center')}</header>
<header>{t('Help Center')}</header>
<p>
{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.')}
</p>
</bem.HelpBubble__rowAnchor>
)}
Expand All @@ -165,11 +163,24 @@ class HelpBubble extends React.Component<{}, HelpBubbleState> {
onClick={this.close.bind(this)}
>
<i className='k-icon k-icon-forum' />
<header>{t('KoboToolbox Community Forum')}</header>
<header>{t('Community Forum')}</header>
<p>
{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.')}
</p>
</bem.HelpBubble__rowAnchor>
)}

{envStore.isReady && envStore.data.academy_url && (
<bem.HelpBubble__rowAnchor
m='link'
target='_blank'
href={envStore.data.academy_url}
onClick={this.close.bind(this)}
>
<i className='k-icon k-icon-help-academy' />
<header>{t('KoboToolbox Academy')}</header>
<p>
{t('Enroll in an online self-paced course designed by Kobo staff experts.')}
</p>
</bem.HelpBubble__rowAnchor>
)}
Expand Down
3 changes: 3 additions & 0 deletions jsapp/js/envStore.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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[][];
Expand Down Expand Up @@ -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[] = [];
Expand Down Expand Up @@ -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;
Expand Down
1 change: 1 addition & 0 deletions jsapp/svg-icons/help-academy.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 5325029

Please sign in to comment.