Add message for HSes that don't support groups
Also add an unrelated missed translation
This commit is contained in:
parent
a26498bc6c
commit
812b3643de
2 changed files with 11 additions and 1 deletions
|
@ -17,6 +17,7 @@ limitations under the License.
|
||||||
import MatrixClientPeg from '../../MatrixClientPeg';
|
import MatrixClientPeg from '../../MatrixClientPeg';
|
||||||
import sdk from '../../index';
|
import sdk from '../../index';
|
||||||
import { sanitizedHtmlNode } from '../../HtmlUtils';
|
import { sanitizedHtmlNode } from '../../HtmlUtils';
|
||||||
|
import { _t } from '../../languageHandler';
|
||||||
|
|
||||||
|
|
||||||
module.exports = React.createClass({
|
module.exports = React.createClass({
|
||||||
|
@ -30,6 +31,7 @@ module.exports = React.createClass({
|
||||||
return {
|
return {
|
||||||
phase: "GroupView.LOADING", // LOADING / DISPLAY / ERROR / NOT_FOUND
|
phase: "GroupView.LOADING", // LOADING / DISPLAY / ERROR / NOT_FOUND
|
||||||
summary: null,
|
summary: null,
|
||||||
|
error: null,
|
||||||
};
|
};
|
||||||
},
|
},
|
||||||
|
|
||||||
|
@ -61,6 +63,7 @@ module.exports = React.createClass({
|
||||||
this.setState({
|
this.setState({
|
||||||
phase: err.httpStatus == 404 ? "GroupView.NOT_FOUND" :"GroupView.ERROR",
|
phase: err.httpStatus == 404 ? "GroupView.NOT_FOUND" :"GroupView.ERROR",
|
||||||
summary: null,
|
summary: null,
|
||||||
|
error: err,
|
||||||
});
|
});
|
||||||
});
|
});
|
||||||
},
|
},
|
||||||
|
@ -116,9 +119,14 @@ module.exports = React.createClass({
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
} else {
|
} else {
|
||||||
|
let extraText;
|
||||||
|
if (this.state.error.errcode === 'M_UNRECOGNIZED') {
|
||||||
|
extraText = <div>{_t('This Home server does not support groups')}</div>;
|
||||||
|
}
|
||||||
return (
|
return (
|
||||||
<div style={{margin: "auto"}}>
|
<div style={{margin: "auto"}}>
|
||||||
Failed to load {this.props.groupId}
|
Failed to load {this.props.groupId}
|
||||||
|
{extraText}
|
||||||
</div>
|
</div>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
|
@ -920,5 +920,7 @@
|
||||||
"Ignore request": "Ignore request",
|
"Ignore request": "Ignore request",
|
||||||
"You added a new device '%(displayName)s', which is requesting encryption keys.": "You added a new device '%(displayName)s', which is requesting encryption keys.",
|
"You added a new device '%(displayName)s', which is requesting encryption keys.": "You added a new device '%(displayName)s', which is requesting encryption keys.",
|
||||||
"Your unverified device '%(displayName)s' is requesting encryption keys.": "Your unverified device '%(displayName)s' is requesting encryption keys.",
|
"Your unverified device '%(displayName)s' is requesting encryption keys.": "Your unverified device '%(displayName)s' is requesting encryption keys.",
|
||||||
"Encryption key request": "Encryption key request"
|
"Encryption key request": "Encryption key request",
|
||||||
|
"This Home server does not support groups": "This Home server does not support groups",
|
||||||
|
"Loading device info...": "Loading device info..."
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue