Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
import { cloudSyncSignInLinks } from '@/lib/constants/productUrls'
import { cn } from '@/lib/utils'

interface CloudSyncDisclosureProps {
className?: string
}

export function CloudSyncDisclosure({ className }: CloudSyncDisclosureProps) {
const [termsLink, privacyLink, cloudSyncLink] = cloudSyncSignInLinks

return (
<p
className={cn(
'text-center text-muted-foreground text-xs leading-relaxed',
className,
)}
>
By signing in, you agree to the <DisclosureLink link={termsLink} /> and
acknowledge the <DisclosureLink link={privacyLink} />.{' '}
<DisclosureLink link={cloudSyncLink} />.
</p>
)
}
Comment thread
shadowfax92 marked this conversation as resolved.

function DisclosureLink({
link,
}: {
link: (typeof cloudSyncSignInLinks)[number]
}) {
return (
<a
href={link.url}
target="_blank"
rel="noopener noreferrer"
className="font-medium underline underline-offset-2 hover:text-foreground"
>
{link.label}
</a>
)
}
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import {
import type { FC } from 'react'
import { useEffect, useState } from 'react'
import { useNavigate } from 'react-router'
import { CloudSyncDisclosure } from '@/components/auth/CloudSyncDisclosure'
import { Alert, AlertDescription } from '@/components/ui/alert'
import { Button } from '@/components/ui/button'
import {
Expand Down Expand Up @@ -199,6 +200,8 @@ export const LoginPage: FC = () => {
)}
Continue with Google
</Button>

<CloudSyncDisclosure />
</CardContent>
</Card>
)
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
import { AlertCircle, CheckCircle2, Loader2, Mail } from 'lucide-react'
import { useState } from 'react'
import { CloudSyncDisclosure } from '@/components/auth/CloudSyncDisclosure'
import { Alert, AlertDescription } from '@/components/ui/alert'
import { Button } from '@/components/ui/button'
import { Input } from '@/components/ui/input'
Expand Down Expand Up @@ -199,6 +200,8 @@ export const StepTwo = ({ direction, onContinue }: StepTwoProps) => {
</Button>
</form>

<CloudSyncDisclosure />

<div className="text-center">
<Button
variant="ghost"
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import { describe, expect, it } from 'bun:test'
import {
cloudSyncHelpUrl,
cloudSyncSignInLinks,
privacyPolicyUrl,
termsOfServiceUrl,
} from './productUrls'

describe('cloud sync sign-in links', () => {
it('points to the public legal and cloud sync documentation URLs', () => {
expect(termsOfServiceUrl).toBe('https://browseros.com/terms')
expect(privacyPolicyUrl).toBe('https://browseros.com/privacy')
expect(cloudSyncHelpUrl).toBe(
'https://docs.browseros.com/features/sync-to-cloud',
)
})

it('includes legal and cloud sync documentation links in display order', () => {
expect(cloudSyncSignInLinks).toEqual([
{ label: 'Terms of Service', url: termsOfServiceUrl },
{ label: 'Privacy Policy', url: privacyPolicyUrl },
{ label: 'Learn more about cloud sync', url: cloudSyncHelpUrl },
])
})
})
20 changes: 20 additions & 0 deletions packages/browseros-agent/apps/agent/lib/constants/productUrls.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,26 @@ export const githubOrgUrl = 'https://github.com/browseros-ai'
*/
export const privacyPolicyUrl = 'https://browseros.com/privacy'

/**
* @public
*/
export const termsOfServiceUrl = 'https://browseros.com/terms'

/**
* @public
*/
export const cloudSyncHelpUrl =
'https://docs.browseros.com/features/sync-to-cloud'

/**
* @public
*/
export const cloudSyncSignInLinks = [
{ label: 'Terms of Service', url: termsOfServiceUrl },
{ label: 'Privacy Policy', url: privacyPolicyUrl },
{ label: 'Learn more about cloud sync', url: cloudSyncHelpUrl },
] as const

/**
* @public
*/
Expand Down
Loading