UI tweaks.

1. Display call duration.
2. Make mute/unmute buttons work.
This commit is contained in:
aforge
2022-04-20 22:33:14 -07:00
parent 517f457182
commit ad98bec73e
5 changed files with 59 additions and 27 deletions
+4 -1
View File
@@ -1,6 +1,7 @@
// Single message, sent or received.
import React from 'react';
import { FormattedMessage, injectIntl } from 'react-intl';
import FormattedDuration from 'react-intl-formatted-duration';
import { Drafty } from 'tinode-sdk';
import Attachment from './attachment.jsx';
@@ -150,7 +151,9 @@ class BaseChatMessage extends React.PureComponent {
// Video calls.
const direction = this.props.response ? "call_received" : "call_made";
const text = this.props.response ? "Incoming Call" : "Outgoing Call";
content = <><i className="material-icons" style={{color:this.props.content == "disconnected" ? "red" : "green"}}>{direction}</i>{text}</>
content = <><i className="material-icons" style={{color:this.props.content == "disconnected" ? "red" : "green"}}>{direction}</i>{text}
(<FormattedDuration seconds={this.props.duration / 1000} format="{hours} {minutes} {seconds}" />)
</>
} else if (typeof content != 'string') {
content = <><i className="material-icons gray">warning_amber</i> <i className="gray">
<FormattedMessage id="invalid_content"