mirror of
https://github.com/owncast/owncast.git
synced 2024-10-10 19:16:02 +00:00
Updated styles to match design for chat msgs
This commit is contained in:
parent
a9f97346a7
commit
f90295269e
@ -53,9 +53,10 @@ function shouldCollapseMessages(messages: ChatMessage[], index: number): boolean
|
||||
return id === lastMessage?.user.id;
|
||||
}
|
||||
|
||||
function checkIsModerator(message) {
|
||||
const { user } = message;
|
||||
const { scopes } = user;
|
||||
function checkIsModerator(message: ChatMessage | ConnectedClientInfoEvent) {
|
||||
const {
|
||||
user: { scopes },
|
||||
} = message;
|
||||
|
||||
if (!scopes || scopes.length === 0) {
|
||||
return false;
|
||||
@ -97,8 +98,9 @@ export const ChatContainer: FC<ChatContainerProps> = ({
|
||||
};
|
||||
|
||||
const getUserJoinedMessage = (message: ChatMessage) => {
|
||||
const { user } = message;
|
||||
const { displayName, displayColor } = user;
|
||||
const {
|
||||
user: { displayName, displayColor },
|
||||
} = message;
|
||||
const isAuthorModerator = checkIsModerator(message);
|
||||
return (
|
||||
<ChatJoinMessage
|
||||
|
@ -1,12 +1,14 @@
|
||||
$border-style: 3px solid currentColor;
|
||||
$p-size: 5px;
|
||||
|
||||
.root {
|
||||
* {
|
||||
z-index: 100;
|
||||
}
|
||||
border-right: 2px solid currentColor;
|
||||
border-left: $border-style;
|
||||
position: relative;
|
||||
font-size: 0.9rem;
|
||||
padding: 0px 15px 5px 5px;
|
||||
padding-left: 1rem;
|
||||
padding: 0px $p-size $p-size $p-size;
|
||||
.user {
|
||||
display: flex;
|
||||
align-items: center;
|
||||
@ -17,7 +19,7 @@
|
||||
.message {
|
||||
overflow: hidden;
|
||||
overflow-wrap: anywhere;
|
||||
color: var(--theme-color-components-chat-text);
|
||||
font-weight: 600;
|
||||
|
||||
mark {
|
||||
padding-left: 0.35em;
|
||||
@ -27,9 +29,6 @@
|
||||
}
|
||||
|
||||
&.ownMessage {
|
||||
border-right: none;
|
||||
border-left: 2px solid currentColor;
|
||||
|
||||
.background {
|
||||
position: absolute;
|
||||
z-index: -1;
|
||||
@ -61,5 +60,10 @@
|
||||
}
|
||||
|
||||
.messagePadding {
|
||||
padding: 0px 3px;
|
||||
padding: 0px 0px;
|
||||
padding-top: .4rem;
|
||||
}
|
||||
|
||||
.messagePaddingCollapsed {
|
||||
padding: 0px 0px;
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user