mirror of
https://github.com/trezor/trezor-wallet
synced 2025-07-06 06:42:34 +00:00
Show loader after 'Acquire Device' button is clicked and is waiting for acquire
This commit is contained in:
parent
cc507f8ae8
commit
6349254e45
@ -8,7 +8,7 @@ export default (props: { size: string, label?: string, className?: string }): Re
|
|||||||
const style = {
|
const style = {
|
||||||
width: `${props.size}px`,
|
width: `${props.size}px`,
|
||||||
height: `${props.size}px`,
|
height: `${props.size}px`,
|
||||||
};
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<div className={ className } style={style}>
|
<div className={ className } style={style}>
|
||||||
@ -19,4 +19,4 @@ export default (props: { size: string, label?: string, className?: string }): Re
|
|||||||
</svg>
|
</svg>
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -5,6 +5,8 @@ import React from 'react';
|
|||||||
import { bindActionCreators } from 'redux';
|
import { bindActionCreators } from 'redux';
|
||||||
import { connect } from 'react-redux';
|
import { connect } from 'react-redux';
|
||||||
|
|
||||||
|
import Loader from '../common/LoaderCircle';
|
||||||
|
|
||||||
import * as NOTIFICATION from '~/js/actions/constants/notification';
|
import * as NOTIFICATION from '~/js/actions/constants/notification';
|
||||||
import * as NotificationActions from '~/js/actions/NotificationActions';
|
import * as NotificationActions from '~/js/actions/NotificationActions';
|
||||||
import type { Action, State, Dispatch } from '~/flowtype';
|
import type { Action, State, Dispatch } from '~/flowtype';
|
||||||
|
@ -23,16 +23,32 @@ const Acquire = (props: Props) => {
|
|||||||
},
|
},
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
const acquireDeviceAction = {
|
||||||
|
label: 'Acquire device',
|
||||||
|
callback: () => {
|
||||||
|
props.acquireDevice()
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<section className="acquire">
|
<section className="acquire">
|
||||||
<Notification
|
{props.acquiring ? (
|
||||||
title="Device is used in other window"
|
<Notification
|
||||||
message="Do you want to use your device in this window?"
|
title="Device is being acquired"
|
||||||
className="info"
|
message="Please wait"
|
||||||
cancelable={false}
|
className="loading"
|
||||||
actions={actions}
|
cancelable={false}
|
||||||
/>
|
loading={true}
|
||||||
|
/>
|
||||||
|
) : (
|
||||||
|
<Notification
|
||||||
|
title="Device is used in other window"
|
||||||
|
message="Do you want to use your device in this window?"
|
||||||
|
className="info"
|
||||||
|
cancelable={ false }
|
||||||
|
actions={ [acquireDeviceAction] }
|
||||||
|
/>
|
||||||
|
)}
|
||||||
</section>
|
</section>
|
||||||
);
|
);
|
||||||
};
|
};
|
||||||
|
@ -85,4 +85,4 @@
|
|||||||
80%, 90% {
|
80%, 90% {
|
||||||
stroke: @color_info_primary;
|
stroke: @color_info_primary;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -40,7 +40,7 @@
|
|||||||
h2 {
|
h2 {
|
||||||
font-size: 14px;
|
font-size: 14px;
|
||||||
font-weight: bold;
|
font-weight: bold;
|
||||||
|
|
||||||
padding: 0px;
|
padding: 0px;
|
||||||
&:before {
|
&:before {
|
||||||
.icomoon-info;
|
.icomoon-info;
|
||||||
@ -68,7 +68,7 @@
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
&.success {
|
&.success {
|
||||||
color: @color_success_primary;
|
color: @color_success_primary;
|
||||||
|
Loading…
Reference in New Issue
Block a user