mirror of
https://github.com/Stremio/stremio-web.git
synced 2026-03-11 17:15:48 +00:00
show stream info in infomenu
This commit is contained in:
parent
0f76ad5e64
commit
7dfb48d87d
2 changed files with 19 additions and 2 deletions
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -1,3 +1,7 @@
|
|||
.info-menu-container {
|
||||
width: 30rem;
|
||||
|
||||
.stream {
|
||||
pointer-events: none;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue