Merge branch 'develop' into rob/apps-not-e2ee
This commit is contained in:
commit
2eac869e27
4 changed files with 46 additions and 41 deletions
|
@ -252,18 +252,21 @@ function textForWidgetEvent(event) {
|
|||
const senderName = event.sender ? event.sender.name : event.getSender();
|
||||
const previousContent = event.getPrevContent() || {};
|
||||
const {name, type, url} = event.getContent() || {};
|
||||
let widgetName = widgetName || name || type || previousContent.type;
|
||||
widgetName = widgetName ? widgetName + ' ' : '';
|
||||
let widgetName = name || previousContent.name || type || previousContent.type || '';
|
||||
// Apply sentence case to widget name
|
||||
if (widgetName && widgetName.length > 0) {
|
||||
widgetName = widgetName[0].toUpperCase() + widgetName.slice(1) + ' ';
|
||||
}
|
||||
|
||||
// If the widget was removed, its content should be {}, but this is sufficiently
|
||||
// equivalent to that condition.
|
||||
if (url) {
|
||||
return _t('%(senderName)s added a %(widgetName)swidget', {
|
||||
senderName, widgetName,
|
||||
return _t('%(widgetName)s widget added by %(senderName)s', {
|
||||
widgetName, senderName,
|
||||
});
|
||||
} else {
|
||||
return _t('%(senderName)s removed a %(widgetName)swidget', {
|
||||
senderName, widgetName,
|
||||
return _t('%(widgetName)s widget removed by %(senderName)s', {
|
||||
widgetName, senderName,
|
||||
});
|
||||
}
|
||||
}
|
||||
|
|
|
@ -223,6 +223,7 @@ export default React.createClass({
|
|||
safeWidgetUrl = url.format(parsedWidgetUrl);
|
||||
}
|
||||
|
||||
if (this.props.show) {
|
||||
if (this.state.loading) {
|
||||
appTileBody = (
|
||||
<div className='mx_AppTileBody mx_AppLoading'>
|
||||
|
@ -238,7 +239,7 @@ export default React.createClass({
|
|||
/>
|
||||
</div>
|
||||
);
|
||||
} else if (this.props.show) {
|
||||
} else {
|
||||
appTileBody = (
|
||||
<div className="mx_AppTileBody">
|
||||
<iframe
|
||||
|
@ -262,6 +263,7 @@ export default React.createClass({
|
|||
</div>
|
||||
);
|
||||
}
|
||||
}
|
||||
|
||||
// editing is done in scalar
|
||||
const showEditButton = Boolean(this._scalarClient && this._canUserModify());
|
||||
|
|
|
@ -171,7 +171,7 @@ const Pill = React.createClass({
|
|||
}
|
||||
pillClass = 'mx_UserPill';
|
||||
href = null;
|
||||
onClick = this.onUserPillClicked.bind(this);
|
||||
onClick = this.onUserPillClicked;
|
||||
}
|
||||
}
|
||||
break;
|
||||
|
|
|
@ -972,7 +972,7 @@
|
|||
"Failed to upload image": "Failed to upload image",
|
||||
"Failed to update group": "Failed to update group",
|
||||
"Hide avatars in user and room mentions": "Hide avatars in user and room mentions",
|
||||
"%(senderName)s added a %(widgetName)swidget": "%(senderName)s added a %(widgetName)swidget",
|
||||
"%(senderName)s removed a %(widgetName)swidget": "%(senderName)s removed a %(widgetName)swidget",
|
||||
"%(widgetName)s widget added by %(senderName)s": "%(widgetName)s widget added by %(senderName)s",
|
||||
"%(widgetName)s widget removed by %(senderName)s": "%(widgetName)s widget removed by %(senderName)s",
|
||||
"Robot check is currently unavailable on desktop - please use a <a>web browser</a>": "Robot check is currently unavailable on desktop - please use a <a>web browser</a>"
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue