2021-03-14 14:51:53 +00:00
|
|
|
import React from 'react';
|
|
|
|
import {Button} from '../../elements/GPElements/Button';
|
|
|
|
import style from './AuthenticationPage.module.css';
|
2021-03-14 12:49:24 +00:00
|
|
|
|
|
|
|
interface state {
|
2021-03-14 14:51:53 +00:00
|
|
|
pwdText: string;
|
2021-03-14 12:49:24 +00:00
|
|
|
}
|
|
|
|
|
2021-03-14 14:51:53 +00:00
|
|
|
interface Props {
|
|
|
|
submit: (password: string) => void;
|
2021-03-14 12:49:24 +00:00
|
|
|
}
|
|
|
|
|
2021-03-14 14:51:53 +00:00
|
|
|
class AuthenticationPage extends React.Component<Props, state> {
|
|
|
|
constructor(props: Props) {
|
2021-03-14 12:49:24 +00:00
|
|
|
super(props);
|
|
|
|
|
|
|
|
this.state = {
|
|
|
|
pwdText: ''
|
2021-03-14 14:51:53 +00:00
|
|
|
};
|
2021-03-14 12:49:24 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
render(): JSX.Element {
|
|
|
|
return (
|
|
|
|
<>
|
|
|
|
<div className={style.openmediacenterlabel}>OpenMediaCenter</div>
|
|
|
|
<div className={style.main}>
|
|
|
|
<div className={style.loginText}>Login</div>
|
|
|
|
<div>
|
2021-03-14 14:51:53 +00:00
|
|
|
<input
|
|
|
|
className={style.input}
|
|
|
|
placeholder='Password'
|
|
|
|
type='password'
|
|
|
|
onChange={(ch): void => this.setState({pwdText: ch.target.value})}
|
|
|
|
value={this.state.pwdText}
|
|
|
|
/>
|
2021-03-14 12:49:24 +00:00
|
|
|
</div>
|
|
|
|
<div>
|
2021-03-14 14:51:53 +00:00
|
|
|
<Button
|
|
|
|
title='Submit'
|
|
|
|
onClick={(): void => {
|
|
|
|
this.props.submit(this.state.pwdText);
|
|
|
|
}}
|
|
|
|
/>
|
2021-03-14 12:49:24 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
|
|
|
</>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
2021-03-14 14:51:53 +00:00
|
|
|
export default AuthenticationPage;
|