diff --git a/web/app/pages/signup.vue b/web/app/pages/signup.vue index edc68479..3f71bb52 100644 --- a/web/app/pages/signup.vue +++ b/web/app/pages/signup.vue @@ -75,6 +75,23 @@ const primaryMethod = computed(() => { ) ?? null ) }) +const conditionsKeypath = computed(() => { + const { termsOfServiceURL, privacyPolicyURL } = config.public + + if (termsOfServiceURL && privacyPolicyURL) { + return "onboarding.signup.conditions.main" + } + + if (termsOfServiceURL) { + return "onboarding.signup.conditions.terms-only" + } + + if (privacyPolicyURL) { + return "onboarding.signup.conditions.privacy-only" + } + + return null +}) const newAccountsAllowed = computed(() => { return ( fetchOrganizationStats.state.value.data && @@ -389,8 +406,9 @@ function methodVariant(method: AuthMethod) { diff --git a/web/eslint.config.mjs b/web/eslint.config.mjs index a0f60696..f27d6ee3 100644 --- a/web/eslint.config.mjs +++ b/web/eslint.config.mjs @@ -162,6 +162,7 @@ export default withNuxt([ "/^editor\\.ai-chat\\.tool-status\\./", "/^editor\\.hooks\\.[a-z-]+\\.existing-item-(block|full-document)-explanation$/", "/^editor\\.slash-commands\\.items\\./", + "/^onboarding\\.signup\\.conditions\\.(main|terms-only|privacy-only)$/", "/^shortcuts\\.groups\\./", "/^shortcuts\\.modal\\.entries\\./", "/^shortcuts\\.keys\\./", diff --git a/web/i18n/locales/en/onboarding.json b/web/i18n/locales/en/onboarding.json index 5b350e61..7504f8d2 100644 --- a/web/i18n/locales/en/onboarding.json +++ b/web/i18n/locales/en/onboarding.json @@ -14,6 +14,8 @@ }, "conditions": { "main": "By signing up, you agree to our {terms-of-service} and {privacy-policy}.", + "terms-only": "By signing up, you agree to our {terms-of-service}.", + "privacy-only": "By signing up, you agree to our {privacy-policy}.", "placeholders": { "terms-of-service": "Terms of Service", "privacy-policy": "Privacy Policy"