2026-03-25 16:10:39 +01:00
|
|
|
import { ShieldCheck } from '@phosphor-icons/react'
|
2026-04-18 18:50:30 +02:00
|
|
|
import { OnboardingShell } from './OnboardingShell'
|
2026-04-24 22:26:07 +02:00
|
|
|
import { Button } from './ui/button'
|
2026-03-25 16:10:39 +01:00
|
|
|
|
|
|
|
|
interface TelemetryConsentDialogProps {
|
|
|
|
|
onAccept: () => void
|
|
|
|
|
onDecline: () => void
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
export function TelemetryConsentDialog({ onAccept, onDecline }: TelemetryConsentDialogProps) {
|
|
|
|
|
return (
|
2026-04-18 18:50:30 +02:00
|
|
|
<OnboardingShell
|
|
|
|
|
className="fixed inset-0 z-50"
|
2026-04-24 22:26:07 +02:00
|
|
|
contentClassName="w-full rounded-lg border border-border bg-background shadow-[0_18px_55px_var(--shadow-dialog)]"
|
|
|
|
|
style={{ background: 'var(--shadow-overlay)' }}
|
2026-04-18 18:50:30 +02:00
|
|
|
contentStyle={{
|
|
|
|
|
width: 'min(440px, 100%)',
|
|
|
|
|
padding: 32,
|
|
|
|
|
display: 'flex',
|
|
|
|
|
flexDirection: 'column',
|
|
|
|
|
gap: 20,
|
|
|
|
|
alignItems: 'center',
|
|
|
|
|
}}
|
|
|
|
|
testId="telemetry-consent-shell"
|
2026-03-25 16:10:39 +01:00
|
|
|
>
|
2026-04-18 18:50:30 +02:00
|
|
|
<>
|
2026-03-25 16:10:39 +01:00
|
|
|
<ShieldCheck size={40} weight="duotone" style={{ color: 'var(--primary)' }} />
|
|
|
|
|
|
|
|
|
|
<div style={{ textAlign: 'center' }}>
|
|
|
|
|
<h2 style={{ fontSize: 18, fontWeight: 600, color: 'var(--foreground)', margin: 0 }}>
|
2026-04-12 01:35:34 +02:00
|
|
|
Help improve Tolaria
|
2026-03-25 16:10:39 +01:00
|
|
|
</h2>
|
|
|
|
|
<p style={{ fontSize: 13, color: 'var(--muted-foreground)', lineHeight: 1.6, marginTop: 8 }}>
|
|
|
|
|
Send anonymous crash reports to help us fix bugs faster.
|
|
|
|
|
No vault content, no personal data, no tracking.
|
|
|
|
|
</p>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div style={{ fontSize: 12, color: 'var(--muted-foreground)', lineHeight: 1.6, width: '100%' }}>
|
|
|
|
|
<p style={{ margin: '0 0 6px', fontWeight: 500, color: 'var(--foreground)' }}>What we collect:</p>
|
|
|
|
|
<ul style={{ margin: 0, paddingLeft: 18 }}>
|
|
|
|
|
<li>Stack traces from errors (JS & Rust)</li>
|
|
|
|
|
<li>App version, OS, and architecture</li>
|
|
|
|
|
</ul>
|
|
|
|
|
<p style={{ margin: '10px 0 6px', fontWeight: 500, color: 'var(--foreground)' }}>What we never collect:</p>
|
|
|
|
|
<ul style={{ margin: 0, paddingLeft: 18 }}>
|
|
|
|
|
<li>No vault content, note titles, or file paths</li>
|
|
|
|
|
<li>No personal data or IP addresses</li>
|
|
|
|
|
</ul>
|
|
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<div style={{ display: 'flex', gap: 12, width: '100%', marginTop: 4 }}>
|
2026-04-24 22:26:07 +02:00
|
|
|
<Button
|
|
|
|
|
type="button"
|
|
|
|
|
variant="outline"
|
2026-03-25 16:10:39 +01:00
|
|
|
style={{ flex: 1, fontSize: 13, padding: '10px 16px' }}
|
|
|
|
|
onClick={onDecline}
|
|
|
|
|
data-testid="telemetry-decline"
|
2026-04-18 00:21:52 +02:00
|
|
|
autoFocus
|
2026-03-25 16:10:39 +01:00
|
|
|
>
|
|
|
|
|
No thanks
|
2026-04-24 22:26:07 +02:00
|
|
|
</Button>
|
|
|
|
|
<Button
|
|
|
|
|
type="button"
|
|
|
|
|
style={{ flex: 1, fontSize: 13, padding: '10px 16px', fontWeight: 500 }}
|
2026-03-25 16:10:39 +01:00
|
|
|
onClick={onAccept}
|
|
|
|
|
data-testid="telemetry-accept"
|
|
|
|
|
>
|
|
|
|
|
Allow anonymous reporting
|
2026-04-24 22:26:07 +02:00
|
|
|
</Button>
|
2026-03-25 16:10:39 +01:00
|
|
|
</div>
|
|
|
|
|
|
|
|
|
|
<p style={{ fontSize: 11, color: 'var(--muted-foreground)', margin: 0, textAlign: 'center' }}>
|
|
|
|
|
You can change this anytime in Settings.
|
|
|
|
|
</p>
|
2026-04-18 18:50:30 +02:00
|
|
|
</>
|
|
|
|
|
</OnboardingShell>
|
2026-03-25 16:10:39 +01:00
|
|
|
)
|
|
|
|
|
}
|