Add "You are presenting toast"

Signed-off-by: Šimon Brandner <simon.bra.ag@gmail.com>
pull/21833/head
Šimon Brandner 2021-07-20 16:17:07 +02:00
parent e5563ac60b
commit 3751f04cef
No known key found for this signature in database
GPG Key ID: 55C211A1226CB17D
2 changed files with 9 additions and 2 deletions

View File

@ -740,16 +740,22 @@ export default class CallView extends React.Component<IProps, IState> {
}); });
let presenting; let presenting;
if (this.state.primaryFeed?.purpose === SDPStreamMetadataPurpose.Screenshare) { if (
this.state.primaryFeed?.purpose === SDPStreamMetadataPurpose.Screenshare ||
this.props.call.isScreensharing()
) {
const presentingClasses = classNames({ const presentingClasses = classNames({
mx_CallView_presenting: true, mx_CallView_presenting: true,
mx_CallView_presenting_hidden: !this.state.controlsVisible, mx_CallView_presenting_hidden: !this.state.controlsVisible,
}); });
const sharerName = this.state.primaryFeed.getMember().name; const sharerName = this.state.primaryFeed.getMember().name;
const text = this.props.call.isScreensharing()
? _t("You are presenting")
: _t('%(sharerName)s is presenting', { sharerName });
presenting = ( presenting = (
<div className={presentingClasses}> <div className={presentingClasses}>
{ _t('%(sharerName)s is presenting', { sharerName }) } { text }
</div> </div>
); );
} }

View File

@ -894,6 +894,7 @@
"You held the call <a>Resume</a>": "You held the call <a>Resume</a>", "You held the call <a>Resume</a>": "You held the call <a>Resume</a>",
"%(peerName)s held the call": "%(peerName)s held the call", "%(peerName)s held the call": "%(peerName)s held the call",
"Connecting": "Connecting", "Connecting": "Connecting",
"You are presenting": "You are presenting",
"%(sharerName)s is presenting": "%(sharerName)s is presenting", "%(sharerName)s is presenting": "%(sharerName)s is presenting",
"Video Call": "Video Call", "Video Call": "Video Call",
"Voice Call": "Voice Call", "Voice Call": "Voice Call",