forked from gristlabs/grist-core
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Arnaud Peich
committed
Oct 28, 2022
1 parent
ac7658d
commit 19b2903
Showing
5 changed files
with
28 additions
and
29 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,51 +1,53 @@ | ||
import {makeT} from 'app/client/lib/localization' | ||
|
||
const t = makeT('ExampleInfo'); | ||
|
||
export interface IExampleInfo { | ||
id: number; | ||
urlId: string; | ||
title: KeyAndContext; | ||
title: string; | ||
imgUrl: string; | ||
tutorialUrl: string; | ||
welcomeCard: WelcomeCard; | ||
} | ||
|
||
interface WelcomeCard { | ||
title: KeyAndContext; | ||
text: KeyAndContext; | ||
tutorialName: KeyAndContext; | ||
title: string; | ||
text: string; | ||
tutorialName: string; | ||
} | ||
|
||
type KeyAndContext = [string, Record<string, string>]; | ||
|
||
export const examples: IExampleInfo[] = [{ | ||
export const buildExamples = (): IExampleInfo[] => [{ | ||
id: 1, // Identifies the example in UserPrefs.seenExamples | ||
urlId: 'lightweight-crm', | ||
title: ['Title', {context: "CRM"}], | ||
title: t('Title', {context: "CRM"}), | ||
imgUrl: 'https://www.getgrist.com/themes/grist/assets/images/use-cases/lightweight-crm.png', | ||
tutorialUrl: 'https://support.getgrist.com/lightweight-crm/', | ||
welcomeCard: { | ||
title: ['WelcomeTitle', {context: "CRM"}], | ||
text: ['WelcomeText', {context: "CRM"}], | ||
tutorialName: ['WelcomeTutorialName', {context: "CRM"}], | ||
title: t('WelcomeTitle', {context: "CRM"}), | ||
text: t('WelcomeText', {context: "CRM"}), | ||
tutorialName: t('WelcomeTutorialName', {context: "CRM"}), | ||
}, | ||
}, { | ||
id: 2, // Identifies the example in UserPrefs.seenExamples | ||
urlId: 'investment-research', | ||
title: ['Title', {context: "investmentResearch"}], | ||
title: t('Title', {context: "investmentResearch"}), | ||
imgUrl: 'https://www.getgrist.com/themes/grist/assets/images/use-cases/data-visualization.png', | ||
tutorialUrl: 'https://support.getgrist.com/investment-research/', | ||
welcomeCard: { | ||
title: ['WelcomeTitle', {context: "investmentResearch"}], | ||
text: ['WelcomeText', {context: "investmentResearch"}], | ||
tutorialName: ['WelcomeTutorialName', {context: "investmentResearch"}], | ||
title: t('WelcomeTitle', {context: "investmentResearch"}), | ||
text: t('WelcomeText', {context: "investmentResearch"}), | ||
tutorialName: t('WelcomeTutorialName', {context: "investmentResearch"}), | ||
}, | ||
}, { | ||
id: 3, // Identifies the example in UserPrefs.seenExamples | ||
urlId: 'afterschool-program', | ||
title: ['Title', {context: "afterschool"}], | ||
title: t('Title', {context: "afterschool"}), | ||
imgUrl: 'https://www.getgrist.com/themes/grist/assets/images/use-cases/business-management.png', | ||
tutorialUrl: 'https://support.getgrist.com/afterschool-program/', | ||
welcomeCard: { | ||
title: ['WelcomeTitle', {context: "afterschool"}], | ||
text: ['WelcomeText', {context: "afterschool"}], | ||
tutorialName: ['WelcomeTutorialName', {context: "afterschool"}], | ||
title: t('WelcomeTitle', {context: "afterschool"}), | ||
text: t('WelcomeText', {context: "afterschool"}), | ||
tutorialName: t('WelcomeTutorialName', {context: "afterschool"}), | ||
}, | ||
}]; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters