diff --git a/web/react/components/setting_item_min.jsx b/web/react/components/setting_item_min.jsx
index 2209c74d1c..1352269005 100644
--- a/web/react/components/setting_item_min.jsx
+++ b/web/react/components/setting_item_min.jsx
@@ -3,10 +3,14 @@
module.exports = React.createClass({
render: function() {
+ var editButton = '';
+ if(!this.props.disableOpen) {
+ editButton =
Edit;
+ }
return (
- {this.props.title}
- - Edit
+ {editButton}
- {this.props.describe}
);
diff --git a/web/react/components/user_settings.jsx b/web/react/components/user_settings.jsx
index fa01d62c29..0dfea6543d 100644
--- a/web/react/components/user_settings.jsx
+++ b/web/react/components/user_settings.jsx
@@ -236,36 +236,24 @@ var NotificationsTab = React.createClass({
}
var soundSection;
- if (this.props.activeSection === 'sound') {
+ if (this.props.activeSection === 'sound' && this.state.soundNeeded) {
+ var soundActive = ["",""];
+ if (this.state.enable_sound === "false") {
+ soundActive[1] = "active";
+ } else {
+ soundActive[0] = "active";
+ }
+
var inputs = [];
- if(this.state.soundNeeded) {
- var soundActive = ["",""];
- if (this.state.enable_sound === "false") {
- soundActive[1] = "active";
- } else {
- soundActive[0] = "active";
- }
-
- inputs.push(
-
-
-
-
-
+ inputs.push(
+
+
+
+
- );
- } else {
- inputs.push(
-
-
-
-
-
-
Please disable notification sounds in your browser settings
-
- )
- }
+
+ );
soundSection = (
);
}
diff --git a/web/react/utils/utils.jsx b/web/react/utils/utils.jsx
index b1832f3f1f..6236e11ddd 100644
--- a/web/react/utils/utils.jsx
+++ b/web/react/utils/utils.jsx
@@ -124,7 +124,7 @@ module.exports.notifyMe = function(title, body, channel) {
}
module.exports.ding = function() {
- if (!navigator || navigator.userAgent.toLowerCase().indexOf("firefox") === -1) {
+ if (!navigator || !navigator.userAgent || navigator.userAgent.toLowerCase().indexOf("firefox") === -1) {
var audio = new Audio('/static/images/ding.mp3');
audio.play();
}