Add support for disabled chat state in the chat input field. Closes #2761
This commit is contained in:
@@ -5,11 +5,13 @@ import {
|
||||
ClientConfigStore,
|
||||
currentUserAtom,
|
||||
visibleChatMessagesSelector,
|
||||
isChatAvailableSelector,
|
||||
} from '../../../../components/stores/ClientConfigStore';
|
||||
|
||||
export default function ReadOnlyChatEmbed() {
|
||||
const currentUser = useRecoilValue(currentUserAtom);
|
||||
const messages = useRecoilValue<ChatMessage[]>(visibleChatMessagesSelector);
|
||||
const isChatAvailable = useRecoilValue(isChatAvailableSelector);
|
||||
|
||||
return (
|
||||
<div>
|
||||
@@ -22,6 +24,7 @@ export default function ReadOnlyChatEmbed() {
|
||||
isModerator={false}
|
||||
showInput={false}
|
||||
height="100vh"
|
||||
chatAvailable={isChatAvailable}
|
||||
/>
|
||||
)}
|
||||
</div>
|
||||
|
||||
@@ -8,6 +8,7 @@ import {
|
||||
clientConfigStateAtom,
|
||||
appStateAtom,
|
||||
serverStatusState,
|
||||
isChatAvailableSelector,
|
||||
} from '../../../../components/stores/ClientConfigStore';
|
||||
import Header from '../../../../components/ui/Header/Header';
|
||||
import { ClientConfig } from '../../../../interfaces/client-config.model';
|
||||
@@ -21,6 +22,7 @@ export default function ReadWriteChatEmbed() {
|
||||
const clientStatus = useRecoilValue<ServerStatus>(serverStatusState);
|
||||
|
||||
const appState = useRecoilValue<AppStateOptions>(appStateAtom);
|
||||
const isChatAvailable = useRecoilValue(isChatAvailableSelector);
|
||||
|
||||
const { name, chatDisabled } = clientConfig;
|
||||
const { videoAvailable } = appState;
|
||||
@@ -41,6 +43,7 @@ export default function ReadWriteChatEmbed() {
|
||||
isModerator={currentUser.isModerator}
|
||||
showInput
|
||||
height="80vh"
|
||||
chatAvailable={isChatAvailable}
|
||||
/>
|
||||
</div>
|
||||
)}
|
||||
|
||||
Reference in New Issue
Block a user