Upvote notification frequency selection (#6087)

Closes #5963

- Notify on every upvote
- Notify on every tenth upvote
- Notify logarithmically (on 10, 100, 1000...)
- Disable upvote notifications
This commit is contained in:
Peter Jaszkowiak
2017-11-21 12:14:14 -07:00
committed by Julian Lam
parent 3fd25257e0
commit 74ceb78800
6 changed files with 71 additions and 6 deletions

View File

@@ -135,6 +135,20 @@ settingsController.get = function (req, res, callback) {
language.selected = language.code === userData.settings.userLang;
});
var notifFreqOptions = [
'all',
'everyTen',
'logarithmic',
'disabled',
];
userData.upvoteNotifFreq = notifFreqOptions.map(function (name) {
return {
name: name,
selected: name === userData.notifFreqOptions,
};
});
userData.disableCustomUserSkins = parseInt(meta.config.disableCustomUserSkins, 10) === 1;
userData.allowUserHomePage = parseInt(meta.config.allowUserHomePage, 10) === 1;