From c148bb4d84305f526e2c77556cd74d1b3d7c6546 Mon Sep 17 00:00:00 2001 From: Roland Date: Tue, 8 Nov 2022 22:42:00 -0700 Subject: [PATCH] Adding Donate page. --- app/src/App.js | 16 ++++++-- app/src/Dashboard.js | 2 +- app/src/components/Channels.js | 2 +- app/src/components/Common.js | 14 ++++++- app/src/components/Donate.js | 68 ++++++++++++++++++++++++++++++++++ app/src/components/Videos.js | 13 ++----- 6 files changed, 99 insertions(+), 16 deletions(-) create mode 100644 app/src/components/Donate.js diff --git a/app/src/App.js b/app/src/App.js index 32bf9fea..e65e926b 100644 --- a/app/src/App.js +++ b/app/src/App.js @@ -1,7 +1,7 @@ import React, {useContext} from 'react'; import './App.css'; import {NavBar} from "./components/Nav"; -import {Route, Routes} from "react-router-dom"; +import {Link, Route, Routes} from "react-router-dom"; import {VideosRoute, VideoWrapper} from "./components/Videos"; import Admin from "./components/admin/Admin"; import {Container} from "semantic-ui-react"; @@ -17,6 +17,7 @@ import {MapRoute} from "./components/Map"; import {StatusContext, ThemeContext} from "./contexts/contexts"; import {ThemeWrapper} from "./components/Theme"; import {Dashboard} from "./Dashboard"; +import {Donate} from "./components/Donate"; function PageNotFound() { return ( @@ -28,9 +29,15 @@ function PageNotFound() { function Footer() { const {t} = useContext(ThemeContext); const {status} = useContext(StatusContext); - const {version} = status; - return - WROLPi v{version} GitHub + let {version} = status; + version = version ? `v${version}` : null; + return + + WROLPi {version}  •  + Donate  •  + GitHub  •  + Discord + } @@ -54,6 +61,7 @@ export default function App() { }/> }/> }/> + }/> }/> diff --git a/app/src/Dashboard.js b/app/src/Dashboard.js index dc921d98..4dcfe945 100644 --- a/app/src/Dashboard.js +++ b/app/src/Dashboard.js @@ -85,7 +85,7 @@ function DashboardStatus() { {bandwidths} - + diff --git a/app/src/components/Channels.js b/app/src/components/Channels.js index 60fd256f..2da526d5 100644 --- a/app/src/components/Channels.js +++ b/app/src/components/Channels.js @@ -437,7 +437,7 @@ function ChannelPage({create, header}) { onConfirm={handleDeleteConfirm} /> + setOpen(false)} + onOpen={() => setOpen(true)} + > + {header} + + + + + +} + +function CoinRow({header, qrCodeValue, address, buttonColor}) { + return <> +
{header}
+ + + + + + + +
{address}
+
+
+
+
+ +} + +export function Donate() { + useTitle('Donate'); + + return ( + +
Donate
+
We appreciate any support you can provide to WROLPi!
+ + + + +
+
); +} diff --git a/app/src/components/Videos.js b/app/src/components/Videos.js index 1e508a9d..f6ba0ccb 100644 --- a/app/src/components/Videos.js +++ b/app/src/components/Videos.js @@ -2,6 +2,7 @@ import React, {useContext, useEffect, useState} from 'react'; import {Link, Route, Routes, useParams} from "react-router-dom"; import { CardLink, + CardPosterLink, defaultSearchOrder, defaultVideoOrder, Duration, @@ -317,19 +318,13 @@ export function VideoCard({file}) { if (video.favorite) { imageLabel = {corner: 'left', icon: 'heart', color: 'green'}; } - let poster = ; + let poster = ; if (poster_url) { - poster = ; + poster = ; } return ( - - {poster} - + {poster}