Do not show the bug report section if there is no bug_report_endpoint_url

This commit is contained in:
Kegan Dougal 2017-01-25 14:43:47 +00:00
parent 5991172182
commit b00e090600
2 changed files with 6 additions and 1 deletions

View file

@ -19,6 +19,8 @@ var DEFAULTS = {
integrations_ui_url: "https://scalar.vector.im/",
// Base URL to the REST interface of the integrations server
integrations_rest_url: "https://scalar.vector.im/api",
// Where to send bug reports. If not specified, bugs cannot be sent.
bug_report_endpoint_url: null,
};
class SdkConfig {

View file

@ -26,6 +26,7 @@ var UserSettingsStore = require('../../UserSettingsStore');
var GeminiScrollbar = require('react-gemini-scrollbar');
var Email = require('../../email');
var AddThreepid = require('../../AddThreepid');
var SdkConfig = require('../../SdkConfig');
// if this looks like a release, use the 'version' from package.json; else use
// the git sha.
@ -491,7 +492,9 @@ module.exports = React.createClass({
},
_renderBugReport: function() {
// TODO: If there is no bug report endpoint, hide this.
if (!SdkConfig.get().bug_report_endpoint_url) {
return <div />
}
return (
<div>
<h3>Bug Report</h3>