lbry-desktop/ui/modal/modalUpgrade/view.jsx

52 lines
1.3 KiB
React
Raw Normal View History

2018-09-26 19:48:07 +02:00
// @flow
import React from 'react';
import { Modal } from 'modal/modal';
2018-03-26 23:32:43 +02:00
import Button from 'component/button';
import I18nMessage from 'component/i18nMessage';
2017-04-07 07:15:22 +02:00
2018-09-26 19:48:07 +02:00
type Props = {
downloadUpgrade: () => void,
skipUpgrade: () => void,
};
class ModalUpgrade extends React.PureComponent<Props> {
2017-04-07 07:15:22 +02:00
render() {
2017-06-06 23:19:12 +02:00
const { downloadUpgrade, skipUpgrade } = this.props;
2017-04-07 07:15:22 +02:00
return (
<Modal
isOpen
contentLabel={__('Upgrade available')}
2020-08-26 22:28:33 +02:00
title={__('LBRY leveled up')}
2017-04-07 07:15:22 +02:00
type="confirm"
confirmButtonLabel={__('Upgrade')}
abortButtonLabel={__('Skip')}
2017-04-07 07:15:22 +02:00
onConfirmed={downloadUpgrade}
2017-06-06 23:19:12 +02:00
onAborted={skipUpgrade}
>
2019-07-21 23:31:22 +02:00
<p>
{__('An updated version of LBRY is now available.')}{' '}
{__('Your version is out of date and may be unreliable or insecure.')}
</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>
2019-07-21 23:31:22 +02:00
</p>
2017-04-07 07:15:22 +02:00
</Modal>
2017-06-06 23:19:12 +02:00
);
2017-04-07 07:15:22 +02:00
}
}
2017-07-02 20:23:38 +02:00
export default ModalUpgrade;