diff --git a/frontend/js/components/buttons/download.js b/frontend/js/components/buttons/download.js index 5012cbe..8e9a3ed 100644 --- a/frontend/js/components/buttons/download.js +++ b/frontend/js/components/buttons/download.js @@ -22,8 +22,9 @@ DownloadAndStream.propTypes = { const DownloadButton = ({ url }) => (
- - Download + + + Download
); @@ -37,9 +38,10 @@ const StreamButton = ({ name, url, subtitles }) => {
{ e.preventDefault(); setShowModal(true) }}> - Play + + Play
diff --git a/frontend/js/components/buttons/imdb.js b/frontend/js/components/buttons/imdb.js index b396d5a..46bd445 100644 --- a/frontend/js/components/buttons/imdb.js +++ b/frontend/js/components/buttons/imdb.js @@ -7,9 +7,10 @@ export const ImdbBadge = ({ imdbId }) => { return (
- IMDb + IMDb +
); diff --git a/frontend/js/components/buttons/showMore.js b/frontend/js/components/buttons/showMore.js index 291d4a9..c2a247f 100644 --- a/frontend/js/components/buttons/showMore.js +++ b/frontend/js/components/buttons/showMore.js @@ -13,7 +13,7 @@ export const ShowMore = ({ children, id, inLibrary }) => { setDisplay(true)} - className="badge badge-pill badge-info clickable" + className="badge badge-pill badge-secondary clickable" > More options ... diff --git a/frontend/js/components/buttons/subtitles.js b/frontend/js/components/buttons/subtitles.js index 1f2ddf7..bcf8510 100644 --- a/frontend/js/components/buttons/subtitles.js +++ b/frontend/js/components/buttons/subtitles.js @@ -1,4 +1,4 @@ -import React from "react" +import React, { useState } from "react" import PropTypes from "prop-types" import { List } from "immutable" @@ -11,24 +11,37 @@ export const SubtitlesButton = ({ search, }) => { if (inLibrary === false) { return null } + /* eslint-disable */ + const [show, setShow] = useState(false); + /* eslint-enable */ + + const onSelect = (eventKey) => { + if (eventKey === null || eventKey != 1) { + setShow(false); + } + } + + const onToggle = (isOpen, event, metadata) => { + // Don't close on select + if (metadata && metadata.source !== "select") { + setShow(isOpen); + } + } const count = (subtitles && subtitles.size !== 0) ? subtitles.size : 0; return ( - - - + + + Subtitles - + {count} - - Advanced - - + Automatic search diff --git a/frontend/js/components/buttons/torrents.js b/frontend/js/components/buttons/torrents.js index 73786e1..2f0c4a1 100644 --- a/frontend/js/components/buttons/torrents.js +++ b/frontend/js/components/buttons/torrents.js @@ -1,4 +1,4 @@ -import React from "react" +import React, { useState } from "react" import PropTypes from "prop-types" import { List } from "immutable" import { connect } from "react-redux" @@ -50,24 +50,39 @@ const torrentsButton = ({ addTorrent, url, }) => { + /* eslint-disable */ + const [show, setShow] = useState(false); + /* eslint-enable */ const entries = buildMenuItems(torrents); const count = (torrents && torrents.size !== 0) ? torrents.size : 0; + + const onSelect = (eventKey) => { + // Close the dropdown if the eventkey is not specified + if (eventKey === null) { + setShow(false); + } + } + + const onToggle = (isOpen, event, metadata) => { + // Don't close on select + if (metadata && metadata.source !== "select") { + setShow(isOpen); + } + } + return ( - - + + Torrents - + {count} - - Advanced - - + Automatic search diff --git a/frontend/js/components/list/posters.js b/frontend/js/components/list/posters.js index aeae0fa..daa40dd 100644 --- a/frontend/js/components/list/posters.js +++ b/frontend/js/components/list/posters.js @@ -11,6 +11,10 @@ import Poster from "./poster" import Loader from "../loader/loader" const ListPosters = (props) => { + if (props.loading) { + return (); + } + let elmts = props.data; const listSize = elmts !== undefined ? elmts.size : 0; @@ -174,10 +178,6 @@ const Posters = (props) => { } }, [move]) - if (props.loading) { - return (); - } - if (props.elmts.size === 0) { return (
diff --git a/frontend/js/components/loader/loader.js b/frontend/js/components/loader/loader.js index c8cc961..e90d004 100644 --- a/frontend/js/components/loader/loader.js +++ b/frontend/js/components/loader/loader.js @@ -2,15 +2,13 @@ import React from "react" import Loading from "react-loading" const Loader = () => ( -
-
- -
+
+
); export default Loader; diff --git a/frontend/js/components/shows/details/season.js b/frontend/js/components/shows/details/season.js index e2b68ee..918e27e 100644 --- a/frontend/js/components/shows/details/season.js +++ b/frontend/js/components/shows/details/season.js @@ -6,19 +6,17 @@ import { Episode } from "./episode" export const Season = (props) => { const [show, setShow] = useState(false); - const visibility = show ? "d-flex flex-column" : "d-none"; - const icon = show ? "down" : "left" return ( -
+
setShow(!show)}>
Season {props.season} — ({props.data.toList().size} episodes) - +
-
+
{props.data.toList().map(function(episode) { let key = `${episode.get("season")}-${episode.get("episode")}`; return ( diff --git a/frontend/js/components/shows/details/seasons.js b/frontend/js/components/shows/details/seasons.js index 3d7bf30..5b676bb 100644 --- a/frontend/js/components/shows/details/seasons.js +++ b/frontend/js/components/shows/details/seasons.js @@ -7,6 +7,7 @@ import { Season } from "./season" export const SeasonsList = (props) => (
{props.data.get("seasons").entrySeq().map(function([season, data]) { + if (season === 0) { return null } return ( div { } } +.show-season > div.card-body { + background-color: rgba($body-bg, .5) +} + .episode-thumb { img { @include media-breakpoint-down(md) {