Merge branch 'develop' into luke/feature-flair
This commit is contained in:
commit
5295d7f058
33 changed files with 123 additions and 110 deletions
|
@ -27,8 +27,8 @@ export function showGroupInviteDialog(groupId) {
|
||||||
placeholder: _t("Name or matrix ID"),
|
placeholder: _t("Name or matrix ID"),
|
||||||
button: _t("Invite to Group"),
|
button: _t("Invite to Group"),
|
||||||
validAddressTypes: ['mx'],
|
validAddressTypes: ['mx'],
|
||||||
onFinished: (shouldInvite, addrs) => {
|
onFinished: (success, addrs) => {
|
||||||
if (!shouldInvite) return;
|
if (!success) return;
|
||||||
|
|
||||||
_onGroupInviteFinished(groupId, addrs);
|
_onGroupInviteFinished(groupId, addrs);
|
||||||
},
|
},
|
||||||
|
|
|
@ -461,12 +461,12 @@ export default React.createClass({
|
||||||
<AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton"
|
<AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton"
|
||||||
onClick={this._onAcceptInviteClick}
|
onClick={this._onAcceptInviteClick}
|
||||||
>
|
>
|
||||||
{_t('Accept')}
|
{_t("Accept")}
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
<AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton"
|
<AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton"
|
||||||
onClick={this._onRejectInviteClick}
|
onClick={this._onRejectInviteClick}
|
||||||
>
|
>
|
||||||
{_t('Decline')}
|
{_t("Decline")}
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
|
@ -477,7 +477,7 @@ export default React.createClass({
|
||||||
<AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton"
|
<AccessibleButton className="mx_GroupView_textButton mx_RoomHeader_textButton"
|
||||||
onClick={this._onLeaveClick}
|
onClick={this._onLeaveClick}
|
||||||
>
|
>
|
||||||
{_t('Leave')}
|
{_t("Leave")}
|
||||||
</AccessibleButton>
|
</AccessibleButton>
|
||||||
</div>
|
</div>
|
||||||
</div>;
|
</div>;
|
||||||
|
|
|
@ -241,10 +241,10 @@ export default React.createClass({
|
||||||
eventPixelOffset={this.props.initialEventPixelOffset}
|
eventPixelOffset={this.props.initialEventPixelOffset}
|
||||||
key={this.props.currentRoomId || 'roomview'}
|
key={this.props.currentRoomId || 'roomview'}
|
||||||
opacity={this.props.middleOpacity}
|
opacity={this.props.middleOpacity}
|
||||||
collapsedRhs={this.props.collapse_rhs}
|
collapsedRhs={this.props.collapseRhs}
|
||||||
ConferenceHandler={this.props.ConferenceHandler}
|
ConferenceHandler={this.props.ConferenceHandler}
|
||||||
/>;
|
/>;
|
||||||
if (!this.props.collapse_rhs) right_panel = <RightPanel roomId={this.props.currentRoomId} opacity={this.props.rightOpacity} />;
|
if (!this.props.collapseRhs) right_panel = <RightPanel roomId={this.props.currentRoomId} opacity={this.props.rightOpacity} />;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PageTypes.UserSettings:
|
case PageTypes.UserSettings:
|
||||||
|
@ -255,7 +255,7 @@ export default React.createClass({
|
||||||
referralBaseUrl={this.props.config.referralBaseUrl}
|
referralBaseUrl={this.props.config.referralBaseUrl}
|
||||||
teamToken={this.props.teamToken}
|
teamToken={this.props.teamToken}
|
||||||
/>;
|
/>;
|
||||||
if (!this.props.collapse_rhs) right_panel = <RightPanel opacity={this.props.rightOpacity}/>;
|
if (!this.props.collapseRhs) right_panel = <RightPanel opacity={this.props.rightOpacity}/>;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PageTypes.MyGroups:
|
case PageTypes.MyGroups:
|
||||||
|
@ -265,9 +265,9 @@ export default React.createClass({
|
||||||
case PageTypes.CreateRoom:
|
case PageTypes.CreateRoom:
|
||||||
page_element = <CreateRoom
|
page_element = <CreateRoom
|
||||||
onRoomCreated={this.props.onRoomCreated}
|
onRoomCreated={this.props.onRoomCreated}
|
||||||
collapsedRhs={this.props.collapse_rhs}
|
collapsedRhs={this.props.collapseRhs}
|
||||||
/>;
|
/>;
|
||||||
if (!this.props.collapse_rhs) right_panel = <RightPanel opacity={this.props.rightOpacity}/>;
|
if (!this.props.collapseRhs) right_panel = <RightPanel opacity={this.props.rightOpacity}/>;
|
||||||
break;
|
break;
|
||||||
|
|
||||||
case PageTypes.RoomDirectory:
|
case PageTypes.RoomDirectory:
|
||||||
|
@ -300,9 +300,9 @@ export default React.createClass({
|
||||||
case PageTypes.GroupView:
|
case PageTypes.GroupView:
|
||||||
page_element = <GroupView
|
page_element = <GroupView
|
||||||
groupId={this.props.currentGroupId}
|
groupId={this.props.currentGroupId}
|
||||||
collapsedRhs={this.props.collapse_rhs}
|
collapsedRhs={this.props.collapseRhs}
|
||||||
/>;
|
/>;
|
||||||
if (!this.props.collapse_rhs) right_panel = <RightPanel groupId={this.props.currentGroupId} opacity={this.props.rightOpacity} />;
|
if (!this.props.collapseRhs) right_panel = <RightPanel groupId={this.props.currentGroupId} opacity={this.props.rightOpacity} />;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -334,7 +334,7 @@ export default React.createClass({
|
||||||
<div className={bodyClasses}>
|
<div className={bodyClasses}>
|
||||||
<LeftPanel
|
<LeftPanel
|
||||||
selectedRoom={this.props.currentRoomId}
|
selectedRoom={this.props.currentRoomId}
|
||||||
collapsed={this.props.collapse_lhs || false}
|
collapsed={this.props.collapseLhs || false}
|
||||||
opacity={this.props.leftOpacity}
|
opacity={this.props.leftOpacity}
|
||||||
/>
|
/>
|
||||||
<main className='mx_MatrixChat_middlePanel'>
|
<main className='mx_MatrixChat_middlePanel'>
|
||||||
|
|
|
@ -143,8 +143,8 @@ module.exports = React.createClass({
|
||||||
// If we're trying to just view a user ID (i.e. /user URL), this is it
|
// If we're trying to just view a user ID (i.e. /user URL), this is it
|
||||||
viewUserId: null,
|
viewUserId: null,
|
||||||
|
|
||||||
collapse_lhs: false,
|
collapseLhs: false,
|
||||||
collapse_rhs: false,
|
collapseRhs: false,
|
||||||
leftOpacity: 1.0,
|
leftOpacity: 1.0,
|
||||||
middleOpacity: 1.0,
|
middleOpacity: 1.0,
|
||||||
rightOpacity: 1.0,
|
rightOpacity: 1.0,
|
||||||
|
@ -434,7 +434,7 @@ module.exports = React.createClass({
|
||||||
break;
|
break;
|
||||||
case 'view_user':
|
case 'view_user':
|
||||||
// FIXME: ugly hack to expand the RightPanel and then re-dispatch.
|
// FIXME: ugly hack to expand the RightPanel and then re-dispatch.
|
||||||
if (this.state.collapse_rhs) {
|
if (this.state.collapseRhs) {
|
||||||
setTimeout(()=>{
|
setTimeout(()=>{
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'show_right_panel',
|
action: 'show_right_panel',
|
||||||
|
@ -516,22 +516,22 @@ module.exports = React.createClass({
|
||||||
break;
|
break;
|
||||||
case 'hide_left_panel':
|
case 'hide_left_panel':
|
||||||
this.setState({
|
this.setState({
|
||||||
collapse_lhs: true,
|
collapseLhs: true,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'show_left_panel':
|
case 'show_left_panel':
|
||||||
this.setState({
|
this.setState({
|
||||||
collapse_lhs: false,
|
collapseLhs: false,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'hide_right_panel':
|
case 'hide_right_panel':
|
||||||
this.setState({
|
this.setState({
|
||||||
collapse_rhs: true,
|
collapseRhs: true,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'show_right_panel':
|
case 'show_right_panel':
|
||||||
this.setState({
|
this.setState({
|
||||||
collapse_rhs: false,
|
collapseRhs: false,
|
||||||
});
|
});
|
||||||
break;
|
break;
|
||||||
case 'ui_opacity': {
|
case 'ui_opacity': {
|
||||||
|
@ -993,8 +993,8 @@ module.exports = React.createClass({
|
||||||
this.setStateForNewView({
|
this.setStateForNewView({
|
||||||
view: VIEWS.LOGIN,
|
view: VIEWS.LOGIN,
|
||||||
ready: false,
|
ready: false,
|
||||||
collapse_lhs: false,
|
collapseLhs: false,
|
||||||
collapse_rhs: false,
|
collapseRhs: false,
|
||||||
currentRoomId: null,
|
currentRoomId: null,
|
||||||
page_type: PageTypes.RoomDirectory,
|
page_type: PageTypes.RoomDirectory,
|
||||||
});
|
});
|
||||||
|
|
|
@ -123,6 +123,9 @@ module.exports = React.createClass({
|
||||||
// store the error here.
|
// store the error here.
|
||||||
roomLoadError: null,
|
roomLoadError: null,
|
||||||
|
|
||||||
|
// Have we sent a request to join the room that we're waiting to complete?
|
||||||
|
joining: false,
|
||||||
|
|
||||||
// this is true if we are fully scrolled-down, and are looking at
|
// this is true if we are fully scrolled-down, and are looking at
|
||||||
// the end of the live timeline. It has the effect of hiding the
|
// the end of the live timeline. It has the effect of hiding the
|
||||||
// 'scroll to bottom' knob, among a couple of other things.
|
// 'scroll to bottom' knob, among a couple of other things.
|
||||||
|
@ -185,10 +188,6 @@ module.exports = React.createClass({
|
||||||
shouldPeek: RoomViewStore.shouldPeek(),
|
shouldPeek: RoomViewStore.shouldPeek(),
|
||||||
};
|
};
|
||||||
|
|
||||||
// finished joining, start waiting for a room and show a spinner. See onRoom.
|
|
||||||
newState.waitingForRoom = this.state.joining && !newState.joining &&
|
|
||||||
!RoomViewStore.getJoinError();
|
|
||||||
|
|
||||||
// Temporary logging to diagnose https://github.com/vector-im/riot-web/issues/4307
|
// Temporary logging to diagnose https://github.com/vector-im/riot-web/issues/4307
|
||||||
console.log(
|
console.log(
|
||||||
'RVS update:',
|
'RVS update:',
|
||||||
|
@ -197,7 +196,6 @@ module.exports = React.createClass({
|
||||||
'loading?', newState.roomLoading,
|
'loading?', newState.roomLoading,
|
||||||
'joining?', newState.joining,
|
'joining?', newState.joining,
|
||||||
'initial?', initial,
|
'initial?', initial,
|
||||||
'waiting?', newState.waitingForRoom,
|
|
||||||
'shouldPeek?', newState.shouldPeek,
|
'shouldPeek?', newState.shouldPeek,
|
||||||
);
|
);
|
||||||
|
|
||||||
|
@ -650,7 +648,6 @@ module.exports = React.createClass({
|
||||||
}
|
}
|
||||||
this.setState({
|
this.setState({
|
||||||
room: room,
|
room: room,
|
||||||
waitingForRoom: false,
|
|
||||||
}, () => {
|
}, () => {
|
||||||
this._onRoomLoaded(room);
|
this._onRoomLoaded(room);
|
||||||
});
|
});
|
||||||
|
@ -706,15 +703,8 @@ module.exports = React.createClass({
|
||||||
|
|
||||||
onRoomMemberMembership: function(ev, member, oldMembership) {
|
onRoomMemberMembership: function(ev, member, oldMembership) {
|
||||||
if (member.userId == MatrixClientPeg.get().credentials.userId) {
|
if (member.userId == MatrixClientPeg.get().credentials.userId) {
|
||||||
|
|
||||||
if (member.membership === 'join') {
|
|
||||||
this.setState({
|
|
||||||
waitingForRoom: false,
|
|
||||||
});
|
|
||||||
} else {
|
|
||||||
this.forceUpdate();
|
this.forceUpdate();
|
||||||
}
|
}
|
||||||
}
|
|
||||||
},
|
},
|
||||||
|
|
||||||
// rate limited because a power level change will emit an event for every
|
// rate limited because a power level change will emit an event for every
|
||||||
|
@ -1463,10 +1453,6 @@ module.exports = React.createClass({
|
||||||
const Loader = sdk.getComponent("elements.Spinner");
|
const Loader = sdk.getComponent("elements.Spinner");
|
||||||
const TimelinePanel = sdk.getComponent("structures.TimelinePanel");
|
const TimelinePanel = sdk.getComponent("structures.TimelinePanel");
|
||||||
|
|
||||||
// Whether the preview bar spinner should be shown. We do this when joining or
|
|
||||||
// when waiting for a room to be returned by js-sdk when joining
|
|
||||||
const previewBarSpinner = this.state.joining || this.state.waitingForRoom;
|
|
||||||
|
|
||||||
if (!this.state.room) {
|
if (!this.state.room) {
|
||||||
if (this.state.roomLoading || this.state.peekLoading) {
|
if (this.state.roomLoading || this.state.peekLoading) {
|
||||||
return (
|
return (
|
||||||
|
@ -1500,7 +1486,7 @@ module.exports = React.createClass({
|
||||||
onRejectClick={ this.onRejectThreepidInviteButtonClicked }
|
onRejectClick={ this.onRejectThreepidInviteButtonClicked }
|
||||||
canPreview={ false } error={ this.state.roomLoadError }
|
canPreview={ false } error={ this.state.roomLoadError }
|
||||||
roomAlias={roomAlias}
|
roomAlias={roomAlias}
|
||||||
spinner={previewBarSpinner}
|
spinner={this.state.joining}
|
||||||
inviterName={inviterName}
|
inviterName={inviterName}
|
||||||
invitedEmail={invitedEmail}
|
invitedEmail={invitedEmail}
|
||||||
room={this.state.room}
|
room={this.state.room}
|
||||||
|
@ -1543,7 +1529,7 @@ module.exports = React.createClass({
|
||||||
onRejectClick={ this.onRejectButtonClicked }
|
onRejectClick={ this.onRejectButtonClicked }
|
||||||
inviterName={ inviterName }
|
inviterName={ inviterName }
|
||||||
canPreview={ false }
|
canPreview={ false }
|
||||||
spinner={previewBarSpinner}
|
spinner={this.state.joining}
|
||||||
room={this.state.room}
|
room={this.state.room}
|
||||||
/>
|
/>
|
||||||
</div>
|
</div>
|
||||||
|
@ -1618,7 +1604,7 @@ module.exports = React.createClass({
|
||||||
<RoomPreviewBar onJoinClick={this.onJoinButtonClicked}
|
<RoomPreviewBar onJoinClick={this.onJoinButtonClicked}
|
||||||
onForgetClick={ this.onForgetClick }
|
onForgetClick={ this.onForgetClick }
|
||||||
onRejectClick={this.onRejectThreepidInviteButtonClicked}
|
onRejectClick={this.onRejectThreepidInviteButtonClicked}
|
||||||
spinner={previewBarSpinner}
|
spinner={this.state.joining}
|
||||||
inviterName={inviterName}
|
inviterName={inviterName}
|
||||||
invitedEmail={invitedEmail}
|
invitedEmail={invitedEmail}
|
||||||
canPreview={this.state.canPeek}
|
canPreview={this.state.canPeek}
|
||||||
|
|
|
@ -105,7 +105,7 @@ export default React.createClass({
|
||||||
userId = this.props.member.userId;
|
userId = this.props.member.userId;
|
||||||
} else {
|
} else {
|
||||||
// we don't get this info from the API yet
|
// 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={48} height={48} />;
|
||||||
name = this.props.groupMember.userId;
|
name = this.props.groupMember.userId;
|
||||||
userId = this.props.groupMember.userId;
|
userId = this.props.groupMember.userId;
|
||||||
}
|
}
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2017 Vector Creations Ltd
|
Copyright 2017 Vector Creations Ltd
|
||||||
|
Copyright 2017 New Vector Ltd
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
@ -33,14 +34,14 @@ module.exports = withMatrixClient(React.createClass({
|
||||||
propTypes: {
|
propTypes: {
|
||||||
matrixClient: PropTypes.object.isRequired,
|
matrixClient: PropTypes.object.isRequired,
|
||||||
groupId: PropTypes.string,
|
groupId: PropTypes.string,
|
||||||
member: GroupMemberType,
|
groupMember: GroupMemberType,
|
||||||
},
|
},
|
||||||
|
|
||||||
getInitialState: function() {
|
getInitialState: function() {
|
||||||
return {
|
return {
|
||||||
fetching: false,
|
fetching: false,
|
||||||
removingUser: false,
|
removingUser: false,
|
||||||
members: null,
|
groupMembers: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -52,28 +53,31 @@ module.exports = withMatrixClient(React.createClass({
|
||||||
this.setState({fetching: true});
|
this.setState({fetching: true});
|
||||||
this.props.matrixClient.getGroupUsers(this.props.groupId).then((result) => {
|
this.props.matrixClient.getGroupUsers(this.props.groupId).then((result) => {
|
||||||
this.setState({
|
this.setState({
|
||||||
members: result.chunk.map((apiMember) => {
|
groupMembers: result.chunk.map((apiMember) => {
|
||||||
return groupMemberFromApiObject(apiMember);
|
return groupMemberFromApiObject(apiMember);
|
||||||
}),
|
}),
|
||||||
fetching: false,
|
fetching: false,
|
||||||
});
|
});
|
||||||
}).catch((e) => {
|
}).catch((e) => {
|
||||||
this.setState({fetching: false});
|
this.setState({fetching: false});
|
||||||
console.error("Failed to get group member list: " + e);
|
console.error("Failed to get group groupMember list: ", e);
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
|
||||||
_onKick: function() {
|
_onKick: function() {
|
||||||
const ConfirmUserActionDialog = sdk.getComponent("dialogs.ConfirmUserActionDialog");
|
const ConfirmUserActionDialog = sdk.getComponent("dialogs.ConfirmUserActionDialog");
|
||||||
Modal.createDialog(ConfirmUserActionDialog, {
|
Modal.createDialog(ConfirmUserActionDialog, {
|
||||||
groupMember: this.props.member,
|
groupMember: this.props.groupMember,
|
||||||
action: _t('Remove from group'),
|
action: _t('Remove from group'),
|
||||||
danger: true,
|
danger: true,
|
||||||
onFinished: (proceed) => {
|
onFinished: (proceed) => {
|
||||||
if (!proceed) return;
|
if (!proceed) return;
|
||||||
|
|
||||||
this.setState({removingUser: true});
|
this.setState({removingUser: true});
|
||||||
this.props.matrixClient.removeUserFromGroup(this.props.groupId, this.props.member.userId).then(() => {
|
this.props.matrixClient.removeUserFromGroup(
|
||||||
|
this.props.groupId, this.props.groupMember.userId,
|
||||||
|
).then(() => {
|
||||||
|
// return to the user list
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: "view_user",
|
action: "view_user",
|
||||||
member: null,
|
member: null,
|
||||||
|
@ -92,6 +96,7 @@ module.exports = withMatrixClient(React.createClass({
|
||||||
},
|
},
|
||||||
|
|
||||||
_onCancel: function(e) {
|
_onCancel: function(e) {
|
||||||
|
// Go back to the user list
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: "view_user",
|
action: "view_user",
|
||||||
member: null,
|
member: null,
|
||||||
|
@ -107,17 +112,14 @@ module.exports = withMatrixClient(React.createClass({
|
||||||
|
|
||||||
render: function() {
|
render: function() {
|
||||||
if (this.state.fetching || this.state.removingUser) {
|
if (this.state.fetching || this.state.removingUser) {
|
||||||
const Loader = sdk.getComponent("elements.Spinner");
|
const Spinner = sdk.getComponent("elements.Spinner");
|
||||||
return <Loader />;
|
return <Spinner />;
|
||||||
}
|
}
|
||||||
if (!this.state.members) return null;
|
if (!this.state.groupMembers) return null;
|
||||||
|
|
||||||
let targetIsInGroup = false;
|
const targetIsInGroup = this.state.groupMembers.some((m) => {
|
||||||
for (const m of this.state.members) {
|
return m.userId === this.props.groupMember.userId;
|
||||||
if (m.userId == this.props.member.userId) {
|
});
|
||||||
targetIsInGroup = true;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
||||||
let kickButton;
|
let kickButton;
|
||||||
let adminButton;
|
let adminButton;
|
||||||
|
@ -140,8 +142,8 @@ module.exports = withMatrixClient(React.createClass({
|
||||||
let adminTools;
|
let adminTools;
|
||||||
if (kickButton || adminButton) {
|
if (kickButton || adminButton) {
|
||||||
adminTools =
|
adminTools =
|
||||||
<div>
|
<div className="mx_MemberInfo_adminTools">
|
||||||
<h3>{_t("Admin tools")}</h3>
|
<h3>{_t("Admin Tools")}</h3>
|
||||||
|
|
||||||
<div className="mx_MemberInfo_buttons">
|
<div className="mx_MemberInfo_buttons">
|
||||||
{kickButton}
|
{kickButton}
|
||||||
|
@ -152,25 +154,27 @@ module.exports = withMatrixClient(React.createClass({
|
||||||
|
|
||||||
const BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
|
const BaseAvatar = sdk.getComponent('avatars.BaseAvatar');
|
||||||
const avatar = (
|
const avatar = (
|
||||||
<BaseAvatar name={this.props.member.userId} width={36} height={36} />
|
<BaseAvatar name={this.props.groupMember.userId} width={36} height={36} />
|
||||||
);
|
);
|
||||||
|
|
||||||
const memberName = this.props.member.userId;
|
const groupMemberName = this.props.groupMember.userId;
|
||||||
|
|
||||||
const EmojiText = sdk.getComponent('elements.EmojiText');
|
const EmojiText = sdk.getComponent('elements.EmojiText');
|
||||||
return (
|
return (
|
||||||
<div className="mx_MemberInfo">
|
<div className="mx_MemberInfo">
|
||||||
<GeminiScrollbar autoshow={true}>
|
<GeminiScrollbar autoshow={true}>
|
||||||
<AccessibleButton className="mx_MemberInfo_cancel" onClick={this._onCancel}> <img src="img/cancel.svg" width="18" height="18"/></AccessibleButton>
|
<AccessibleButton className="mx_MemberInfo_cancel"onClick={this._onCancel}>
|
||||||
|
<img src="img/cancel.svg" width="18" height="18"/>
|
||||||
|
</AccessibleButton>
|
||||||
<div className="mx_MemberInfo_avatar">
|
<div className="mx_MemberInfo_avatar">
|
||||||
{avatar}
|
{avatar}
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
<EmojiText element="h2">{memberName}</EmojiText>
|
<EmojiText element="h2">{groupMemberName}</EmojiText>
|
||||||
|
|
||||||
<div className="mx_MemberInfo_profile">
|
<div className="mx_MemberInfo_profile">
|
||||||
<div className="mx_MemberInfo_profileField">
|
<div className="mx_MemberInfo_profileField">
|
||||||
{ this.props.member.userId }
|
{ this.props.groupMember.userId }
|
||||||
</div>
|
</div>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2017 Vector Creations Ltd.
|
Copyright 2017 Vector Creations Ltd.
|
||||||
|
Copyright 2017 New Vector Ltd.
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
@ -86,25 +87,29 @@ export default withMatrixClient(React.createClass({
|
||||||
const GroupMemberTile = sdk.getComponent("groups.GroupMemberTile");
|
const GroupMemberTile = sdk.getComponent("groups.GroupMemberTile");
|
||||||
query = (query || "").toLowerCase();
|
query = (query || "").toLowerCase();
|
||||||
|
|
||||||
const memberList = this.state.members.filter((m) => {
|
let memberList = this.state.members;
|
||||||
if (query) {
|
if (query) {
|
||||||
|
memberList = memberList.filter((m) => {
|
||||||
|
// TODO: add this when we have this info from the API
|
||||||
//const matchesName = m.name.toLowerCase().indexOf(query) !== -1;
|
//const matchesName = m.name.toLowerCase().indexOf(query) !== -1;
|
||||||
const matchesId = m.userId.toLowerCase().indexOf(query) !== -1;
|
const matchesId = m.userId.toLowerCase().includes(query);
|
||||||
|
|
||||||
if (/*!matchesName &&*/ !matchesId) {
|
if (/*!matchesName &&*/ !matchesId) {
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
}
|
|
||||||
|
|
||||||
return true;
|
return true;
|
||||||
}).map((m) => {
|
});
|
||||||
|
}
|
||||||
|
|
||||||
|
memberList = memberList.map((m) => {
|
||||||
return (
|
return (
|
||||||
<GroupMemberTile key={m.userId} groupId={this.props.groupId} member={m} />
|
<GroupMemberTile key={m.userId} groupId={this.props.groupId} member={m} />
|
||||||
);
|
);
|
||||||
});
|
});
|
||||||
|
|
||||||
memberList.sort((a, b) => {
|
memberList.sort((a, b) => {
|
||||||
// should put admins at the top: we don't yet have that info
|
// TODO: should put admins at the top: we don't yet have that info
|
||||||
if (a < b) {
|
if (a < b) {
|
||||||
return -1;
|
return -1;
|
||||||
} else if (a > b) {
|
} else if (a > b) {
|
||||||
|
|
|
@ -1,5 +1,6 @@
|
||||||
/*
|
/*
|
||||||
Copyright 2017 Vector Creations Ltd
|
Copyright 2017 Vector Creations Ltd
|
||||||
|
Copyright 2017 New Vector Ltd
|
||||||
|
|
||||||
Licensed under the Apache License, Version 2.0 (the "License");
|
Licensed under the Apache License, Version 2.0 (the "License");
|
||||||
you may not use this file except in compliance with the License.
|
you may not use this file except in compliance with the License.
|
||||||
|
|
|
@ -751,7 +751,7 @@ module.exports = withMatrixClient(React.createClass({
|
||||||
if (kickButton || banButton || muteButton || giveModButton) {
|
if (kickButton || banButton || muteButton || giveModButton) {
|
||||||
adminTools =
|
adminTools =
|
||||||
<div>
|
<div>
|
||||||
<h3>{_t("Admin tools")}</h3>
|
<h3>{_t("Admin Tools")}</h3>
|
||||||
|
|
||||||
<div className="mx_MemberInfo_buttons">
|
<div className="mx_MemberInfo_buttons">
|
||||||
{muteButton}
|
{muteButton}
|
||||||
|
|
|
@ -790,7 +790,7 @@
|
||||||
"a room": "einen Raum",
|
"a room": "einen Raum",
|
||||||
"Accept": "Akzeptieren",
|
"Accept": "Akzeptieren",
|
||||||
"Active call (%(roomName)s)": "Aktiver Anruf (%(roomName)s)",
|
"Active call (%(roomName)s)": "Aktiver Anruf (%(roomName)s)",
|
||||||
"Admin tools": "Admin-Werkzeuge",
|
"Admin Tools": "Admin-Werkzeuge",
|
||||||
"And %(count)s more...": "Und %(count)s weitere...",
|
"And %(count)s more...": "Und %(count)s weitere...",
|
||||||
"Alias (optional)": "Alias (optional)",
|
"Alias (optional)": "Alias (optional)",
|
||||||
"Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.": "Verbindung zum Heimserver fehlgeschlagen - bitte überprüfe die Internetverbindung und stelle sicher, dass dem <a>SSL-Zertifikat deines Heimservers</a> vertraut wird und dass Anfragen nicht durch eine Browser-Erweiterung blockiert werden.",
|
"Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.": "Verbindung zum Heimserver fehlgeschlagen - bitte überprüfe die Internetverbindung und stelle sicher, dass dem <a>SSL-Zertifikat deines Heimservers</a> vertraut wird und dass Anfragen nicht durch eine Browser-Erweiterung blockiert werden.",
|
||||||
|
|
|
@ -265,7 +265,7 @@
|
||||||
"Accept": "Αποδοχή",
|
"Accept": "Αποδοχή",
|
||||||
"Active call (%(roomName)s)": "Ενεργή κλήση (%(roomName)s)",
|
"Active call (%(roomName)s)": "Ενεργή κλήση (%(roomName)s)",
|
||||||
"Add": "Προσθήκη",
|
"Add": "Προσθήκη",
|
||||||
"Admin tools": "Εργαλεία διαχειριστή",
|
"Admin Tools": "Εργαλεία διαχειριστή",
|
||||||
"And %(count)s more...": "Και %(count)s περισσότερα...",
|
"And %(count)s more...": "Και %(count)s περισσότερα...",
|
||||||
"No media permissions": "Χωρίς δικαιώματα πολυμέσων",
|
"No media permissions": "Χωρίς δικαιώματα πολυμέσων",
|
||||||
"Alias (optional)": "Ψευδώνυμο (προαιρετικό)",
|
"Alias (optional)": "Ψευδώνυμο (προαιρετικό)",
|
||||||
|
|
|
@ -13,7 +13,7 @@
|
||||||
"Add email address": "Add email address",
|
"Add email address": "Add email address",
|
||||||
"Add phone number": "Add phone number",
|
"Add phone number": "Add phone number",
|
||||||
"Admin": "Admin",
|
"Admin": "Admin",
|
||||||
"Admin tools": "Admin tools",
|
"Admin Tools": "Admin tools",
|
||||||
"Allow": "Allow",
|
"Allow": "Allow",
|
||||||
"And %(count)s more...": "And %(count)s more...",
|
"And %(count)s more...": "And %(count)s more...",
|
||||||
"VoIP": "VoIP",
|
"VoIP": "VoIP",
|
||||||
|
@ -863,6 +863,8 @@
|
||||||
"Hide avatars in user and room mentions": "Hide avatars in user and room mentions",
|
"Hide avatars in user and room mentions": "Hide avatars in user and room mentions",
|
||||||
"%(widgetName)s widget added by %(senderName)s": "%(widgetName)s widget added by %(senderName)s",
|
"%(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",
|
"%(widgetName)s widget removed by %(senderName)s": "%(widgetName)s widget removed by %(senderName)s",
|
||||||
|
"%(widgetName)s widget modified by %(senderName)s": "%(widgetName)s widget modified 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>",
|
||||||
"Description": "Description",
|
"Description": "Description",
|
||||||
"Filter group members": "Filter group members",
|
"Filter group members": "Filter group members",
|
||||||
"Remove from group": "Remove from group",
|
"Remove from group": "Remove from group",
|
||||||
|
|
|
@ -724,7 +724,7 @@
|
||||||
"Accept": "Accept",
|
"Accept": "Accept",
|
||||||
"a room": "a room",
|
"a room": "a room",
|
||||||
"Add": "Add",
|
"Add": "Add",
|
||||||
"Admin tools": "Admin tools",
|
"Admin Tools": "Admin tools",
|
||||||
"And %(count)s more...": "And %(count)s more...",
|
"And %(count)s more...": "And %(count)s more...",
|
||||||
"Alias (optional)": "Alias (optional)",
|
"Alias (optional)": "Alias (optional)",
|
||||||
"Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.": "Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.",
|
"Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.": "Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.",
|
||||||
|
|
|
@ -204,7 +204,7 @@
|
||||||
"Low priority": "Baja prioridad",
|
"Low priority": "Baja prioridad",
|
||||||
"Accept": "Aceptar",
|
"Accept": "Aceptar",
|
||||||
"Add": "Añadir",
|
"Add": "Añadir",
|
||||||
"Admin tools": "Herramientas de administración",
|
"Admin Tools": "Herramientas de administración",
|
||||||
"VoIP": "Voz IP",
|
"VoIP": "Voz IP",
|
||||||
"No Microphones detected": "No se ha detectado micrófono",
|
"No Microphones detected": "No se ha detectado micrófono",
|
||||||
"No Webcams detected": "No se ha detectado cámara",
|
"No Webcams detected": "No se ha detectado cámara",
|
||||||
|
|
|
@ -167,7 +167,7 @@
|
||||||
"Add": "Gehitu",
|
"Add": "Gehitu",
|
||||||
"Add a topic": "Gehitu gai bat",
|
"Add a topic": "Gehitu gai bat",
|
||||||
"Admin": "Kudeatzailea",
|
"Admin": "Kudeatzailea",
|
||||||
"Admin tools": "Kudeaketa tresnak",
|
"Admin Tools": "Kudeaketa tresnak",
|
||||||
"And %(count)s more...": "Eta %(count)s gehiago...",
|
"And %(count)s more...": "Eta %(count)s gehiago...",
|
||||||
"VoIP": "VoIP",
|
"VoIP": "VoIP",
|
||||||
"Missing Media Permissions, click here to request.": "Media baimenak falta dira, egin klik eskatzeko.",
|
"Missing Media Permissions, click here to request.": "Media baimenak falta dira, egin klik eskatzeko.",
|
||||||
|
|
|
@ -39,7 +39,7 @@
|
||||||
"Add email address": "E-mail cím megadása",
|
"Add email address": "E-mail cím megadása",
|
||||||
"Add phone number": "Telefonszám megadása",
|
"Add phone number": "Telefonszám megadása",
|
||||||
"Admin": "Adminisztrátor",
|
"Admin": "Adminisztrátor",
|
||||||
"Admin tools": "Admin. eszközök",
|
"Admin Tools": "Admin. eszközök",
|
||||||
"And %(count)s more...": "És még %(count)s...",
|
"And %(count)s more...": "És még %(count)s...",
|
||||||
"VoIP": "VoIP",
|
"VoIP": "VoIP",
|
||||||
"Missing Media Permissions, click here to request.": "Hiányzó Média jogosultság, kattintson ide az igényléshez.",
|
"Missing Media Permissions, click here to request.": "Hiányzó Média jogosultság, kattintson ide az igényléshez.",
|
||||||
|
|
|
@ -172,7 +172,7 @@
|
||||||
"Access Token:": "Token Akses:",
|
"Access Token:": "Token Akses:",
|
||||||
"Active call (%(roomName)s)": "Panggilan aktif (%(roomName)s)",
|
"Active call (%(roomName)s)": "Panggilan aktif (%(roomName)s)",
|
||||||
"Admin": "Admin",
|
"Admin": "Admin",
|
||||||
"Admin tools": "Alat admin",
|
"Admin Tools": "Alat admin",
|
||||||
"And %(count)s more...": "Dan %(count)s lagi...",
|
"And %(count)s more...": "Dan %(count)s lagi...",
|
||||||
"VoIP": "VoIP",
|
"VoIP": "VoIP",
|
||||||
"Missing Media Permissions, click here to request.": "Tidak ada Izin Media, klik disini untuk meminta.",
|
"Missing Media Permissions, click here to request.": "Tidak ada Izin Media, klik disini untuk meminta.",
|
||||||
|
|
|
@ -42,7 +42,7 @@
|
||||||
"Add email address": "Aggiungi indirizzo email",
|
"Add email address": "Aggiungi indirizzo email",
|
||||||
"Add phone number": "Aggiungi numero di telefono",
|
"Add phone number": "Aggiungi numero di telefono",
|
||||||
"Admin": "Amministratore",
|
"Admin": "Amministratore",
|
||||||
"Admin tools": "Strumenti di amministrazione",
|
"Admin Tools": "Strumenti di amministrazione",
|
||||||
"VoIP": "VoIP",
|
"VoIP": "VoIP",
|
||||||
"No Microphones detected": "Nessun Microfono rilevato",
|
"No Microphones detected": "Nessun Microfono rilevato",
|
||||||
"No Webcams detected": "Nessuna Webcam rilevata",
|
"No Webcams detected": "Nessuna Webcam rilevata",
|
||||||
|
|
|
@ -33,7 +33,7 @@
|
||||||
"Add email address": "이메일 주소 추가하기",
|
"Add email address": "이메일 주소 추가하기",
|
||||||
"Add phone number": "전화번호 추가하기",
|
"Add phone number": "전화번호 추가하기",
|
||||||
"Admin": "관리자",
|
"Admin": "관리자",
|
||||||
"Admin tools": "관리 도구",
|
"Admin Tools": "관리 도구",
|
||||||
"VoIP": "인터넷전화",
|
"VoIP": "인터넷전화",
|
||||||
"No Microphones detected": "마이크를 찾지 못했어요",
|
"No Microphones detected": "마이크를 찾지 못했어요",
|
||||||
"No Webcams detected": "카메라를 찾지 못했어요",
|
"No Webcams detected": "카메라를 찾지 못했어요",
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
"Add email address": "Pievieno Epasta adresi",
|
"Add email address": "Pievieno Epasta adresi",
|
||||||
"Add phone number": "Pievieno tālruņa numuru",
|
"Add phone number": "Pievieno tālruņa numuru",
|
||||||
"Admin": "Administrators",
|
"Admin": "Administrators",
|
||||||
"Admin tools": "Administratora rīki",
|
"Admin Tools": "Administratora rīki",
|
||||||
"And %(count)s more...": "Un vēl %(count)s citi...",
|
"And %(count)s more...": "Un vēl %(count)s citi...",
|
||||||
"VoIP": "VoIP",
|
"VoIP": "VoIP",
|
||||||
"Missing Media Permissions, click here to request.": "Nav pieejas medija saturam. Klikšķini šeit, lai pieprasītu.",
|
"Missing Media Permissions, click here to request.": "Nav pieejas medija saturam. Klikšķini šeit, lai pieprasītu.",
|
||||||
|
|
|
@ -79,7 +79,7 @@
|
||||||
"Active call (%(roomName)s)": "Actief gesprek (%(roomName)s)",
|
"Active call (%(roomName)s)": "Actief gesprek (%(roomName)s)",
|
||||||
"Add": "Toevoegen",
|
"Add": "Toevoegen",
|
||||||
"Add a topic": "Een onderwerp toevoegen",
|
"Add a topic": "Een onderwerp toevoegen",
|
||||||
"Admin tools": "Beheerhulpmiddelen",
|
"Admin Tools": "Beheerhulpmiddelen",
|
||||||
"And %(count)s more...": "Nog %(count)s andere...",
|
"And %(count)s more...": "Nog %(count)s andere...",
|
||||||
"VoIP": "VoiP",
|
"VoIP": "VoiP",
|
||||||
"Missing Media Permissions, click here to request.": "Ontbrekende mediatoestemmingen, klik hier om aan te vragen.",
|
"Missing Media Permissions, click here to request.": "Ontbrekende mediatoestemmingen, klik hier om aan te vragen.",
|
||||||
|
|
|
@ -123,7 +123,7 @@
|
||||||
"Active call (%(roomName)s)": "Aktywne połączenie (%(roomName)s)",
|
"Active call (%(roomName)s)": "Aktywne połączenie (%(roomName)s)",
|
||||||
"Add email address": "Dodaj adres e-mail",
|
"Add email address": "Dodaj adres e-mail",
|
||||||
"Admin": "Administrator",
|
"Admin": "Administrator",
|
||||||
"Admin tools": "Narzędzia administracyjne",
|
"Admin Tools": "Narzędzia administracyjne",
|
||||||
"And %(count)s more...": "Oraz %(count)s więcej...",
|
"And %(count)s more...": "Oraz %(count)s więcej...",
|
||||||
"VoIP": "VoIP (połączenie głosowe)",
|
"VoIP": "VoIP (połączenie głosowe)",
|
||||||
"No Microphones detected": "Nie wykryto żadnego mikrofonu",
|
"No Microphones detected": "Nie wykryto żadnego mikrofonu",
|
||||||
|
|
|
@ -772,7 +772,7 @@
|
||||||
"Public Chat": "Conversa pública",
|
"Public Chat": "Conversa pública",
|
||||||
"Uploading %(filename)s and %(count)s others|zero": "Enviando o arquivo %(filename)s",
|
"Uploading %(filename)s and %(count)s others|zero": "Enviando o arquivo %(filename)s",
|
||||||
"Room contains unknown devices": "Esta sala contém dispositivos desconhecidos",
|
"Room contains unknown devices": "Esta sala contém dispositivos desconhecidos",
|
||||||
"Admin tools": "Ferramentas de administração",
|
"Admin Tools": "Ferramentas de administração",
|
||||||
"You have been kicked from %(roomName)s by %(userName)s.": "Você foi removido(a) da sala %(roomName)s por %(userName)s.",
|
"You have been kicked from %(roomName)s by %(userName)s.": "Você foi removido(a) da sala %(roomName)s por %(userName)s.",
|
||||||
"Undecryptable": "Não é possível descriptografar",
|
"Undecryptable": "Não é possível descriptografar",
|
||||||
"Incoming video call from %(name)s": "Chamada de vídeo de %(name)s recebida",
|
"Incoming video call from %(name)s": "Chamada de vídeo de %(name)s recebida",
|
||||||
|
|
|
@ -783,7 +783,7 @@
|
||||||
"a room": "uma sala",
|
"a room": "uma sala",
|
||||||
"Accept": "Aceitar",
|
"Accept": "Aceitar",
|
||||||
"Active call (%(roomName)s)": "Chamada ativa (%(roomName)s)",
|
"Active call (%(roomName)s)": "Chamada ativa (%(roomName)s)",
|
||||||
"Admin tools": "Ferramentas de administração",
|
"Admin Tools": "Ferramentas de administração",
|
||||||
"And %(count)s more...": "E mais %(count)s...",
|
"And %(count)s more...": "E mais %(count)s...",
|
||||||
"Alias (optional)": "Apelido (opcional)",
|
"Alias (optional)": "Apelido (opcional)",
|
||||||
"Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.": "Não foi possível conectar ao Servidor de Base. Por favor, confira sua conectividade à internet, garanta que o <a>certificado SSL do Servidor de Base</a> é confiável, e que uma extensão do navegador não esteja bloqueando as requisições de rede.",
|
"Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.": "Não foi possível conectar ao Servidor de Base. Por favor, confira sua conectividade à internet, garanta que o <a>certificado SSL do Servidor de Base</a> é confiável, e que uma extensão do navegador não esteja bloqueando as requisições de rede.",
|
||||||
|
|
|
@ -767,7 +767,7 @@
|
||||||
"a room": "комната",
|
"a room": "комната",
|
||||||
"Accept": "Принять",
|
"Accept": "Принять",
|
||||||
"Active call (%(roomName)s)": "Активный вызов (%(roomName)s)",
|
"Active call (%(roomName)s)": "Активный вызов (%(roomName)s)",
|
||||||
"Admin tools": "Инструменты администратора",
|
"Admin Tools": "Инструменты администратора",
|
||||||
"And %(count)s more...": "И %(count)s больше...",
|
"And %(count)s more...": "И %(count)s больше...",
|
||||||
"Alias (optional)": "Псевдоним (опционально)",
|
"Alias (optional)": "Псевдоним (опционально)",
|
||||||
"<a>Click here</a> to join the discussion!": "<a>Нажмите здесь</a>, чтобы присоединиться к обсуждению!",
|
"<a>Click here</a> to join the discussion!": "<a>Нажмите здесь</a>, чтобы присоединиться к обсуждению!",
|
||||||
|
|
|
@ -171,7 +171,7 @@
|
||||||
"Access Token:": "Åtkomsttoken:",
|
"Access Token:": "Åtkomsttoken:",
|
||||||
"Active call (%(roomName)s)": "Aktiv samtal (%(roomName)s)",
|
"Active call (%(roomName)s)": "Aktiv samtal (%(roomName)s)",
|
||||||
"Add": "Lägg till",
|
"Add": "Lägg till",
|
||||||
"Admin tools": "Admin verktyg",
|
"Admin Tools": "Admin verktyg",
|
||||||
"And %(count)s more...": "Och %(count)s till...",
|
"And %(count)s more...": "Och %(count)s till...",
|
||||||
"Alias (optional)": "Alias (valfri)",
|
"Alias (optional)": "Alias (valfri)",
|
||||||
"Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.": "Det gick inte att ansluta till servern - kontrollera anslutningen, försäkra att din <a>hemservers TLS-certifikat</a> är betrott, och att inget webbläsartillägg blockerar förfrågningar.",
|
"Can't connect to homeserver - please check your connectivity, ensure your <a>homeserver's SSL certificate</a> is trusted, and that a browser extension is not blocking requests.": "Det gick inte att ansluta till servern - kontrollera anslutningen, försäkra att din <a>hemservers TLS-certifikat</a> är betrott, och att inget webbläsartillägg blockerar förfrågningar.",
|
||||||
|
|
|
@ -11,7 +11,7 @@
|
||||||
"Add email address": "ఇమెయిల్ చిరునామాను జోడించండి",
|
"Add email address": "ఇమెయిల్ చిరునామాను జోడించండి",
|
||||||
"Add phone number": "ఫోన్ నంబర్ను జోడించండి",
|
"Add phone number": "ఫోన్ నంబర్ను జోడించండి",
|
||||||
"Admin": "అడ్మిన్",
|
"Admin": "అడ్మిన్",
|
||||||
"Admin tools": "నిర్వాహక ఉపకరణాలు",
|
"Admin Tools": "నిర్వాహక ఉపకరణాలు",
|
||||||
"VoIP": "విఒఐపి",
|
"VoIP": "విఒఐపి",
|
||||||
"Missing Media Permissions, click here to request.": "మీడియా అనుమతులు మిస్ అయయి, అభ్యర్థించడానికి ఇక్కడ క్లిక్ చేయండి.",
|
"Missing Media Permissions, click here to request.": "మీడియా అనుమతులు మిస్ అయయి, అభ్యర్థించడానికి ఇక్కడ క్లిక్ చేయండి.",
|
||||||
"No Microphones detected": "మైక్రోఫోన్లు కనుగొనబడలేదు",
|
"No Microphones detected": "మైక్రోఫోన్లు కనుగొనబడలేదు",
|
||||||
|
|
|
@ -12,7 +12,7 @@
|
||||||
"Add email address": "E-posta adresi ekle",
|
"Add email address": "E-posta adresi ekle",
|
||||||
"Add phone number": "Telefon numarası ekle",
|
"Add phone number": "Telefon numarası ekle",
|
||||||
"Admin": "Admin",
|
"Admin": "Admin",
|
||||||
"Admin tools": "Admin araçları",
|
"Admin Tools": "Admin araçları",
|
||||||
"And %(count)s more...": "Ve %(count)s fazlası...",
|
"And %(count)s more...": "Ve %(count)s fazlası...",
|
||||||
"VoIP": "VoIP",
|
"VoIP": "VoIP",
|
||||||
"Missing Media Permissions, click here to request.": "Medya İzinleri Yok , talep etmek için burayı tıklayın.",
|
"Missing Media Permissions, click here to request.": "Medya İzinleri Yok , talep etmek için burayı tıklayın.",
|
||||||
|
|
|
@ -45,7 +45,7 @@
|
||||||
"Add email address": "Додати адресу е-пошти",
|
"Add email address": "Додати адресу е-пошти",
|
||||||
"Add phone number": "Додати номер телефону",
|
"Add phone number": "Додати номер телефону",
|
||||||
"Admin": "Адміністратор",
|
"Admin": "Адміністратор",
|
||||||
"Admin tools": "Засоби адміністрування",
|
"Admin Tools": "Засоби адміністрування",
|
||||||
"And %(count)s more...": "І %(count)s більше...",
|
"And %(count)s more...": "І %(count)s більше...",
|
||||||
"VoIP": "VoIP",
|
"VoIP": "VoIP",
|
||||||
"Missing Media Permissions, click here to request.": "Відсутні дозволи, натисніть для запиту.",
|
"Missing Media Permissions, click here to request.": "Відсутні дозволи, натисніть для запиту.",
|
||||||
|
|
|
@ -190,7 +190,7 @@
|
||||||
"New password": "新密码",
|
"New password": "新密码",
|
||||||
"Add a topic": "添加一个主题",
|
"Add a topic": "添加一个主题",
|
||||||
"Admin": "管理员",
|
"Admin": "管理员",
|
||||||
"Admin tools": "管理工具",
|
"Admin Tools": "管理工具",
|
||||||
"VoIP": "IP 电话",
|
"VoIP": "IP 电话",
|
||||||
"Missing Media Permissions, click here to request.": "没有媒体存储权限,点此获取。",
|
"Missing Media Permissions, click here to request.": "没有媒体存储权限,点此获取。",
|
||||||
"No Microphones detected": "未检测到麦克风",
|
"No Microphones detected": "未检测到麦克风",
|
||||||
|
|
|
@ -302,7 +302,7 @@
|
||||||
"%(targetName)s accepted the invitation for %(displayName)s.": "%(targetName)s 已接受 %(displayName)s 的邀請。",
|
"%(targetName)s accepted the invitation for %(displayName)s.": "%(targetName)s 已接受 %(displayName)s 的邀請。",
|
||||||
"Active call (%(roomName)s)": "活躍的通話(%(roomName)s)",
|
"Active call (%(roomName)s)": "活躍的通話(%(roomName)s)",
|
||||||
"Add": "新增",
|
"Add": "新增",
|
||||||
"Admin tools": "管理員工具",
|
"Admin Tools": "管理員工具",
|
||||||
"And %(count)s more...": "還有 %(count)s 個...",
|
"And %(count)s more...": "還有 %(count)s 個...",
|
||||||
"Missing Media Permissions, click here to request.": "遺失媒體權限,點選這裡來要求。",
|
"Missing Media Permissions, click here to request.": "遺失媒體權限,點選這裡來要求。",
|
||||||
"No Microphones detected": "未偵測到麥克風",
|
"No Microphones detected": "未偵測到麥克風",
|
||||||
|
|
|
@ -21,7 +21,7 @@ import Modal from '../Modal';
|
||||||
import { _t } from '../languageHandler';
|
import { _t } from '../languageHandler';
|
||||||
|
|
||||||
const INITIAL_STATE = {
|
const INITIAL_STATE = {
|
||||||
// Whether we're joining the currently viewed room
|
// Whether we're joining the currently viewed room (see isJoining())
|
||||||
joining: false,
|
joining: false,
|
||||||
// Any error that has occurred during joining
|
// Any error that has occurred during joining
|
||||||
joinError: null,
|
joinError: null,
|
||||||
|
@ -90,9 +90,6 @@ class RoomViewStore extends Store {
|
||||||
case 'join_room':
|
case 'join_room':
|
||||||
this._joinRoom(payload);
|
this._joinRoom(payload);
|
||||||
break;
|
break;
|
||||||
case 'joined_room':
|
|
||||||
this._joinedRoom(payload);
|
|
||||||
break;
|
|
||||||
case 'join_room_error':
|
case 'join_room_error':
|
||||||
this._joinRoomError(payload);
|
this._joinRoomError(payload);
|
||||||
break;
|
break;
|
||||||
|
@ -185,9 +182,11 @@ class RoomViewStore extends Store {
|
||||||
MatrixClientPeg.get().joinRoom(
|
MatrixClientPeg.get().joinRoom(
|
||||||
this._state.roomAlias || this._state.roomId, payload.opts,
|
this._state.roomAlias || this._state.roomId, payload.opts,
|
||||||
).done(() => {
|
).done(() => {
|
||||||
dis.dispatch({
|
// We don't actually need to do anything here: we do *not*
|
||||||
action: 'joined_room',
|
// clear the 'joining' flag because the Room object and/or
|
||||||
});
|
// our 'joined' member event may not have come down the sync
|
||||||
|
// stream yet, and that's the point at which we'd consider
|
||||||
|
// the user joined to the room.
|
||||||
}, (err) => {
|
}, (err) => {
|
||||||
dis.dispatch({
|
dis.dispatch({
|
||||||
action: 'join_room_error',
|
action: 'join_room_error',
|
||||||
|
@ -202,12 +201,6 @@ class RoomViewStore extends Store {
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
_joinedRoom(payload) {
|
|
||||||
this._setState({
|
|
||||||
joining: false,
|
|
||||||
});
|
|
||||||
}
|
|
||||||
|
|
||||||
_joinRoomError(payload) {
|
_joinRoomError(payload) {
|
||||||
this._setState({
|
this._setState({
|
||||||
joining: false,
|
joining: false,
|
||||||
|
@ -249,7 +242,29 @@ class RoomViewStore extends Store {
|
||||||
return this._state.roomLoadError;
|
return this._state.roomLoadError;
|
||||||
}
|
}
|
||||||
|
|
||||||
// Whether we're joining the currently viewed room
|
// True if we're expecting the user to be joined to the room currently being
|
||||||
|
// viewed. Note that this is left true after the join request has finished,
|
||||||
|
// since we should still consider a join to be in progress until the room
|
||||||
|
// & member events come down the sync.
|
||||||
|
//
|
||||||
|
// This flag remains true after the room has been sucessfully joined,
|
||||||
|
// (this store doesn't listen for the appropriate member events)
|
||||||
|
// so you should always observe the joined state from the member event
|
||||||
|
// if a room object is present.
|
||||||
|
// ie. The correct logic is:
|
||||||
|
// if (room) {
|
||||||
|
// if (myMember.membership == 'joined') {
|
||||||
|
// // user is joined to the room
|
||||||
|
// } else {
|
||||||
|
// // Not joined
|
||||||
|
// }
|
||||||
|
// } else {
|
||||||
|
// if (RoomViewStore.isJoining()) {
|
||||||
|
// // show spinner
|
||||||
|
// } else {
|
||||||
|
// // show join prompt
|
||||||
|
// }
|
||||||
|
// }
|
||||||
isJoining() {
|
isJoining() {
|
||||||
return this._state.joining;
|
return this._state.joining;
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue