mirror of
				https://github.com/owncast/owncast.git
				synced 2025-11-04 05:17:27 +08:00 
			
		
		
		
	Fix chat user color variable
This commit is contained in:
		@ -33,7 +33,7 @@ export default function ChatContainer(props: Props) {
 | 
				
			|||||||
  const getNameChangeViewForMessage = (message: NameChangeEvent) => {
 | 
					  const getNameChangeViewForMessage = (message: NameChangeEvent) => {
 | 
				
			||||||
    const { oldName, user } = message;
 | 
					    const { oldName, user } = message;
 | 
				
			||||||
    const { displayName, displayColor } = user;
 | 
					    const { displayName, displayColor } = user;
 | 
				
			||||||
    const color = `var(--theme-user-colors-${displayColor})`;
 | 
					    const color = `var(--theme-color-users-${displayColor})`;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
    return (
 | 
					    return (
 | 
				
			||||||
      <div className={s.nameChangeView}>
 | 
					      <div className={s.nameChangeView}>
 | 
				
			||||||
 | 
				
			|||||||
@ -86,7 +86,7 @@ const ConnectedClient = ({ client }: { client: Client }) => {
 | 
				
			|||||||
 | 
					
 | 
				
			||||||
// eslint-disable-next-line react/prop-types
 | 
					// eslint-disable-next-line react/prop-types
 | 
				
			||||||
const UserColorBlock = ({ color }) => {
 | 
					const UserColorBlock = ({ color }) => {
 | 
				
			||||||
  const bg = `var(--theme-user-colors-${color})`;
 | 
					  const bg = `var(--theme-color-users-${color})`;
 | 
				
			||||||
  return (
 | 
					  return (
 | 
				
			||||||
    <Row justify="space-around" align="middle">
 | 
					    <Row justify="space-around" align="middle">
 | 
				
			||||||
      <Col span={12}>Color</Col>
 | 
					      <Col span={12}>Color</Col>
 | 
				
			||||||
 | 
				
			|||||||
@ -32,7 +32,7 @@ export default function ChatUserMessage({
 | 
				
			|||||||
  const { id: messageId, body, user, timestamp } = message;
 | 
					  const { id: messageId, body, user, timestamp } = message;
 | 
				
			||||||
  const { id: userId, displayName, displayColor } = user;
 | 
					  const { id: userId, displayName, displayColor } = user;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
  const color = `var(--theme-user-colors-${displayColor})`;
 | 
					  const color = `var(--theme-color-users-${displayColor})`;
 | 
				
			||||||
  const formattedTimestamp = `Sent ${formatTimestamp(timestamp)}`;
 | 
					  const formattedTimestamp = `Sent ${formatTimestamp(timestamp)}`;
 | 
				
			||||||
  const [formattedMessage, setFormattedMessage] = useState<string>(body);
 | 
					  const [formattedMessage, setFormattedMessage] = useState<string>(body);
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
				
			|||||||
		Reference in New Issue
	
	Block a user