nicer message bubbles for calls
This commit is contained in:
@@ -1727,6 +1727,15 @@ video {
|
|||||||
text-align: center;
|
text-align: center;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.call-message {
|
||||||
|
display: flex;
|
||||||
|
flex-direction: row;
|
||||||
|
}
|
||||||
|
|
||||||
|
.call-message .duration {
|
||||||
|
font-weight: lighter;
|
||||||
|
}
|
||||||
|
|
||||||
/* Talk bubbles */
|
/* Talk bubbles */
|
||||||
.chat-box {
|
.chat-box {
|
||||||
list-style: none;
|
list-style: none;
|
||||||
@@ -2419,6 +2428,9 @@ ul.tabbar li.active > a {
|
|||||||
.material-icons.small {
|
.material-icons.small {
|
||||||
font-size: 1rem;
|
font-size: 1rem;
|
||||||
}
|
}
|
||||||
|
.material-icons.medium {
|
||||||
|
font-size: 1.2rem;
|
||||||
|
}
|
||||||
.material-icons.big {
|
.material-icons.big {
|
||||||
font-size: 2.4rem;
|
font-size: 2.4rem;
|
||||||
}
|
}
|
||||||
|
|||||||
Vendored
+1
-1
File diff suppressed because one or more lines are too long
+8
-2
@@ -1377,7 +1377,7 @@
|
|||||||
},
|
},
|
||||||
"calls_incoming": {
|
"calls_incoming": {
|
||||||
"translation": "",
|
"translation": "",
|
||||||
"defaultMessage": "Incoming Call",
|
"defaultMessage": "Incoming call",
|
||||||
"description": "Incoming call label",
|
"description": "Incoming call label",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
@@ -1391,7 +1391,7 @@
|
|||||||
},
|
},
|
||||||
"calls_outgoing": {
|
"calls_outgoing": {
|
||||||
"translation": "",
|
"translation": "",
|
||||||
"defaultMessage": "Outgoing Call",
|
"defaultMessage": "Outgoing call",
|
||||||
"description": "Outgoing call label",
|
"description": "Outgoing call label",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
@@ -1416,5 +1416,11 @@
|
|||||||
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
|
},
|
||||||
|
"call_cancelled": {
|
||||||
|
"translation": "",
|
||||||
|
"defaultMessage": "cancelled",
|
||||||
|
"missing": true,
|
||||||
|
"obsolete": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+11
-5
@@ -1377,21 +1377,21 @@
|
|||||||
},
|
},
|
||||||
"calls_incoming": {
|
"calls_incoming": {
|
||||||
"translation": "Incoming Call",
|
"translation": "Incoming Call",
|
||||||
"defaultMessage": "Incoming Call",
|
"defaultMessage": "Incoming call",
|
||||||
"description": "Incoming call label",
|
"description": "Incoming call label",
|
||||||
"missing": false,
|
"missing": false,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
},
|
},
|
||||||
"calls_incoming_title": {
|
"calls_incoming_title": {
|
||||||
"translation": "Incoming Call",
|
"translation": "Incoming call",
|
||||||
"defaultMessage": "Incoming Call",
|
"defaultMessage": "Incoming call",
|
||||||
"description": "Incoming call title (Incoming call view)",
|
"description": "Incoming call title (Incoming call view)",
|
||||||
"missing": false,
|
"missing": false,
|
||||||
"obsolete": true
|
"obsolete": true
|
||||||
},
|
},
|
||||||
"calls_outgoing": {
|
"calls_outgoing": {
|
||||||
"translation": "Outgoing Call",
|
"translation": "Outgoing call",
|
||||||
"defaultMessage": "Outgoing Call",
|
"defaultMessage": "Outgoing call",
|
||||||
"description": "Outgoing call label",
|
"description": "Outgoing call label",
|
||||||
"missing": false,
|
"missing": false,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
@@ -1416,5 +1416,11 @@
|
|||||||
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
||||||
"missing": false,
|
"missing": false,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
|
},
|
||||||
|
"call_cancelled": {
|
||||||
|
"translation": "cancelled",
|
||||||
|
"defaultMessage": "cancelled",
|
||||||
|
"missing": false,
|
||||||
|
"obsolete": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-2
@@ -1377,7 +1377,7 @@
|
|||||||
},
|
},
|
||||||
"calls_incoming": {
|
"calls_incoming": {
|
||||||
"translation": "",
|
"translation": "",
|
||||||
"defaultMessage": "Incoming Call",
|
"defaultMessage": "Incoming call",
|
||||||
"description": "Incoming call label",
|
"description": "Incoming call label",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
@@ -1391,7 +1391,7 @@
|
|||||||
},
|
},
|
||||||
"calls_outgoing": {
|
"calls_outgoing": {
|
||||||
"translation": "",
|
"translation": "",
|
||||||
"defaultMessage": "Outgoing Call",
|
"defaultMessage": "Outgoing call",
|
||||||
"description": "Outgoing call label",
|
"description": "Outgoing call label",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
@@ -1416,5 +1416,11 @@
|
|||||||
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
|
},
|
||||||
|
"call_cancelled": {
|
||||||
|
"translation": "",
|
||||||
|
"defaultMessage": "cancelled",
|
||||||
|
"missing": true,
|
||||||
|
"obsolete": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -123,12 +123,15 @@
|
|||||||
"defaultMessage": "Update",
|
"defaultMessage": "Update",
|
||||||
"description": "Button [Update]"
|
"description": "Button [Update]"
|
||||||
},
|
},
|
||||||
|
"call_cancelled": {
|
||||||
|
"defaultMessage": "cancelled"
|
||||||
|
},
|
||||||
"calls_incoming": {
|
"calls_incoming": {
|
||||||
"defaultMessage": "Incoming Call",
|
"defaultMessage": "Incoming call",
|
||||||
"description": "Incoming call label"
|
"description": "Incoming call label"
|
||||||
},
|
},
|
||||||
"calls_outgoing": {
|
"calls_outgoing": {
|
||||||
"defaultMessage": "Outgoing Call",
|
"defaultMessage": "Outgoing call",
|
||||||
"description": "Outgoing call label"
|
"description": "Outgoing call label"
|
||||||
},
|
},
|
||||||
"calls_you_label": {
|
"calls_you_label": {
|
||||||
|
|||||||
+8
-2
@@ -1377,7 +1377,7 @@
|
|||||||
},
|
},
|
||||||
"calls_incoming": {
|
"calls_incoming": {
|
||||||
"translation": "",
|
"translation": "",
|
||||||
"defaultMessage": "Incoming Call",
|
"defaultMessage": "Incoming call",
|
||||||
"description": "Incoming call label",
|
"description": "Incoming call label",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
@@ -1391,7 +1391,7 @@
|
|||||||
},
|
},
|
||||||
"calls_outgoing": {
|
"calls_outgoing": {
|
||||||
"translation": "",
|
"translation": "",
|
||||||
"defaultMessage": "Outgoing Call",
|
"defaultMessage": "Outgoing call",
|
||||||
"description": "Outgoing call label",
|
"description": "Outgoing call label",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
@@ -1416,5 +1416,11 @@
|
|||||||
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
|
},
|
||||||
|
"call_cancelled": {
|
||||||
|
"translation": "",
|
||||||
|
"defaultMessage": "cancelled",
|
||||||
|
"missing": true,
|
||||||
|
"obsolete": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-2
@@ -1377,7 +1377,7 @@
|
|||||||
},
|
},
|
||||||
"calls_incoming": {
|
"calls_incoming": {
|
||||||
"translation": "",
|
"translation": "",
|
||||||
"defaultMessage": "Incoming Call",
|
"defaultMessage": "Incoming call",
|
||||||
"description": "Incoming call label",
|
"description": "Incoming call label",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
@@ -1391,7 +1391,7 @@
|
|||||||
},
|
},
|
||||||
"calls_outgoing": {
|
"calls_outgoing": {
|
||||||
"translation": "",
|
"translation": "",
|
||||||
"defaultMessage": "Outgoing Call",
|
"defaultMessage": "Outgoing call",
|
||||||
"description": "Outgoing call label",
|
"description": "Outgoing call label",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
@@ -1416,5 +1416,11 @@
|
|||||||
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
|
},
|
||||||
|
"call_cancelled": {
|
||||||
|
"translation": "",
|
||||||
|
"defaultMessage": "cancelled",
|
||||||
|
"missing": true,
|
||||||
|
"obsolete": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-2
@@ -1377,7 +1377,7 @@
|
|||||||
},
|
},
|
||||||
"calls_incoming": {
|
"calls_incoming": {
|
||||||
"translation": "",
|
"translation": "",
|
||||||
"defaultMessage": "Incoming Call",
|
"defaultMessage": "Incoming call",
|
||||||
"description": "Incoming call label",
|
"description": "Incoming call label",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
@@ -1391,7 +1391,7 @@
|
|||||||
},
|
},
|
||||||
"calls_outgoing": {
|
"calls_outgoing": {
|
||||||
"translation": "",
|
"translation": "",
|
||||||
"defaultMessage": "Outgoing Call",
|
"defaultMessage": "Outgoing call",
|
||||||
"description": "Outgoing call label",
|
"description": "Outgoing call label",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
@@ -1416,5 +1416,11 @@
|
|||||||
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
|
},
|
||||||
|
"call_cancelled": {
|
||||||
|
"translation": "",
|
||||||
|
"defaultMessage": "cancelled",
|
||||||
|
"missing": true,
|
||||||
|
"obsolete": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-2
@@ -1377,7 +1377,7 @@
|
|||||||
},
|
},
|
||||||
"calls_incoming": {
|
"calls_incoming": {
|
||||||
"translation": "",
|
"translation": "",
|
||||||
"defaultMessage": "Incoming Call",
|
"defaultMessage": "Incoming call",
|
||||||
"description": "Incoming call label",
|
"description": "Incoming call label",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
@@ -1391,7 +1391,7 @@
|
|||||||
},
|
},
|
||||||
"calls_outgoing": {
|
"calls_outgoing": {
|
||||||
"translation": "",
|
"translation": "",
|
||||||
"defaultMessage": "Outgoing Call",
|
"defaultMessage": "Outgoing call",
|
||||||
"description": "Outgoing call label",
|
"description": "Outgoing call label",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
@@ -1416,5 +1416,11 @@
|
|||||||
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
|
},
|
||||||
|
"call_cancelled": {
|
||||||
|
"translation": "",
|
||||||
|
"defaultMessage": "cancelled",
|
||||||
|
"missing": true,
|
||||||
|
"obsolete": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+8
-2
@@ -1377,7 +1377,7 @@
|
|||||||
},
|
},
|
||||||
"calls_incoming": {
|
"calls_incoming": {
|
||||||
"translation": "",
|
"translation": "",
|
||||||
"defaultMessage": "Incoming Call",
|
"defaultMessage": "Incoming call",
|
||||||
"description": "Incoming call label",
|
"description": "Incoming call label",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
@@ -1391,7 +1391,7 @@
|
|||||||
},
|
},
|
||||||
"calls_outgoing": {
|
"calls_outgoing": {
|
||||||
"translation": "",
|
"translation": "",
|
||||||
"defaultMessage": "Outgoing Call",
|
"defaultMessage": "Outgoing call",
|
||||||
"description": "Outgoing call label",
|
"description": "Outgoing call label",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
@@ -1416,5 +1416,11 @@
|
|||||||
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
"description": "Error message when the user tried to accept a new call without finishing pervious one",
|
||||||
"missing": true,
|
"missing": true,
|
||||||
"obsolete": false
|
"obsolete": false
|
||||||
|
},
|
||||||
|
"call_cancelled": {
|
||||||
|
"translation": "",
|
||||||
|
"defaultMessage": "cancelled",
|
||||||
|
"missing": true,
|
||||||
|
"obsolete": false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
+1
-1
File diff suppressed because one or more lines are too long
@@ -5,12 +5,12 @@ import { FormattedMessage, injectIntl } from 'react-intl';
|
|||||||
import { Drafty, Tinode } from 'tinode-sdk';
|
import { Drafty, Tinode } from 'tinode-sdk';
|
||||||
|
|
||||||
import Attachment from './attachment.jsx';
|
import Attachment from './attachment.jsx';
|
||||||
|
import CallMessage from './call-message.jsx';
|
||||||
import LetterTile from './letter-tile.jsx';
|
import LetterTile from './letter-tile.jsx';
|
||||||
import ReceivedMarker from './received-marker.jsx'
|
import ReceivedMarker from './received-marker.jsx'
|
||||||
|
|
||||||
import { fullFormatter } from '../lib/formatters.js';
|
import { fullFormatter } from '../lib/formatters.js';
|
||||||
import { isVideoCall, sanitizeUrl } from '../lib/utils.js';
|
import { isVideoCall, sanitizeUrl } from '../lib/utils.js';
|
||||||
import { secondsToTime } from '../lib/strformat.js';
|
|
||||||
|
|
||||||
class BaseChatMessage extends React.PureComponent {
|
class BaseChatMessage extends React.PureComponent {
|
||||||
constructor(props) {
|
constructor(props) {
|
||||||
@@ -148,17 +148,11 @@ class BaseChatMessage extends React.PureComponent {
|
|||||||
defaultMessage="content deleted" description="Shown when messages are deleted" />
|
defaultMessage="content deleted" description="Shown when messages are deleted" />
|
||||||
</i></>
|
</i></>
|
||||||
} else if (isVideoCall(this.props.mimeType)) {
|
} else if (isVideoCall(this.props.mimeType)) {
|
||||||
// Video calls.
|
// Video call message.
|
||||||
const direction = this.props.response ? 'call_received' : 'call_made';
|
content = <CallMessage
|
||||||
const text = this.props.response ?
|
content={this.props.content}
|
||||||
<FormattedMessage id="calls_incoming"
|
response={this.props.response}
|
||||||
defaultMessage="Incoming Call" description="Incoming call label" /> :
|
duration={this.props.duration} />
|
||||||
<FormattedMessage id="calls_outgoing"
|
|
||||||
defaultMessage="Outgoing Call" description="Outgoing call label" />;
|
|
||||||
const isCallDropped = this.props.content == 'disconnected';
|
|
||||||
content = <><i className="material-icons" style={{color: isCallDropped ? 'red' : 'green'}}>{direction}</i>{text}
|
|
||||||
{ !isCallDropped && this.props.duration ? [' (', secondsToTime(this.props.duration / 1000), ')'] : null}
|
|
||||||
</>
|
|
||||||
} else if (typeof content != 'string') {
|
} else if (typeof content != 'string') {
|
||||||
content = <><i className="material-icons gray">warning_amber</i> <i className="gray">
|
content = <><i className="material-icons gray">warning_amber</i> <i className="gray">
|
||||||
<FormattedMessage id="invalid_content"
|
<FormattedMessage id="invalid_content"
|
||||||
|
|||||||
+76
-31
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
+1
-1
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
Reference in New Issue
Block a user