2018-09-26 19:48:07 +02:00
|
|
|
// @flow
|
2017-12-21 22:08:54 +01:00
|
|
|
import React from 'react';
|
|
|
|
import { Modal } from 'modal/modal';
|
2017-09-07 23:18:33 +02:00
|
|
|
|
2018-09-26 19:48:07 +02:00
|
|
|
type Props = {
|
2019-04-24 16:02:08 +02:00
|
|
|
uri: string,
|
|
|
|
metadata: StreamMetadata,
|
2018-09-26 19:48:07 +02:00
|
|
|
closeModal: () => void,
|
|
|
|
};
|
|
|
|
|
|
|
|
class ModalFileTimeout extends React.PureComponent<Props> {
|
2017-09-07 23:18:33 +02:00
|
|
|
render() {
|
2018-05-03 19:22:10 +02:00
|
|
|
const {
|
2019-04-24 16:02:08 +02:00
|
|
|
uri,
|
2018-05-03 19:22:10 +02:00
|
|
|
metadata: { title },
|
2018-09-26 19:48:07 +02:00
|
|
|
closeModal,
|
2018-05-03 19:22:10 +02:00
|
|
|
} = this.props;
|
2017-09-07 23:18:33 +02:00
|
|
|
|
|
|
|
return (
|
2019-05-07 23:38:29 +02:00
|
|
|
<Modal isOpen title={__('Unable to Download')} contentLabel={__('Download failed')} onConfirmed={closeModal}>
|
2019-07-21 23:31:22 +02:00
|
|
|
<p className="error-modal__error-list">
|
|
|
|
{__('LBRY was unable to download the stream')}:
|
|
|
|
<div>
|
|
|
|
<b>{title ? `"${title}"` : uri}</b>
|
|
|
|
</div>
|
|
|
|
</p>
|
2017-09-07 23:18:33 +02:00
|
|
|
</Modal>
|
|
|
|
);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
export default ModalFileTimeout;
|