2 files changed, 18 insertions, 1 deletions
diff --git a/webclient/settings/settings-controller.js b/webclient/settings/settings-controller.js
index 8c877a24e9..9cdace704a 100644
--- a/webclient/settings/settings-controller.js
+++ b/webclient/settings/settings-controller.js
@@ -194,7 +194,16 @@ angular.module('SettingsController', ['matrixService', 'mFileUpload', 'mFileInpu
/*** Desktop notifications section ***/
$scope.settings = {
- notifications: undefined
+ notifications: undefined,
+ bingWords: matrixService.config().bingWords
+ };
+
+ $scope.saveBingWords = function() {
+ console.log("Saving words: "+JSON.stringify($scope.settings.bingWords));
+ var config = matrixService.config();
+ config.bingWords = $scope.settings.bingWords;
+ matrixService.setConfig(config);
+ matrixService.saveConfig();
};
// If the browser supports it, check the desktop notification state
diff --git a/webclient/settings/settings.html b/webclient/settings/settings.html
index c358a6e9d8..3b3dd3dadd 100644
--- a/webclient/settings/settings.html
+++ b/webclient/settings/settings.html
@@ -52,6 +52,14 @@
<div class="section" ng-switch="settings.notifications">
<div ng-switch-when="granted">
Notifications are enabled.
+ <div class="section">
+ <h4>Words to alert on:</h4>
+ <input size=40 name="bingWords" ng-model="settings.bingWords" ng-list placeholder="Enter words separated with ,"
+ ng-blur="saveBingWords()"/>
+ <ul>
+ <li ng-repeat="word in settings.bingWords">{{word}}</li>
+ </ul>
+ </div>
</div>
<div ng-switch-when="denied">
You have denied permission for notifications.<br/>
|