0

small fixes on chat behaviour

This commit is contained in:
t1enne 2022-07-02 09:56:03 +02:00
parent 1bbca87afb
commit b279f8f707
3 changed files with 23 additions and 18 deletions

View File

@ -3,25 +3,13 @@
font-size: 0.9rem; font-size: 0.9rem;
padding: 5px 15px 5px 5px; padding: 5px 15px 5px 5px;
padding-left: 1rem; padding-left: 1rem;
.background {
position: absolute;
z-index: -1;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-color: currentColor;
opacity: 0.07;
border-radius: .25rem;
overflow: hidden;
}
.user { .user {
display: flex; display: flex;
align-items: center; align-items: center;
font-family: var(--theme-header-font-family); font-family: var(--theme-header-font-family);
font-weight: bold; font-weight: bold;
.userName { .userName {
margin-left: .3rem; margin-left: 0.3rem;
} }
} }
.message { .message {
@ -66,12 +54,24 @@
.customBorder { .customBorder {
left: auto; left: auto;
right: 0px; right: 0px;
opacity: .85;
&:after { &:after {
left: 0px; left: 0px;
} }
} }
.background {
position: absolute;
z-index: -1;
top: 0px;
left: 0px;
width: 100%;
height: 100%;
background-color: currentColor;
opacity: 0.07;
border-radius: 0.25rem;
overflow: hidden;
}
} }
.modMenuWrapper { .modMenuWrapper {
position: absolute; position: absolute;
@ -88,5 +88,3 @@
display: block; display: block;
} }
} }

View File

@ -47,7 +47,7 @@ export default function ChatUserMessage({
> >
{!sameUserAsLast && ( {!sameUserAsLast && (
<div className={s.user} style={{ color }}> <div className={s.user} style={{ color }}>
<ModIcon /> {showModeratorMenu && <ModIcon />}
<span className={s.userName}>{displayName}</span> <span className={s.userName}>{displayName}</span>
</div> </div>
)} )}

View File

@ -1,8 +1,15 @@
import { CSSProperties } from 'react';
interface Props {
style: CSSProperties;
fill: string;
stroke: string;
}
export default function ModIcon({ export default function ModIcon({
style = { width: '1rem', height: '1rem' }, style = { width: '1rem', height: '1rem' },
fill = 'none', fill = 'none',
stroke = 'var(--color-owncast-gray-300)', stroke = 'var(--color-owncast-gray-300)',
}) { }: Props) {
return ( return (
<svg <svg
fill={fill} fill={fill}