diff --git a/src/images/email_example.jpg b/src/images/email_example.jpg new file mode 100644 index 00000000..74b3210e Binary files /dev/null and b/src/images/email_example.jpg differ diff --git a/src/infrastructure/widgets.css b/src/infrastructure/widgets.css index ed5d7b29..99d9f59d 100644 --- a/src/infrastructure/widgets.css +++ b/src/infrastructure/widgets.css @@ -334,3 +334,7 @@ a.button { padding: 5px; } + +.li-image { + width: 100%; +} diff --git a/src/infrastructure/widgets.js b/src/infrastructure/widgets.js index 215d01b2..8a61ebbe 100644 --- a/src/infrastructure/widgets.js +++ b/src/infrastructure/widgets.js @@ -8,6 +8,7 @@ import copy from 'copy-to-clipboard'; import './global.css'; import './widgets.css'; +import emailExample from '../images/email_example.jpg'; import { get_json, API_VERSION_PARAM } from './functions'; import { EMAIL } from '../UserAction'; @@ -68,6 +69,7 @@ class LoginPopupSelf extends Component { super(props); this.state = { token_phrase: '', + already_copy: false, }; } @@ -86,6 +88,17 @@ class LoginPopupSelf extends Component { sha256_hex(token_phrase + 'hole' + new Date().toDateString(), 16) .then((token) => sha256_hex(token + 'hole', 16)) .then((token_hash) => copy('|' + token_hash + '|')); + + this.setState({already_copy: true}); + } + + copy_token_phrase(event) { + const { token_phrase } = this.state; + if (!token_phrase) { + alert('不可以为空'); + return; + } + copy(token_phrase); } use_token(event) { @@ -103,7 +116,7 @@ class LoginPopupSelf extends Component { } render() { - const { token_phrase } = this.state; + const { token_phrase, already_copy } = this.state; return (