Add custom offline message+api. Part of #1901

This commit is contained in:
Gabe Kangas
2022-08-09 22:09:43 -07:00
parent 2c1624127a
commit 681067ab93
9 changed files with 73 additions and 2 deletions

View File

@@ -53,7 +53,7 @@ export default function ContentComponent() {
const chatUserId = useRecoilValue<string>(chatUserIdAtom);
const { viewerCount, lastConnectTime, lastDisconnectTime } =
useRecoilValue<ServerStatus>(serverStatusState);
const { extraPageContent, version, name, externalActions } = clientConfig;
const { extraPageContent, version, name, externalActions, offlineMessage } = clientConfig;
const [showNotifyReminder, setShowNotifyReminder] = useState(false);
const [showNotifyPopup, setShowNotifyPopup] = useState(false);
@@ -109,7 +109,10 @@ export default function ContentComponent() {
{!online && (
<OfflineBanner
name={name}
text="Stream is offline text goes here. Will create a new form to set it in the Admin."
text={
offlineMessage ||
'Stream is offline text goes here. Will create a new form to set it in the Admin.'
}
/>
)}
<StatusBar

View File

@@ -2,6 +2,7 @@ export interface ClientConfig {
name: string;
title?: string;
summary: string;
offlineMessage?: string;
logo: string;
tags: string[];
version: string;
@@ -46,6 +47,7 @@ export function makeEmptyClientConfig(): ClientConfig {
return {
name: '',
summary: '',
offlineMessage: '',
logo: '',
tags: [],
version: '',