Node.js based forum software built for the modern web
closes #6456
Barış Soner Uşaklı501d02220c8e
diff --git a/public/language/en-GB/admin/settings/notifications.json b/public/language/en-GB/admin/settings/notifications.jsonindex da6c9680a3..03fa0ac66a 100644--- a/public/language/en-GB/admin/settings/notifications.json+++ b/public/language/en-GB/admin/settings/notifications.json@@ -2,5 +2,6 @@"notifications": "Notifications","welcome-notification": "Welcome Notification","welcome-notification-link": "Welcome Notification Link",- "welcome-notification-uid": "Welcome Notification User (UID)"+ "welcome-notification-uid": "Welcome Notification User (UID)",+ "notification-alert-timeout": "Notification Alert Timeout"}\ No newline at end of filediff --git a/public/src/modules/notifications.js b/public/src/modules/notifications.jsindex 92574f3eb1..c9be4b87d8 100644--- a/public/src/modules/notifications.js+++ b/public/src/modules/notifications.js@@ -70,7 +70,7 @@ define('notifications', ['sounds', 'translator', 'components', 'navigator', 'benvar payload = {alert_id: 'new_notif',title: '[[notifications:new_notification]]',- timeout: 2000,+ timeout: parseInt(config.notificationAlertTimeout, 10) || 5000,};if (notifData.path) {diff --git a/src/controllers/api.js b/src/controllers/api.jsindex ed8ad64700..b969b7be8a 100644--- a/src/controllers/api.js+++ b/src/controllers/api.js@@ -62,6 +62,7 @@ apiController.loadConfig = function (req, callback) {config.bootswatchSkin = meta.config.bootswatchSkin || 'noskin';config.defaultBootswatchSkin = meta.config.bootswatchSkin || 'noskin';config.enablePostHistory = parseInt(meta.config.enablePostHistory || 1, 10) === 1;+ config.notificationAlertTimeout = parseInt(meta.config.notificationAlertTimeout, 10) || 5000;if (config.useOutgoingLinksPage) {config.outgoingLinksWhitelist = meta.config['outgoingLinks:whitelist'];diff --git a/src/views/admin/settings/notifications.tpl b/src/views/admin/settings/notifications.tplindex 3e68295699..1f1af27037 100644--- a/src/views/admin/settings/notifications.tpl+++ b/src/views/admin/settings/notifications.tpl@@ -7,6 +7,8 @@<strong>[[admin/settings/notifications:welcome-notification]]</strong><br /> <textarea class="form-control" data-field="welcomeNotification"></textarea><br /><strong>[[admin/settings/notifications:welcome-notification-link]]</strong><br /> <input type="text" class="form-control" data-field="welcomeLink"><br /><strong>[[admin/settings/notifications:welcome-notification-uid]]</strong><br /> <input type="text" class="form-control" data-field="welcomeUid"><br />++ <strong>[[admin/settings/notifications:notification-alert-timeout]]</strong><br /> <input type="text" class="form-control" data-field="notificationAlertTimeout" placeholder="5000"><br /></form></div></div>