From 10fd57e753b4e221bec4791775b001d5afa1651d Mon Sep 17 00:00:00 2001 From: Luke Berndt Date: Thu, 22 Feb 2024 22:11:40 -0500 Subject: [PATCH] Updated the support modal --- frontend/src/Call/CallPlayer.js | 13 +++++++++--- .../components => Common}/SupportModal.js | 16 ++++++++------ frontend/src/Event/EventPlayer.js | 21 ++++++++++++------- frontend/src/Main/Main.js | 5 ++++- frontend/src/System/SystemCard.js | 4 +--- 5 files changed, 38 insertions(+), 21 deletions(-) rename frontend/src/{Call/components => Common}/SupportModal.js (73%) diff --git a/frontend/src/Call/CallPlayer.js b/frontend/src/Call/CallPlayer.js index a7f449a..f4a108c 100644 --- a/frontend/src/Call/CallPlayer.js +++ b/frontend/src/Call/CallPlayer.js @@ -1,7 +1,7 @@ import React, { useEffect, useState, useRef } from "react"; import { useParams } from 'react-router-dom'; import MediaPlayer from "./components/MediaPlayer"; -import SupportModal from "./components/SupportModal"; +import SupportModal from "../Common/SupportModal"; import CallInfo from "./components/CallInfo"; import ListCalls from "./components/ListCalls"; import { useSelector, useDispatch } from 'react-redux' @@ -16,7 +16,9 @@ import { Icon, Sidebar, Message, - MessageHeader + MessageHeader, + Button, + ButtonContent } from "semantic-ui-react"; import "./CallPlayer.css"; import queryString from '../query-string'; @@ -205,7 +207,12 @@ useEffect(() => { handleAutoPlay(autoPlay)}>Autoplay - + + + Donate + + + } /> Download Link diff --git a/frontend/src/Call/components/SupportModal.js b/frontend/src/Common/SupportModal.js similarity index 73% rename from frontend/src/Call/components/SupportModal.js rename to frontend/src/Common/SupportModal.js index 6226040..9703095 100644 --- a/frontend/src/Call/components/SupportModal.js +++ b/frontend/src/Common/SupportModal.js @@ -2,9 +2,11 @@ import {useState} from 'react'; import { Modal, Button, + ButtonContent, + ButtonGroup, + Divider, Icon } from "semantic-ui-react"; -import "./FilterModal.css"; function SupportModal(props) { @@ -14,16 +16,18 @@ function SupportModal(props) { const handleClose = () => props.onClose(); return ( - setOpen(false)} onOpen={() => setOpen(true)} trigger={
Support OpenMHz
} size='tiny' > + setOpen(false)} onOpen={() => setOpen(true)} trigger={props.trigger} size='tiny' > Support OpenMHz

If OpenMHz brings you joy, think about becoming a supporter! It will cover hosting costs and help keep me focused on development.

-

No worries if not, I am not having problems keeping it going.

- + + Donate + + + +
diff --git a/frontend/src/Event/EventPlayer.js b/frontend/src/Event/EventPlayer.js index 9c10606..fad3d3d 100644 --- a/frontend/src/Event/EventPlayer.js +++ b/frontend/src/Event/EventPlayer.js @@ -1,21 +1,21 @@ -import React, { useEffect, useLayoutEffect, useState, useRef } from "react"; -import { Link, useLocation, useParams, useNavigate } from 'react-router-dom'; -import { skipToken } from '@reduxjs/toolkit/query' +import React, { useEffect, useState, useRef } from "react"; +import { useNavigate } from 'react-router-dom'; import MediaPlayer from "../Call/components/MediaPlayer"; -import SupportModal from "../Call/components/SupportModal"; +import SupportModal from "../Common/SupportModal"; import EventCallInfo from "./EventCallInfo"; import ListEventCalls from "./ListEventCalls"; -import { useSelector, useDispatch } from 'react-redux' +import { useDispatch } from 'react-redux' import { Container, - Label, Rail, Sticky, Menu, Icon, - Sidebar + Sidebar, + Button, + ButtonContent } from "semantic-ui-react"; @@ -118,7 +118,12 @@ function EventPlayer(props) { handleAutoPlay(autoPlay)}>Autoplay - + + + Donate + + + } /> Download Link diff --git a/frontend/src/Main/Main.js b/frontend/src/Main/Main.js index 9c5313b..1d6f565 100644 --- a/frontend/src/Main/Main.js +++ b/frontend/src/Main/Main.js @@ -1,6 +1,7 @@ import React, { useState, useEffect, useRef } from "react"; import { Link, useNavigate } from 'react-router-dom' import SystemCard from "../System/SystemCard"; +import SupportModal from "../Common/SupportModal"; import "./Main.css"; import { createMedia } from "@artsy/fresnel"; import { @@ -295,12 +296,14 @@ const Main = (props) => { - + } /> diff --git a/frontend/src/System/SystemCard.js b/frontend/src/System/SystemCard.js index fc2aa9a..1606e9b 100644 --- a/frontend/src/System/SystemCard.js +++ b/frontend/src/System/SystemCard.js @@ -123,12 +123,10 @@ function SystemCard(props) { {description} - {statusMessage.length && + {statusMessage && - {statusMessage}} /> - }