Add cancel button to updater
This commit is contained in:
@@ -55,6 +55,11 @@ function UpdaterPage(props) {
|
||||
now={props.progress}
|
||||
label={`${props.progress}%`}
|
||||
/>
|
||||
<div className='pull-right'>
|
||||
<Button
|
||||
onClick={props.onClickCancel}
|
||||
>{'Cancel'}</Button>
|
||||
</div>
|
||||
</Navbar> :
|
||||
<Navbar
|
||||
className='UpdaterPage-footer'
|
||||
@@ -93,6 +98,7 @@ UpdaterPage.propTypes = {
|
||||
onClickReleaseNotes: propTypes.func.isRequired,
|
||||
onClickRemind: propTypes.func.isRequired,
|
||||
onClickSkip: propTypes.func.isRequired,
|
||||
onClickCancel: propTypes.func.isRequired,
|
||||
};
|
||||
|
||||
export default UpdaterPage;
|
||||
|
@@ -48,5 +48,6 @@ storiesOf('UpdaterPage', module).
|
||||
appName={appName}
|
||||
isDownloading={true}
|
||||
progress={0}
|
||||
onClickCancel={action('clicked cancel')}
|
||||
/>
|
||||
));
|
||||
|
@@ -53,6 +53,9 @@ class UpdaterPageContainer extends React.Component {
|
||||
onClickDownload={() => {
|
||||
ipcRenderer.send('click-download');
|
||||
}}
|
||||
onClickCancel={() => {
|
||||
ipcRenderer.send('click-cancel');
|
||||
}}
|
||||
/>
|
||||
);
|
||||
}
|
||||
|
Reference in New Issue
Block a user