Move support into React Router

This commit is contained in:
rosetta
2026-07-30 16:47:54 -07:00
parent c81c3a1189
commit 650d73830f
11 changed files with 378 additions and 838 deletions

251
src/pages/SupportPage.tsx Normal file
View File

@@ -0,0 +1,251 @@
import {
Accordion,
Anchor,
Button,
Card,
Group,
Paper,
SimpleGrid,
Stack,
Text,
ThemeIcon,
Title,
} from '@mantine/core';
import {
IconKey,
IconMail,
IconMessageCircle,
IconShieldLock,
type TablerIcon,
} from '@tabler/icons-react';
import type { ReactNode } from 'react';
import { LegalPage } from '../components/LegalPage/LegalPage';
import { SEO } from '../components/SEO/SEO';
import classes from './SupportPage.module.css';
const TOPICS: Array<{
href: string;
icon: TablerIcon;
title: string;
description: string;
}> = [
{
href: '#account',
icon: IconKey,
title: 'Account and access',
description: 'Recovery phrases, device access, and account security.',
},
{
href: '#messaging',
icon: IconMessageCircle,
title: 'Messaging and media',
description: 'Messages, photos, videos, files, voice messages, and groups.',
},
{
href: '#privacy',
icon: IconShieldLock,
title: 'Privacy and safety',
description: 'Security questions, privacy information, and abuse reports.',
},
];
const ACCOUNT_FAQS = [
{
question: 'How do I access my account on a new device?',
answer:
'Install Rosetta and enter your recovery phrase in the exact order it was created. Rosetta may ask you to confirm a new device to protect your account.',
},
{
question: 'I lost my recovery phrase. Can it be restored?',
answer:
'No. Your recovery phrase is the key to your account. Rosetta cannot recover it for you, so keep it private and backed up before you need it.',
},
{
question: 'Why am I asked to confirm a new device?',
answer:
'New-device confirmation helps prevent someone who has obtained a recovery phrase from silently accessing your account on another device.',
},
{
question: 'How do I report an account-access problem?',
answer:
'Email us with the device model, Rosetta version, and a short description of what happened. Do not include your recovery phrase or private keys.',
},
];
const MESSAGING_FAQS = [
{
question: 'How do I send a photo, video, or file?',
answer:
'Open a chat, tap the attachment button next to the message field, choose the item you want to share, then send it. Allow Photos or Files access when iOS asks for it.',
},
{
question: 'Why is an attachment still sending?',
answer:
'Media uploads depend on the file size and your connection. Keep Rosetta open and connected until the send indicator completes. You can retry a message that failed.',
},
{
question: 'How do I send a voice message?',
answer:
'In a chat, press and hold the microphone control to record, then release it to send. Microphone permission is required the first time you record.',
},
{
question: 'How do I get help with a group?',
answer:
'Contact us with the group name and a description of the issue. Do not send private recovery phrases, message contents, or encryption keys.',
},
];
const PRIVACY_FAQS = [
{
question: 'How is message content protected?',
answer:
'Rosetta is designed to encrypt message content before it is sent. For details about how we handle data, read the Rosetta Privacy Policy.',
},
{
question: 'How do I report abuse or a security issue?',
answer: (
<>
Email{' '}
<Anchor href="mailto:admin@rosetta.im?subject=Rosetta%20Security%20Report">
Admin@rosetta.im
</Anchor>{' '}
with a description of the concern. Do not include recovery phrases or private
keys.
</>
),
},
];
interface SupportSectionProps {
id: string;
title: string;
description: string;
items: Array<{ question: string; answer: ReactNode }>;
}
function SupportSection({ id, title, description, items }: SupportSectionProps) {
return (
<Stack component="section" id={id} gap="lg" className={classes.section}>
<div>
<Title order={2} className={classes.sectionTitle}>
{title}
</Title>
<Text c="dimmed" mt="xs" lh={1.65}>
{description}
</Text>
</div>
<Accordion multiple variant="separated" radius="md">
{items.map(({ question, answer }) => (
<Accordion.Item key={question} value={question}>
<Accordion.Control>{question}</Accordion.Control>
<Accordion.Panel>
<Text c="dimmed" size="sm" lh={1.65}>
{answer}
</Text>
</Accordion.Panel>
</Accordion.Item>
))}
</Accordion>
</Stack>
);
}
export function SupportPage() {
return (
<>
<SEO
title="Rosetta Support"
description="Contact Rosetta Support for help with account access, recovery phrases, messaging, media, privacy, and security."
canonical="https://rosetta.im/support/"
keywords="Rosetta support, account recovery, messaging help, privacy help"
/>
<LegalPage
active="support"
eyebrow="Rosetta Support"
title="Help with your Rosetta account and messages."
>
<Stack gap="xl">
<div>
<Text className={classes.lead}>
Find answers about account access, recovery phrases, private messaging,
shared media, and privacy. For anything else, contact our support team.
</Text>
<Button
component="a"
href="mailto:admin@rosetta.im?subject=Rosetta%20Support%20Request"
leftSection={<IconMail size={18} />}
mt="xl"
size="md"
>
Email Rosetta Support
</Button>
</div>
<SimpleGrid cols={{ base: 1, sm: 3 }} spacing="md">
{TOPICS.map(({ href, icon: Icon, title, description }) => (
<Card
key={href}
component="a"
href={href}
withBorder
radius="md"
padding="lg"
className={classes.topic}
>
<ThemeIcon variant="light" radius="xl" size="lg">
<Icon size={18} />
</ThemeIcon>
<Text fw={600} mt="md">
{title}
</Text>
<Text c="dimmed" size="sm" mt={6} lh={1.5}>
{description}
</Text>
</Card>
))}
</SimpleGrid>
<SupportSection
id="account"
title="Account and access"
description="Rosetta accounts are accessed with a recovery phrase instead of a phone number. Keep your phrase private and stored somewhere safe."
items={ACCOUNT_FAQS}
/>
<SupportSection
id="messaging"
title="Messaging and media"
description="Rosetta supports private chats, groups, photos, videos, files, and voice messages. Attachment choices can vary depending on your device permissions and the selected item."
items={MESSAGING_FAQS}
/>
<SupportSection
id="privacy"
title="Privacy and safety"
description="Rosetta is designed for private communication. If you have a security concern or a question about data handling, contact us directly."
items={PRIVACY_FAQS}
/>
<Paper radius="lg" p="xl" className={classes.contact}>
<Group justify="space-between" align="center">
<div>
<Title order={2} className={classes.contactTitle}>
Need more help?
</Title>
<Text c="dimmed" mt="xs" className={classes.contactCopy}>
Send us your device model, app version, and a short explanation.
Never send a recovery phrase, private key, or private message
content.
</Text>
</div>
<Anchor
href="mailto:admin@rosetta.im?subject=Rosetta%20Support%20Request"
fw={700}
>
Admin@rosetta.im
</Anchor>
</Group>
</Paper>
</Stack>
</LegalPage>
</>
);
}