feat: recovery password settings flow done

added aria label and datatestid support to SessionQRCode
pull/3083/head
William Grant 1 year ago
parent d14024d718
commit 341fa8b774

@ -39,6 +39,8 @@ export type SessionQRCodeProps = {
logoIsSVG?: boolean; logoIsSVG?: boolean;
theme?: string; theme?: string;
ignoreTheme?: boolean; ignoreTheme?: boolean;
ariaLabel?: string;
dataTestId?: string;
style?: CSSProperties; style?: CSSProperties;
}; };
@ -55,6 +57,8 @@ export function SessionQRCode(props: SessionQRCodeProps) {
logoIsSVG, logoIsSVG,
theme, theme,
ignoreTheme, ignoreTheme,
ariaLabel,
dataTestId,
style, style,
} = props; } = props;
@ -110,7 +114,7 @@ export function SessionQRCode(props: SessionQRCodeProps) {
container={true} container={true}
justifyContent="center" justifyContent="center"
alignItems="center" alignItems="center"
aria-label={window.i18n('clickToTrustContact')} aria-label={ariaLabel || 'QR code'}
title={window.i18n('clickToTrustContact')} title={window.i18n('clickToTrustContact')}
canvasId={id} canvasId={id}
size={size} size={size}
@ -129,6 +133,7 @@ export function SessionQRCode(props: SessionQRCodeProps) {
initial={{ opacity: 0 }} initial={{ opacity: 0 }}
animate={{ opacity: loading ? 0 : 1 }} animate={{ opacity: loading ? 0 : 1 }}
transition={{ duration: THEME_GLOBALS['--default-duration-seconds'] }} transition={{ duration: THEME_GLOBALS['--default-duration-seconds'] }}
data-testId={dataTestId || 'session-qr-code'}
style={style} style={style}
> >
<QRCode <QRCode

@ -89,7 +89,7 @@ export const CopyToClipboardIcon = (props: CopyToClipboardIconProps) => {
return ( return (
<SessionIconButton <SessionIconButton
aria-label={'copy to clipboard button'} aria-label={'copy to clipboard icon button'}
{...props} {...props}
className={className} className={className}
iconType={'copy'} iconType={'copy'}

@ -41,6 +41,7 @@ export const BackButton = ({ callback }: { callback?: () => void }) => {
return ( return (
<SessionIconButton <SessionIconButton
ariaLabel="Back button"
iconSize="huge" iconSize="huge"
iconType="chevron" iconType="chevron"
iconColor="var(--color-text-primary)" iconColor="var(--color-text-primary)"

@ -113,9 +113,12 @@ export const SettingsCategoryRecoveryPassword = () => {
logoHeight={56} logoHeight={56}
logoIsSVG={true} logoIsSVG={true}
theme={theme} theme={theme}
ariaLabel={'Recovery Password QR Code'}
dataTestId={'session-recovery-passwod'}
/> />
) : ( ) : (
<StyledRecoveryPassword <StyledRecoveryPassword
aria-label="Recovery password"
container={true} container={true}
flexDirection={'row'} flexDirection={'row'}
justifyContent={'space-between'} justifyContent={'space-between'}
@ -125,7 +128,7 @@ export const SettingsCategoryRecoveryPassword = () => {
initial={{ opacity: 0 }} initial={{ opacity: 0 }}
animate={{ opacity: 1 }} animate={{ opacity: 1 }}
transition={{ duration: THEME_GLOBALS['--default-duration-seconds'] }} transition={{ duration: THEME_GLOBALS['--default-duration-seconds'] }}
data-testid="recovery-phrase-seed-modal" data-testid="recovery-password-seed-modal"
> >
{recoveryPhrase} {recoveryPhrase}
<SpacerSM /> <SpacerSM />

Loading…
Cancel
Save