show stream info in infomenu

This commit is contained in:
nklhrstv 2020-04-07 15:08:37 +03:00
parent 0f76ad5e64
commit 7dfb48d87d
2 changed files with 19 additions and 2 deletions

View file

@ -1,11 +1,12 @@
const React = require('react');
const PropTypes = require('prop-types');
const classnames = require('classnames');
const Stream = require('stremio/routes/MetaDetails/StreamsList/Stream');
const { MetaPreview, CONSTANTS } = require('stremio/common');
const styles = require('./styles');
const InfoMenu = ({ className, ...props }) => {
// TODO handle stream and addon
// TODO handle addon ui
const metaItem = React.useMemo(() => {
return props.metaItem !== null ?
{
@ -36,13 +37,25 @@ const InfoMenu = ({ className, ...props }) => {
:
null
}
{
props.stream !== null ?
<Stream
{...props.stream}
className={classnames(styles['stream'], 'active')}
addonName={props.addon !== null ? props.addon.manifest.name : ''}
/>
:
null
}
</div>
);
};
InfoMenu.propTypes = {
className: PropTypes.string,
metaItem: PropTypes.object
metaItem: PropTypes.object,
addon: PropTypes.object,
stream: PropTypes.object
};
module.exports = InfoMenu;

View file

@ -1,3 +1,7 @@
.info-menu-container {
width: 30rem;
.stream {
pointer-events: none;
}
}