Files
cinny/src/app/features/settings/account/OidcManageAccount.tsx
T
Lotus CIandClaude Opus 5.5 5d15013a27
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
feat(settings): quick wins from the settings audit (#453)
- #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
2026-10-25 01:37:37 -04:00

54 lines
1.9 KiB
TypeScript

import React, { useCallback } from 'react';
import { Box, Chip, Text } from 'folds';
import { SequenceCard } from '../../../components/sequence-card';
import { SequenceCardStyle } from '../styles.css';
import { SettingTile } from '../../../components/setting-tile';
import { useAuthMetadata } from '../../../hooks/useAuthMetadata';
import { useAccountManagementActions } from '../../../hooks/useAccountManagement';
import { withSearchParam } from '../../../pages/pathUtils';
/**
* On OIDC/next-gen-auth servers, profile/password/sessions are managed by the
* authentication service — surface a deep-link to its account page (MSC2965
* account-management URL). Renders nothing on password/legacy-SSO servers, where
* `useAuthMetadata()` is undefined.
*/
export function OidcManageAccount() {
const authMetadata = useAuthMetadata();
const accountManagementActions = useAccountManagementActions();
const open = useCallback(() => {
const authUrl = authMetadata?.account_management_uri ?? authMetadata?.issuer;
if (!authUrl) return;
window.open(
withSearchParam(authUrl, { action: accountManagementActions.profile }),
'_blank',
'noopener,noreferrer',
);
}, [authMetadata, accountManagementActions]);
if (!authMetadata) return null;
return (
<Box direction="Column" gap="100">
<Text size="L400">Account management</Text>
<SequenceCard
className={SequenceCardStyle}
variant="SurfaceVariant"
direction="Column"
gap="400"
>
<SettingTile
title="Manage account"
description="Your profile, password, and sessions are managed by your single sign-on provider."
after={
<Chip variant="Secondary" radii="Pill" onClick={open}>
<Text size="T200">Open</Text>
</Chip>
}
/>
</SequenceCard>
</Box>
);
}