Add button to stream episodes
This commit is contained in:
parent
6b2abcf1e8
commit
d17bd6b030
@ -21,15 +21,20 @@ export default class DownloadButton extends React.Component {
|
||||
return null;
|
||||
}
|
||||
|
||||
let btnSize = "btn-sm";
|
||||
if (this.props.xs) {
|
||||
btnSize = "btn-xs";
|
||||
}
|
||||
|
||||
const infuse = `infuse://x-callback-url/play?url=${this.props.url}`;
|
||||
return (
|
||||
<Dropdown id="streaming-buttons" dropup>
|
||||
<Button bsStyle="danger" className="btn-sm" href={this.props.url}>
|
||||
<Dropdown id="streaming-buttons" className={this.props.customClassName} dropup>
|
||||
<Button bsStyle="danger" className={btnSize} href={this.props.url}>
|
||||
<span>
|
||||
<i className="fa fa-download" aria-hidden="true"></i> Download
|
||||
</span>
|
||||
</Button>
|
||||
<Dropdown.Toggle bsStyle="danger" className="btn-sm"/>
|
||||
<Dropdown.Toggle bsStyle="danger" className={btnSize}/>
|
||||
<Dropdown.Menu>
|
||||
<MenuItem eventKey="1" href={infuse}>
|
||||
<span>
|
||||
|
@ -1,5 +1,7 @@
|
||||
import React from 'react'
|
||||
|
||||
import Loader from '../loader/loader'
|
||||
import DownloadButton from '../buttons/download'
|
||||
|
||||
import { OverlayTrigger, Tooltip } from 'react-bootstrap'
|
||||
|
||||
@ -178,7 +180,11 @@ function Episode(props) {
|
||||
/>
|
||||
)
|
||||
})}
|
||||
<DownloadButton data={props.data}/>
|
||||
<DownloadButton
|
||||
url={props.data.polochon_url}
|
||||
customClassName="episode-button"
|
||||
xs
|
||||
/>
|
||||
<GetDetailsButton
|
||||
data={props.data}
|
||||
getEpisodeDetails={props.getEpisodeDetails}
|
||||
@ -295,20 +301,6 @@ class TrackButton extends React.Component {
|
||||
}
|
||||
}
|
||||
|
||||
function DownloadButton(props) {
|
||||
if (props.data.polochon_url === "") {
|
||||
return null
|
||||
}
|
||||
|
||||
return (
|
||||
<span className="episode-button">
|
||||
<a type="button" className="btn btn-xs btn-warning" href={props.data.polochon_url}>
|
||||
<i className="fa fa-download"></i> Download
|
||||
</a>
|
||||
</span>
|
||||
);
|
||||
}
|
||||
|
||||
class GetDetailsButton extends React.Component {
|
||||
constructor(props) {
|
||||
super(props);
|
||||
|
Loading…
x
Reference in New Issue
Block a user