added spinner on button during load
This commit is contained in:
parent
803ed2df9a
commit
6c97981e35
|
@ -14,6 +14,7 @@ import { setKey, SESSION_KEYS, getKey } from 'utils/storage/sessionStorage';
|
|||
import CryptoWorker, { generateIntermediateKeyAttributes } from 'utils/crypto';
|
||||
import { logoutUser } from 'services/userService';
|
||||
import { isFirstLogin } from 'utils/storage';
|
||||
import { Spinner } from 'react-bootstrap';
|
||||
|
||||
const Image = styled.img`
|
||||
width: 200px;
|
||||
|
@ -147,7 +148,11 @@ export default function Credentials() {
|
|||
</Form.Control.Feedback>
|
||||
</Form.Group>
|
||||
<Button block type="submit" disabled={loading}>
|
||||
{constants.VERIFY_PASSPHRASE}
|
||||
{loading ? (
|
||||
<Spinner animation="border" />
|
||||
) : (
|
||||
constants.VERIFY_PASSPHRASE
|
||||
)}
|
||||
</Button>
|
||||
<br />
|
||||
<div>
|
||||
|
|
|
@ -14,6 +14,7 @@ import { getKey, SESSION_KEYS, setKey } from 'utils/storage/sessionStorage';
|
|||
import { B64EncryptionResult } from 'services/uploadService';
|
||||
import CryptoWorker from 'utils/crypto';
|
||||
import { generateIntermediateKeyAttributes } from 'utils/crypto';
|
||||
import { Spinner } from 'react-bootstrap';
|
||||
|
||||
const Image = styled.img`
|
||||
width: 200px;
|
||||
|
@ -205,7 +206,11 @@ export default function Generate() {
|
|||
disabled={loading}
|
||||
style={{ marginTop: '28px' }}
|
||||
>
|
||||
{constants.SET_PASSPHRASE}
|
||||
{loading ? (
|
||||
<Spinner animation="border" />
|
||||
) : (
|
||||
constants.SET_PASSPHRASE
|
||||
)}
|
||||
</Button>
|
||||
</Form>
|
||||
)}
|
||||
|
|
Loading…
Reference in a new issue