mirror of
https://github.com/owncast/owncast.git
synced 2024-11-26 06:46:01 +03:00
Add offline homepage info box about the directory if it's disabled
This commit is contained in:
parent
1e22371968
commit
e3472226d2
2 changed files with 16 additions and 2 deletions
|
@ -65,7 +65,7 @@ export default function Home() {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!broadcaster) {
|
if (!broadcaster) {
|
||||||
return <Offline logs={logsData} />;
|
return <Offline logs={logsData} config={configData} />;
|
||||||
}
|
}
|
||||||
|
|
||||||
// map out settings
|
// map out settings
|
||||||
|
|
|
@ -5,13 +5,14 @@ import {
|
||||||
QuestionCircleTwoTone,
|
QuestionCircleTwoTone,
|
||||||
BookTwoTone,
|
BookTwoTone,
|
||||||
PlaySquareTwoTone,
|
PlaySquareTwoTone,
|
||||||
|
ProfileTwoTone,
|
||||||
} from '@ant-design/icons';
|
} from '@ant-design/icons';
|
||||||
import OwncastLogo from '../components/logo';
|
import OwncastLogo from '../components/logo';
|
||||||
import LogTable from '../components/log-table';
|
import LogTable from '../components/log-table';
|
||||||
|
|
||||||
const { Meta } = Card;
|
const { Meta } = Card;
|
||||||
|
|
||||||
export default function Offline({ logs = [] }) {
|
export default function Offline({ logs = [], config}) {
|
||||||
const data = [
|
const data = [
|
||||||
{
|
{
|
||||||
icon: <BookTwoTone twoToneColor="#6f42c1" />,
|
icon: <BookTwoTone twoToneColor="#6f42c1" />,
|
||||||
|
@ -53,6 +54,19 @@ export default function Offline({ logs = [] }) {
|
||||||
},
|
},
|
||||||
];
|
];
|
||||||
|
|
||||||
|
if (!config?.yp?.enabled) {
|
||||||
|
data.push({
|
||||||
|
icon: <ProfileTwoTone twoToneColor="#D18BFE" />,
|
||||||
|
title: 'Find an audience on the Owncast Directory',
|
||||||
|
content: (
|
||||||
|
<div>
|
||||||
|
List yourself in the Owncast Directory and show off your stream.
|
||||||
|
Enable it in <Link href="/config-public-details">settings.</Link>
|
||||||
|
</div>
|
||||||
|
),
|
||||||
|
});
|
||||||
|
}
|
||||||
|
|
||||||
return (
|
return (
|
||||||
<>
|
<>
|
||||||
<Row gutter={[16, 16]} className="offline-content">
|
<Row gutter={[16, 16]} className="offline-content">
|
||||||
|
|
Loading…
Reference in a new issue