diff --git a/src/components/views/dialogs/UserSettingsDialog.js b/src/components/views/dialogs/UserSettingsDialog.js
index e893f96a5f..adcfa751c2 100644
--- a/src/components/views/dialogs/UserSettingsDialog.js
+++ b/src/components/views/dialogs/UserSettingsDialog.js
@@ -23,6 +23,7 @@ import GeneralSettingsTab from "../settings/tabs/GeneralSettingsTab";
import dis from '../../../dispatcher';
import SettingsStore from "../../../settings/SettingsStore";
import LabsSettingsTab from "../settings/tabs/LabsSettingsTab";
+import NotificationSettingsTab from "../settings/tabs/NotificationSettingsTab";
// TODO: Ditch this whole component
export class TempTab extends React.Component {
@@ -56,7 +57,7 @@ export default class UserSettingsDialog extends React.Component {
tabs.push(new Tab(
_td("Notifications"),
"mx_UserSettingsDialog_bellIcon",
-
Notifications Test
,
+ ,
));
tabs.push(new Tab(
_td("Preferences"),
diff --git a/src/components/views/settings/Notifications.js b/src/components/views/settings/Notifications.js
index 40c43e6b2e..ff843d0e1e 100644
--- a/src/components/views/settings/Notifications.js
+++ b/src/components/views/settings/Notifications.js
@@ -28,6 +28,7 @@ import {
PushRuleVectorState,
ContentRules,
} from '../../../notifications';
+import * as SdkConfig from "../../../SdkConfig";
// TODO: this "view" component still has far too much application logic in it,
// which should be factored out to other files.
@@ -73,8 +74,6 @@ module.exports = React.createClass({
propTypes: {
// The array of threepids from the JS SDK (required for email notifications)
threepids: React.PropTypes.array.isRequired,
- // The brand string set when creating an email pusher
- brand: React.PropTypes.string,
},
getDefaultProps: function() {
@@ -146,7 +145,7 @@ module.exports = React.createClass({
let emailPusherPromise;
if (event.target.checked) {
const data = {};
- data['brand'] = this.props.brand || 'Riot';
+ data['brand'] = SdkConfig.get().brand || 'Riot';
emailPusherPromise = UserSettingsStore.addEmailPusher(address, data);
} else {
const emailPusher = UserSettingsStore.getEmailPusher(this.state.pushers, address);
diff --git a/src/components/views/settings/tabs/NotificationSettingsTab.js b/src/components/views/settings/tabs/NotificationSettingsTab.js
new file mode 100644
index 0000000000..eb7523fdd1
--- /dev/null
+++ b/src/components/views/settings/tabs/NotificationSettingsTab.js
@@ -0,0 +1,46 @@
+/*
+Copyright 2019 New Vector Ltd
+
+Licensed under the Apache License, Version 2.0 (the "License");
+you may not use this file except in compliance with the License.
+You may obtain a copy of the License at
+
+ http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing, software
+distributed under the License is distributed on an "AS IS" BASIS,
+WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+See the License for the specific language governing permissions and
+limitations under the License.
+*/
+
+import React from 'react';
+import {_t} from "../../../../languageHandler";
+import MatrixClientPeg from "../../../../MatrixClientPeg";
+const sdk = require("../../../../index");
+
+export default class NotificationSettingsTab extends React.Component {
+ constructor() {
+ super();
+
+ this.state = {
+ threepids: [],
+ };
+ }
+
+ async componentWillMount(): void {
+ MatrixClientPeg.get().getThreePids().then(r => this.setState({threepids: r.threepids}));
+ }
+
+ render() {
+ const Notifications = sdk.getComponent("views.settings.Notifications");
+ return (
+
+
{_t("Notifications")}
+
+
+
+
+ );
+ }
+}
\ No newline at end of file