1
0
forked from notnull/ircz

grey out notifications

This commit is contained in:
data 2019-07-28 14:18:37 +01:00
parent abcce5c839
commit 5bf5c2b983

View File

@ -431,13 +431,18 @@ class App extends React.Component {
(m.from === this.state.user.socketId &&
m.to === this.state.namespace)
)
.map(m => (
<div className="d-flex" key={m.id}>
<div className="p-2 text-nowrap">{m.date}</div>
<div className="p-2">{m.nick}</div>
<div className="p-2 flex-grow-1">{m.text}</div>
</div>
))}
.map(m => {
const rowColor = m.from === 'server' ? 'text-secondary' : ''
return (
<div className={`d-flex ${rowColor}`} key={m.id}>
<div className="pr-3 text-nowrap">{m.date}</div>
{m.from === 'server' ? null : (
<div className="pr-3 text-nowrap">{m.nick}:</div>
)}
<div className="pr-3 flex-grow-1">{m.text}</div>
</div>
)
})}
</div>
<form onSubmit={this.submitMessage}>
<input