Refactor messages model; New timeline react components
This commit is contained in:
parent
d342b23cbc
commit
c41bc53614
31 changed files with 1463 additions and 3395 deletions
26
ts/components/conversation/LastSeenIndicator.tsx
Normal file
26
ts/components/conversation/LastSeenIndicator.tsx
Normal file
|
@ -0,0 +1,26 @@
|
|||
import React from 'react';
|
||||
|
||||
import { LocalizerType } from '../../types/Util';
|
||||
|
||||
type Props = {
|
||||
count: number;
|
||||
i18n: LocalizerType;
|
||||
};
|
||||
|
||||
export class LastSeenIndicator extends React.Component<Props> {
|
||||
public render() {
|
||||
const { count, i18n } = this.props;
|
||||
|
||||
const message =
|
||||
count === 1
|
||||
? i18n('unreadMessage')
|
||||
: i18n('unreadMessages', [String(count)]);
|
||||
|
||||
return (
|
||||
<div className="module-last-seen-indicator">
|
||||
<div className="module-last-seen-indicator__bar" />
|
||||
<div className="module-last-seen-indicator__text">{message}</div>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue