autoplayout selector

add autoplayout selector
This commit is contained in:
Michael Grace 2021-01-25 22:17:31 +00:00 committed by GitHub
commit 392db7a5da
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 54 additions and 0 deletions

View file

@ -0,0 +1,37 @@
import React from "react";
import { FaTimes, FaPlayCircle } from "react-icons/fa";
import Modal from "react-modal";
import { Button } from "reactstrap";
interface AutoPlayoutProps {
isOpen: boolean;
close: () => any;
}
export function AutoPlayoutModal(props: AutoPlayoutProps) {
return (
<Modal isOpen={props.isOpen} onRequestClose={props.close}>
<div>
<h1 className="d-inline">
<FaPlayCircle className="mx-2" size={30} />
URY Automatic Playout
</h1>
<Button
onClick={props.close}
className="float-right pt-1"
color="primary"
>
<FaTimes />
</Button>
</div>
<hr />
<iframe
id="uploadIframe"
src={process.env.REACT_APP_MYRADIO_NONAPI_BASE + "/NIPSWeb/playout/"}
frameBorder="0"
title="URY Automatic Playout"
></iframe>
<div></div>
</Modal>
);
}

View file

@ -9,6 +9,7 @@ import {
FaMicrophone, FaMicrophone,
FaTrash, FaTrash,
FaUpload, FaUpload,
FaPlayCircle,
FaCircleNotch, FaCircleNotch,
FaPencilAlt, FaPencilAlt,
} from "react-icons/fa"; } from "react-icons/fa";
@ -55,6 +56,7 @@ import { CombinedNavAlertBar } from "../navbar";
import { OptionsMenu } from "../optionsMenu"; import { OptionsMenu } from "../optionsMenu";
import { WelcomeModal } from "./WelcomeModal"; import { WelcomeModal } from "./WelcomeModal";
import { PisModal } from "./PISModal"; import { PisModal } from "./PISModal";
import { AutoPlayoutModal } from "./AutoPlayoutModal";
import { LibraryUploadModal } from "./LibraryUploadModal"; import { LibraryUploadModal } from "./LibraryUploadModal";
import { ImporterModal } from "./ImporterModal"; import { ImporterModal } from "./ImporterModal";
import "./channel.scss"; import "./channel.scss";
@ -93,6 +95,7 @@ function LibraryColumn() {
(state: RootState) => state.showplan (state: RootState) => state.showplan
); );
const [autoPlayoutModal, setAutoPlayoutModal] = useState(false);
const [showLibraryUploadModal, setShowLibraryModal] = useState(false); const [showLibraryUploadModal, setShowLibraryModal] = useState(false);
const [showImporterModal, setShowImporterModal] = useState(false); const [showImporterModal, setShowImporterModal] = useState(false);
@ -102,6 +105,10 @@ function LibraryColumn() {
return ( return (
<> <>
<AutoPlayoutModal
isOpen={autoPlayoutModal}
close={() => setAutoPlayoutModal(false)}
/>
<LibraryUploadModal <LibraryUploadModal
isOpen={showLibraryUploadModal} isOpen={showLibraryUploadModal}
close={() => setShowLibraryModal(false)} close={() => setShowLibraryModal(false)}
@ -116,6 +123,16 @@ function LibraryColumn() {
<FaBookOpen className="mx-2" size={28} /> <FaBookOpen className="mx-2" size={28} />
Libraries Libraries
</h2> </h2>
<Button
className="mr-1"
color="primary"
title="Auto Playout"
size="sm"
outline={true}
onClick={() => setAutoPlayoutModal(true)}
>
<FaPlayCircle /> Auto Playout
</Button>
<Button <Button
className="mr-1" className="mr-1"
color="primary" color="primary"