mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-12-21 05:14:21 -05:00
Added a section on bing words if you enable desktop notifications.
This commit is contained in:
parent
84372cef4a
commit
b170fe921e
@ -194,7 +194,16 @@ angular.module('SettingsController', ['matrixService', 'mFileUpload', 'mFileInpu
|
|||||||
|
|
||||||
/*** Desktop notifications section ***/
|
/*** Desktop notifications section ***/
|
||||||
$scope.settings = {
|
$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
|
// If the browser supports it, check the desktop notification state
|
||||||
|
@ -52,6 +52,14 @@
|
|||||||
<div class="section" ng-switch="settings.notifications">
|
<div class="section" ng-switch="settings.notifications">
|
||||||
<div ng-switch-when="granted">
|
<div ng-switch-when="granted">
|
||||||
Notifications are enabled.
|
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>
|
||||||
<div ng-switch-when="denied">
|
<div ng-switch-when="denied">
|
||||||
You have denied permission for notifications.<br/>
|
You have denied permission for notifications.<br/>
|
||||||
|
Loading…
Reference in New Issue
Block a user