accounts-frontend/packages/app/components/auth/deviceCode/DeviceCodeBody.tsx

44 lines
1.3 KiB
TypeScript
Raw Normal View History

import React from 'react';
import { FormattedMessage as Message } from 'react-intl';
import { Input } from 'app/components/ui/form';
import BaseAuthBody from 'app/components/auth/BaseAuthBody';
2024-12-23 19:43:10 +05:30
import style from './deviceCode.scss';
export default class DeviceCodeBody extends BaseAuthBody {
static displayName = 'DeviceCodeBody';
static panelId = 'deviceCode';
autoFocusField = 'user_code';
render() {
return (
<>
{this.renderErrors()}
2024-12-23 19:43:10 +05:30
<div className={style.icon} />
<div className={style.description}>
<Message
id="deviceCodeDescription"
defaultMessage="To authorize the application, enter the code displayed on the screen."
/>
</div>
2024-12-23 17:03:41 +05:30
<Message id="enterDeviceCode" defaultMessage="Enter Device Code">
{(nodes) => (
<Input
{...this.bindField('user_code')}
autoFocus
2024-12-23 19:43:10 +05:30
center
required
placeholder={nodes as string}
/>
)}
</Message>
</>
);
}
}