make ToS/privacy links optional

This commit is contained in:
swithek 2026-09-19 20:37:14 +02:00
parent db3dbc37de
commit 32fb1c87ac
3 changed files with 22 additions and 1 deletions

View File

@ -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) {
</ShadcnUiButton>
</form>
<i18n-t
v-if="conditionsKeypath"
scope="global"
keypath="onboarding.signup.conditions.main"
:keypath="conditionsKeypath"
tag="div"
class="text-center text-xs text-accent-foreground"
>

View File

@ -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\\./",

View File

@ -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"