From e3472226d2aeb182fd5bc5b63276c832b4fbfb0d Mon Sep 17 00:00:00 2001 From: Gabe Kangas Date: Wed, 17 Feb 2021 11:40:22 -0800 Subject: [PATCH] Add offline homepage info box about the directory if it's disabled --- web/pages/index.tsx | 2 +- web/pages/offline-notice.tsx | 16 +++++++++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/web/pages/index.tsx b/web/pages/index.tsx index f7dc0a1ff..bf03c3c94 100644 --- a/web/pages/index.tsx +++ b/web/pages/index.tsx @@ -65,7 +65,7 @@ export default function Home() { } if (!broadcaster) { - return ; + return ; } // map out settings diff --git a/web/pages/offline-notice.tsx b/web/pages/offline-notice.tsx index 28b059616..453a57fe9 100644 --- a/web/pages/offline-notice.tsx +++ b/web/pages/offline-notice.tsx @@ -5,13 +5,14 @@ import { QuestionCircleTwoTone, BookTwoTone, PlaySquareTwoTone, + ProfileTwoTone, } from '@ant-design/icons'; import OwncastLogo from '../components/logo'; import LogTable from '../components/log-table'; const { Meta } = Card; -export default function Offline({ logs = [] }) { +export default function Offline({ logs = [], config}) { const data = [ { icon: , @@ -53,6 +54,19 @@ export default function Offline({ logs = [] }) { }, ]; + if (!config?.yp?.enabled) { + data.push({ + icon: , + title: 'Find an audience on the Owncast Directory', + content: ( +
+ List yourself in the Owncast Directory and show off your stream. + Enable it in settings. +
+ ), + }); + } + return ( <>