mirror of
https://github.com/element-hq/element-web
synced 2024-11-27 11:47:23 +03:00
Lint
This commit is contained in:
parent
b898d15580
commit
ac64e9b705
8 changed files with 17 additions and 27 deletions
|
@ -14,12 +14,10 @@ See the License for the specific language governing permissions and
|
|||
limitations under the License.
|
||||
*/
|
||||
|
||||
import MatrixClientPeg from './MatrixClientPeg';
|
||||
import Modal from './Modal';
|
||||
import sdk from './';
|
||||
import MultiInviter from './utils/MultiInviter';
|
||||
import { _t } from './languageHandler';
|
||||
import Promise from 'bluebird';
|
||||
|
||||
export function showGroupInviteDialog(groupId) {
|
||||
const UserPickerDialog = sdk.getComponent("dialogs.UserPickerDialog");
|
||||
|
|
|
@ -362,7 +362,7 @@ export default React.createClass({
|
|||
description: _t("Unable to leave room"),
|
||||
});
|
||||
});
|
||||
}
|
||||
},
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -500,7 +500,7 @@ export default React.createClass({
|
|||
let nameNode;
|
||||
let shortDescNode;
|
||||
let roomBody;
|
||||
let rightButtons = [];
|
||||
const rightButtons = [];
|
||||
const headerClasses = {
|
||||
mx_GroupView_header: true,
|
||||
};
|
||||
|
@ -548,13 +548,13 @@ export default React.createClass({
|
|||
onClick={this._onSaveClick} key="_saveButton"
|
||||
>
|
||||
{_t('Save')}
|
||||
</AccessibleButton>
|
||||
</AccessibleButton>,
|
||||
);
|
||||
rightButtons.push(
|
||||
<AccessibleButton className='mx_GroupView_textButton' onClick={this._onCancelClick} key="_cancelButton">
|
||||
<img src="img/cancel.svg" className='mx_filterFlipColor'
|
||||
width="18" height="18" alt={_t("Cancel")}/>
|
||||
</AccessibleButton>
|
||||
</AccessibleButton>,
|
||||
);
|
||||
roomBody = <div>
|
||||
<textarea className="mx_GroupView_editLongDesc" value={this.state.profileForm.long_description}
|
||||
|
@ -596,7 +596,7 @@ export default React.createClass({
|
|||
onClick={this._onEditClick} title={_t("Edit Group")} key="_editButton"
|
||||
>
|
||||
<TintableSvg src="img/icons-settings-room.svg" width="16" height="16"/>
|
||||
</AccessibleButton>
|
||||
</AccessibleButton>,
|
||||
);
|
||||
if (this.props.collapsedRhs) {
|
||||
rightButtons.push(
|
||||
|
@ -604,7 +604,7 @@ export default React.createClass({
|
|||
onClick={this._onShowRhsClick} title={ _t('Show panel') } key="_maximiseButton"
|
||||
>
|
||||
<TintableSvg src="img/maximise.svg" width="10" height="16"/>
|
||||
</AccessibleButton>
|
||||
</AccessibleButton>,
|
||||
);
|
||||
}
|
||||
|
||||
|
|
|
@ -105,7 +105,7 @@ export default React.createClass({
|
|||
userId = this.props.member.userId;
|
||||
} else {
|
||||
// we don't get this info from the API yet
|
||||
avatar = <BaseAvatar name={this.props.groupMember.userId} width={36} height={36} />
|
||||
avatar = <BaseAvatar name={this.props.groupMember.userId} width={36} height={36} />;
|
||||
name = this.props.groupMember.userId;
|
||||
userId = this.props.groupMember.userId;
|
||||
}
|
||||
|
|
|
@ -18,8 +18,6 @@ import React from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import sdk from '../../../index';
|
||||
import dis from '../../../dispatcher';
|
||||
import withMatrixClient from '../../../wrappers/withMatrixClient';
|
||||
import Matrix from "matrix-js-sdk";
|
||||
import AccessibleButton from '../elements/AccessibleButton';
|
||||
|
||||
export default React.createClass({
|
||||
|
@ -68,5 +66,5 @@ export default React.createClass({
|
|||
</div>
|
||||
</AccessibleButton>
|
||||
);
|
||||
}
|
||||
},
|
||||
});
|
||||
|
|
|
@ -16,16 +16,11 @@ limitations under the License.
|
|||
|
||||
import PropTypes from 'prop-types';
|
||||
import React from 'react';
|
||||
import classNames from 'classnames';
|
||||
import dis from '../../../dispatcher';
|
||||
import Modal from '../../../Modal';
|
||||
import sdk from '../../../index';
|
||||
import { _t } from '../../../languageHandler';
|
||||
import createRoom from '../../../createRoom';
|
||||
import DMRoomMap from '../../../utils/DMRoomMap';
|
||||
import Unread from '../../../Unread';
|
||||
import { GroupMemberType } from '../../../groups';
|
||||
import { findReadReceiptFromUserId } from '../../../utils/Receipt';
|
||||
import { groupMemberFromApiObject } from '../../../groups';
|
||||
import withMatrixClient from '../../../wrappers/withMatrixClient';
|
||||
import AccessibleButton from '../elements/AccessibleButton';
|
||||
|
@ -46,7 +41,7 @@ module.exports = withMatrixClient(React.createClass({
|
|||
fetching: false,
|
||||
removingUser: false,
|
||||
members: null,
|
||||
}
|
||||
};
|
||||
},
|
||||
|
||||
componentWillMount: function() {
|
||||
|
@ -81,7 +76,7 @@ module.exports = withMatrixClient(React.createClass({
|
|||
this.props.matrixClient.removeUserFromGroup(this.props.groupId, this.props.member.userId).then(() => {
|
||||
dis.dispatch({
|
||||
action: "view_user",
|
||||
member: null
|
||||
member: null,
|
||||
});
|
||||
}).catch((e) => {
|
||||
const ErrorDialog = sdk.getComponent("dialogs.ErrorDialog");
|
||||
|
@ -99,7 +94,7 @@ module.exports = withMatrixClient(React.createClass({
|
|||
_onCancel: function(e) {
|
||||
dis.dispatch({
|
||||
action: "view_user",
|
||||
member: null
|
||||
member: null,
|
||||
});
|
||||
},
|
||||
|
||||
|
@ -124,7 +119,8 @@ module.exports = withMatrixClient(React.createClass({
|
|||
}
|
||||
}
|
||||
|
||||
let kickButton, adminButton;
|
||||
let kickButton;
|
||||
let adminButton;
|
||||
|
||||
if (targetIsInGroup) {
|
||||
kickButton = (
|
||||
|
@ -182,5 +178,5 @@ module.exports = withMatrixClient(React.createClass({
|
|||
</GeminiScrollbar>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
|
|
@ -145,5 +145,5 @@ export default withMatrixClient(React.createClass({
|
|||
</GeminiScrollbar>
|
||||
</div>
|
||||
);
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
|
|
@ -18,10 +18,8 @@ import React from 'react';
|
|||
import PropTypes from 'prop-types';
|
||||
import sdk from '../../../index';
|
||||
import dis from '../../../dispatcher';
|
||||
import { _t } from '../../../languageHandler';
|
||||
import { GroupMemberType } from '../../../groups';
|
||||
import withMatrixClient from '../../../wrappers/withMatrixClient';
|
||||
import Matrix from "matrix-js-sdk";
|
||||
|
||||
export default withMatrixClient(React.createClass({
|
||||
displayName: 'GroupMemberTile',
|
||||
|
@ -60,5 +58,5 @@ export default withMatrixClient(React.createClass({
|
|||
name={name} powerLevel={0} suppressOnHover={true}
|
||||
/>
|
||||
);
|
||||
}
|
||||
},
|
||||
}));
|
||||
|
|
|
@ -23,5 +23,5 @@ export const GroupMemberType = PropTypes.shape({
|
|||
export function groupMemberFromApiObject(apiObject) {
|
||||
return {
|
||||
userId: apiObject.user_id,
|
||||
}
|
||||
};
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue