From c51a9cc7f7f55c222241a433d22c7bf6556de992 Mon Sep 17 00:00:00 2001 From: snow Date: Tue, 11 May 2021 19:15:36 +0800 Subject: [PATCH 1/3] regenerate password --- src/app/assets/images/copy.png | Bin 0 -> 404 bytes src/app/components/all.scss | 2 + .../components/elements/ChangePassword.jsx | 62 ++++++++++++-- .../elements/CopyPassword/index.jsx | 80 ++++++++++++++++++ .../elements/CopyPassword/styles.scss | 80 ++++++++++++++++++ src/app/components/elements/Toast/index.jsx | 15 ++++ src/app/components/elements/Toast/styles.scss | 74 ++++++++++++++++ src/app/locales/en.json | 8 ++ src/app/locales/zh.json | 8 ++ 9 files changed, 324 insertions(+), 5 deletions(-) create mode 100644 src/app/assets/images/copy.png create mode 100644 src/app/components/elements/CopyPassword/index.jsx create mode 100644 src/app/components/elements/CopyPassword/styles.scss create mode 100644 src/app/components/elements/Toast/index.jsx create mode 100644 src/app/components/elements/Toast/styles.scss diff --git a/src/app/assets/images/copy.png b/src/app/assets/images/copy.png new file mode 100644 index 0000000000000000000000000000000000000000..cd23c32a6f3d422a42b2a324c20287dbc0b4cb4c GIT binary patch literal 404 zcmV;F0c-w=P)OMPO$PMj{Y!UY}&} zWB3`5XH4jEuf8(^7B~Y3dZ+HhgZfeqBF6;?+=x`FOag`UgA!25h@k@vyDvwDX4qxy zm_h^ryLNCKyJT~GoxO0V)&%>=Z8arkL1z3%^@Gg6e%9R8y>-pvFTVLcZ~L?9SFe7n zUBeU+${=21Zki7YEszXi6%*p%i)|2CRXi3DZ^sOy9<^9FDW*;hCqjH$92ZH~3NeZ% z7H^i>2SP=2G8*Tj54L9X(s0Qv=b>aq@P)k%$*Wrj1~Kwt=p|bhz9H&2(JcSVpMKl< yT8QtH#a%Fn(d5#Q)WLob#3ljZbm*t+jb{&HJXW9MGN&~F0000 { + this.setState({ + showToast: false, + }); + }, 2000); } validateAccountName(name) { let nameError = ''; @@ -115,7 +133,7 @@ class ChangePassword extends React.Component { ); } - const { generated, loading, error } = this.state; + const { generated, loading, error, modalVisible } = this.state; const { username, authType, priorAuthKey /*enable2fa*/ } = this.props; const { handleSubmit, submitting, onClose } = this.props; // form stuff const { @@ -226,13 +244,24 @@ class ChangePassword extends React.Component { {(generated && (
{/* !! Do not put keys in a label, labels have an uppercase css style applied !! */} -
+
{newWif} + + +
- */} )) || (