2018-05-10 19:06:41 -04:00
// @flow
2017-12-21 18:08:54 -03:00
import React from 'react' ;
import { Modal } from 'modal/modal' ;
2018-03-26 14:32:43 -07:00
import Button from 'component/button' ;
2017-07-19 17:05:08 -04:00
2018-05-10 19:06:41 -04:00
type Props = {
2019-01-09 20:38:26 -05:00
onContinueAnyway : ( ) => void ,
2018-05-10 19:06:41 -04:00
quitAnyDaemon : ( ) => void ,
} ;
class ModalIncompatibleDaemon extends React . PureComponent < Props > {
2017-07-19 17:05:08 -04:00
render ( ) {
2019-01-09 20:38:26 -05:00
const { onContinueAnyway , quitAnyDaemon } = this . props ;
2017-07-19 17:05:08 -04:00
return (
< Modal
2017-12-21 18:08:54 -03:00
isOpen
2018-09-26 13:48:07 -04:00
title = { _ _ ( 'Incompatible Daemon' ) }
2017-12-21 18:08:54 -03:00
contentLabel = { _ _ ( 'Incompatible daemon running' ) }
2018-03-15 19:04:15 -04:00
type = "confirm"
2019-01-09 20:38:26 -05:00
confirmButtonLabel = { _ _ ( 'Close App and LBRY Processes' ) }
abortButtonLabel = { _ _ ( 'Continue Anyway' ) }
2018-03-15 19:04:15 -04:00
onConfirmed = { quitAnyDaemon }
2019-01-09 20:38:26 -05:00
onAborted = { onContinueAnyway }
2017-07-19 17:05:08 -04:00
>
2019-07-21 17:31:22 -04:00
< p >
{ _ _ (
'This app is running with an incompatible version of the LBRY protocol. You can still use it, but there may be issues. Re-run the installation package for best results.'
) } { ' ' }
2019-11-05 13:54:58 -05:00
{ /* I noticed the period below could end up on a line by itself. This is probably not the ideal solution, but seems better than not adding this. */ }
< span style = { { whiteSpace : 'nowrap' } } >
< Button button = "link" label = { _ _ ( 'Learn more' ) } href = "https://lbry.com/faq/incompatible-protocol-version" / >
< / span >
2019-07-21 17:31:22 -04:00
< / p >
2017-07-19 17:05:08 -04:00
< / Modal >
) ;
}
}
export default ModalIncompatibleDaemon ;