feat: add reset email by verification code

Signed-off-by: Kininaru <shiftregister233@outlook.com>
This commit is contained in:
Kininaru
2021-05-12 21:38:31 +08:00
parent 7bea33dabd
commit 400e335e68
7 changed files with 326 additions and 3 deletions

View File

@ -25,6 +25,7 @@ import * as ApplicationBackend from "./backend/ApplicationBackend";
import * as ProviderBackend from "./backend/ProviderBackend";
import * as Provider from "./auth/Provider";
import PasswordModal from "./PasswordModal";
import ResetModal from "./ResetModal";
const { Option } = Select;
@ -275,9 +276,8 @@ class UserEditPage extends React.Component {
{i18next.t("general:Email")}:
</Col>
<Col span={22} >
<Input value={this.state.user.email} onChange={e => {
this.updateUserField('email', e.target.value);
}} />
<Input value={this.state.user.email} disabled />
{ this.state.user.id === this.props.account.id ? (<ResetModal buttonText={i18next.t("user:Reset Email")} destType={"email"} coolDownTime={60}/>) : null}
</Col>
</Row>
<Row style={{marginTop: '20px'}} >