mirror of
https://github.com/owncast/owncast.git
synced 2024-12-26 02:58:32 +03:00
44483a45d3
* style tweaks for Action Button, UserMenu, Modal * a bunch of misc polish; some around chat * Prettified Code! * cleanup * fix formatting * Reduce content padding a bit * some stylesheet cleanup * fix action button sizing * Remove action button height completely --------- Co-authored-by: gingervitis <gingervitis@users.noreply.github.com> Co-authored-by: Gabe Kangas <gabek@real-ity.com>
35 lines
1.1 KiB
TypeScript
35 lines
1.1 KiB
TypeScript
// export const ChatSocialMessage: FC<ChatSocialMessageProps> = ({ message }) => {
|
|
|
|
import dynamic from 'next/dynamic';
|
|
import { FC } from 'react';
|
|
import { NameChangeEvent } from '../../../interfaces/socket-events';
|
|
import styles from './ChatNameChangeMessage.module.scss';
|
|
|
|
export interface ChatNameChangeMessageProps {
|
|
message: NameChangeEvent;
|
|
}
|
|
|
|
// Lazy loaded components
|
|
|
|
const EditFilled = dynamic(() => import('@ant-design/icons/EditFilled'), {
|
|
ssr: false,
|
|
});
|
|
|
|
export const ChatNameChangeMessage: FC<ChatNameChangeMessageProps> = ({ message }) => {
|
|
const { oldName, user } = message;
|
|
const { displayName, displayColor } = user;
|
|
const color = `var(--theme-color-users-${displayColor})`;
|
|
|
|
return (
|
|
<div className={styles.nameChangeView}>
|
|
<div className={styles.icon}>
|
|
<EditFilled />
|
|
</div>
|
|
<div className={styles.nameChangeText}>
|
|
<span style={{ color }}>{oldName}</span>
|
|
<span className={styles.plain}> is now known as </span>
|
|
<span style={{ color }}>{displayName}</span>
|
|
</div>
|
|
</div>
|
|
);
|
|
};
|