lbry-desktop/ui/modal/modalAutoUpdateDownloaded/view.jsx
infiinte-persistence 4760f00050 Fix "Not Now"
## Issue:
https://discord.com/channels/362322208485277697/646840786662719488/788694493532520458

## Change:
It's either adding the non-capitalized "Not now" to the list, or change the usage to "Not Now".

Chose the latter since the rest of the modal (and other usage) is using the capitalized format.
2020-12-18 14:02:18 -05:00

71 lines
1.7 KiB
JavaScript

// @flow
import React from 'react';
// @if TARGET='app'
import { ipcRenderer } from 'electron';
// @endif
import { Modal } from 'modal/modal';
import Button from 'component/button';
import I18nMessage from 'component/i18nMessage';
type Props = {
closeModal: any => any,
declineAutoUpdate: () => any,
};
type State = {
disabled: boolean,
};
class ModalAutoUpdateDownloaded extends React.PureComponent<Props, State> {
constructor(props: Props) {
super(props);
this.state = {
disabled: false,
};
}
render() {
const { closeModal, declineAutoUpdate } = this.props;
return (
<Modal
isOpen
type="confirm"
contentLabel={__('Upgrade Downloaded')}
title={__('LBRY leveled up')}
confirmButtonLabel={__('Upgrade Now')}
abortButtonLabel={__('Not Now')}
confirmButtonDisabled={this.state.disabled}
onConfirmed={() => {
this.setState({ disabled: true });
ipcRenderer.send('autoUpdateAccepted');
}}
onAborted={() => {
declineAutoUpdate();
closeModal();
}}
>
<p>{__('A new version of LBRY is ready for you.')}</p>
<p className="help">
<I18nMessage
tokens={{
release_notes: (
<Button
button="link"
label={__('release notes')}
href="https://github.com/lbryio/lbry-desktop/releases"
/>
),
}}
>
Want to know what has changed? See the %release_notes%.
</I18nMessage>
</p>
</Modal>
);
}
}
export default ModalAutoUpdateDownloaded;