Comment length

This commit is contained in:
Richard Lewis 2017-11-10 11:50:14 +00:00
parent d2070a08d8
commit ba8a9f2a43

View file

@ -59,7 +59,8 @@ export default React.createClass({
}, },
/** /**
* Set initial component state when the App wUrl (widget URL) is being updated. Component props *must* be passed (rather than relying on this.props). * Set initial component state when the App wUrl (widget URL) is being updated.
* Component props *must* be passed (rather than relying on this.props).
* @param {Object} newProps The new properties of the component * @param {Object} newProps The new properties of the component
* @return {Object} Updated component state to be set with setState * @return {Object} Updated component state to be set with setState
*/ */
@ -71,7 +72,8 @@ export default React.createClass({
loading: true, // True while the iframe content is loading loading: true, // True while the iframe content is loading
widgetUrl: newProps.url, widgetUrl: newProps.url,
widgetPermissionId: widgetPermissionId, widgetPermissionId: widgetPermissionId,
// Assume that widget has permission to load if we are the user who added it to the room, or if explicitly granted by the user // Assume that widget has permission to load if we are the user who
// added it to the room, or if explicitly granted by the user
hasPermissionToLoad: hasPermissionToLoad === 'true' || newProps.userId === newProps.creatorUserId, hasPermissionToLoad: hasPermissionToLoad === 'true' || newProps.userId === newProps.creatorUserId,
error: null, error: null,
deleting: false, deleting: false,
@ -218,7 +220,8 @@ export default React.createClass({
}, "mx_IntegrationsManager"); }, "mx_IntegrationsManager");
}, },
/* If user has permission to modify widgets, delete the widget, otherwise revoke access for the widget to load in the user's browser /* If user has permission to modify widgets, delete the widget,
* otherwise revoke access for the widget to load in the user's browser
*/ */
_onDeleteClick() { _onDeleteClick() {
if (this._canUserModify()) { if (this._canUserModify()) {