2018-05-11 01:06:41 +02:00
|
|
|
// @flow
|
2017-12-21 22:08:54 +01:00
|
|
|
import React from 'react';
|
|
|
|
import { Modal } from 'modal/modal';
|
2018-03-26 23:32:43 +02:00
|
|
|
import Button from 'component/button';
|
2017-07-19 23:05:08 +02:00
|
|
|
|
2018-05-11 01:06:41 +02:00
|
|
|
type Props = {
|
|
|
|
quit: () => void,
|
|
|
|
quitAnyDaemon: () => void,
|
|
|
|
};
|
|
|
|
|
|
|
|
class ModalIncompatibleDaemon extends React.PureComponent<Props> {
|
2017-07-19 23:05:08 +02:00
|
|
|
render() {
|
2018-03-16 00:04:15 +01:00
|
|
|
const { quit, quitAnyDaemon } = this.props;
|
2017-07-19 23:05:08 +02:00
|
|
|
|
|
|
|
return (
|
|
|
|
<Modal
|
2017-12-21 22:08:54 +01:00
|
|
|
isOpen
|
|
|
|
contentLabel={__('Incompatible daemon running')}
|
2018-03-16 00:04:15 +01:00
|
|
|
type="confirm"
|
2018-07-11 02:46:31 +02:00
|
|
|
confirmButtonLabel={__('Close LBRY and daemon')}
|
2018-03-16 00:04:15 +01:00
|
|
|
abortButtonLabel={__('Do nothing')}
|
|
|
|
onConfirmed={quitAnyDaemon}
|
|
|
|
onAborted={quit}
|
2017-07-19 23:05:08 +02:00
|
|
|
>
|
|
|
|
{__(
|
2018-07-12 04:51:08 +02:00
|
|
|
'This browser is running with an incompatible version of the LBRY protocol, please close the LBRY app and rerun the installation package to repair it'
|
2017-07-19 23:05:08 +02:00
|
|
|
)}
|
2018-05-11 01:06:41 +02:00
|
|
|
<Button
|
|
|
|
button="link"
|
|
|
|
label={__('Learn more')}
|
|
|
|
href="https://lbry.io/faq/incompatible-protocol-version"
|
|
|
|
/>
|
2017-07-19 23:05:08 +02:00
|
|
|
</Modal>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ModalIncompatibleDaemon;
|