2017-06-29 12:54:02 -06:00
|
|
|
import * as React from "react";
|
2018-01-20 07:46:44 -07:00
|
|
|
import {
|
2020-02-28 09:35:32 -07:00
|
|
|
BlurableInput, Widget, WidgetHeader, WidgetBody, SaveBtn,
|
2018-01-20 07:46:44 -07:00
|
|
|
} from "../../ui/index";
|
2017-06-29 12:54:02 -06:00
|
|
|
import { SettingsPropTypes } from "../interfaces";
|
2019-04-02 13:59:37 -06:00
|
|
|
import { t } from "../../i18next_wrapper";
|
2017-06-29 12:54:02 -06:00
|
|
|
|
|
|
|
export class Settings extends React.Component<SettingsPropTypes, {}> {
|
|
|
|
render() {
|
2017-08-28 05:49:13 -06:00
|
|
|
const { user, onChange, onSave } = this.props;
|
2017-06-29 12:54:02 -06:00
|
|
|
return <Widget>
|
|
|
|
<WidgetHeader title="Account Settings">
|
2017-08-17 12:36:33 -06:00
|
|
|
<SaveBtn
|
|
|
|
onClick={onSave}
|
|
|
|
status={this.props.user.specialStatus} />
|
2017-06-29 12:54:02 -06:00
|
|
|
</WidgetHeader>
|
|
|
|
<WidgetBody>
|
|
|
|
<form>
|
|
|
|
<label>
|
|
|
|
{t("Your Name")}
|
|
|
|
</label>
|
|
|
|
<BlurableInput
|
2017-08-17 12:36:33 -06:00
|
|
|
onCommit={onChange}
|
2017-06-29 12:54:02 -06:00
|
|
|
name="name"
|
2017-08-17 12:36:33 -06:00
|
|
|
value={user.body.name || ""}
|
|
|
|
type="text" />
|
2017-06-29 12:54:02 -06:00
|
|
|
<label>
|
|
|
|
{t("Email")}
|
|
|
|
</label>
|
|
|
|
<BlurableInput
|
2017-08-17 12:36:33 -06:00
|
|
|
onCommit={onChange}
|
2017-06-29 12:54:02 -06:00
|
|
|
name="email"
|
2017-08-17 12:36:33 -06:00
|
|
|
value={user.body.email || ""}
|
|
|
|
type="email" />
|
2017-06-29 12:54:02 -06:00
|
|
|
</form>
|
|
|
|
</WidgetBody>
|
|
|
|
</Widget>;
|
|
|
|
}
|
|
|
|
}
|