CI / Build & Quality Checks (push) Skipped
CI / Secret scan (gitleaks) (push) Skipped
CI / Playwright smoke (e2e) (push) Skipped
CI / Build & Quality Checks (pull_request) Successful in 3m18s
CI / Trigger Desktop Build (pull_request) Skipped
CI / Docker image build & smoke test (pull_request) Skipped
CI / Secret scan (gitleaks) (pull_request) Successful in 12s
CI / Playwright smoke (e2e) (pull_request) Successful in 24m56s
- #456 Copy pass: sentence case for every setting title and section, plainer names ("Hide joins and leaves", "Link previews", "Emoji style: Twemoji", "Rejoin calls after a restart", "Also use the browser's noise suppression", "Push-to-talk key"...) and grammar fixes ("when messages arrive", "Play a sound when a new message arrives", blocked users "Enter their Matrix ID"). Labels only: no setting is renamed in storage. - #455 One theme control: Theme: System / Light / Dark. System shows the light and dark variant pickers, Light or Dark one picker of that kind. Replaces the System switch plus a Theme dropdown that was greyed out whenever the switch was on. Uses the existing settings (no migration); picking a variant also remembers it for System. - #457 Remove the "Block Messages" stub from Notifications; the GIF picker row only appears in builds with a GIF key. - #458 (part 1) "Export/Import Messages Data" -> "Export/Import encryption keys", with a sentence on when you need it. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_017PCb59uY3UKqDqt7B6hzd5
46 lines
1.6 KiB
TypeScript
46 lines
1.6 KiB
TypeScript
import React, { useCallback, useEffect } from 'react';
|
|
import { Box, Text, Chip } from 'folds';
|
|
import { SequenceCard } from '../../../components/sequence-card';
|
|
import { SequenceCardStyle } from '../styles.css';
|
|
import { SettingTile } from '../../../components/setting-tile';
|
|
import { useMatrixClient } from '../../../hooks/useMatrixClient';
|
|
import { AsyncStatus, useAsyncCallback } from '../../../hooks/useAsyncCallback';
|
|
|
|
export function ContactInformation() {
|
|
const mx = useMatrixClient();
|
|
const [threePIdsState, loadThreePIds] = useAsyncCallback(
|
|
useCallback(() => mx.getThreePids(), [mx]),
|
|
);
|
|
const threePIds =
|
|
threePIdsState.status === AsyncStatus.Success ? threePIdsState.data.threepids : undefined;
|
|
|
|
const emailIds = threePIds?.filter((id) => id.medium === 'email');
|
|
|
|
useEffect(() => {
|
|
loadThreePIds();
|
|
}, [loadThreePIds]);
|
|
|
|
return (
|
|
<Box direction="Column" gap="100">
|
|
<Text size="L400">Contact information</Text>
|
|
<SequenceCard
|
|
className={SequenceCardStyle}
|
|
variant="SurfaceVariant"
|
|
direction="Column"
|
|
gap="400"
|
|
>
|
|
<SettingTile title="Email address" description="Email address attached to your account.">
|
|
<Box>
|
|
{emailIds?.map((email) => (
|
|
<Chip key={email.address} as="span" variant="Secondary" radii="Pill">
|
|
<Text size="T200">{email.address}</Text>
|
|
</Chip>
|
|
))}
|
|
</Box>
|
|
{/* <Input defaultValue="" variant="Secondary" radii="300" /> */}
|
|
</SettingTile>
|
|
</SequenceCard>
|
|
</Box>
|
|
);
|
|
}
|