mirror of
https://github.com/gristlabs/grist-core.git
synced 2026-03-02 04:09:24 +00:00
feat: ADD Terms of service link (#985)
Adds an optional terms of service link for sites that need it. --------- Co-authored-by: Jonathan Perret <j-github@jonathanperret.net>
This commit is contained in:
@@ -91,6 +91,7 @@ export const commonUrls = {
|
||||
helpAPI: 'https://support.getgrist.com/api',
|
||||
freeCoachingCall: getFreeCoachingCallUrl(),
|
||||
contactSupport: getContactSupportUrl(),
|
||||
termsOfService: getTermsOfServiceUrl(),
|
||||
plans: "https://www.getgrist.com/pricing",
|
||||
sproutsProgram: "https://www.getgrist.com/sprouts-program",
|
||||
contact: "https://www.getgrist.com/contact",
|
||||
@@ -689,6 +690,9 @@ export interface GristLoadConfig {
|
||||
// Url for support for the browser client to use.
|
||||
helpCenterUrl?: string;
|
||||
|
||||
// Url for terms of service for the browser client to use
|
||||
termsOfServiceUrl?: string;
|
||||
|
||||
// Url for free coaching call scheduling for the browser client to use.
|
||||
freeCoachingCallUrl?: string;
|
||||
|
||||
@@ -900,6 +904,15 @@ export function getHelpCenterUrl(): string {
|
||||
}
|
||||
}
|
||||
|
||||
export function getTermsOfServiceUrl(): string|undefined {
|
||||
if(isClient()) {
|
||||
const gristConfig: GristLoadConfig = (window as any).gristConfig;
|
||||
return gristConfig && gristConfig.termsOfServiceUrl || undefined;
|
||||
} else {
|
||||
return process.env.GRIST_TERMS_OF_SERVICE_URL || undefined;
|
||||
}
|
||||
}
|
||||
|
||||
export function getFreeCoachingCallUrl(): string {
|
||||
const defaultUrl = "https://calendly.com/grist-team/grist-free-coaching-call";
|
||||
if(isClient()) {
|
||||
|
||||
Reference in New Issue
Block a user