aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar Stefan Malzner <stefan@adlk.io>2017-11-29 21:27:26 +0100
committerLibravatar Stefan Malzner <stefan@adlk.io>2017-11-29 21:27:26 +0100
commit0fa1cafeae39c00a9102a1a1d83a422d600a80d0 (patch)
tree2ed867edcc255ae8e558bdcb059248f6ec9021cc
parentMerge pull request #359 from jaebradley/fix-i-want-add-services-manually-typo (diff)
downloadferdium-app-0fa1cafeae39c00a9102a1a1d83a422d600a80d0.tar.gz
ferdium-app-0fa1cafeae39c00a9102a1a1d83a422d600a80d0.tar.zst
ferdium-app-0fa1cafeae39c00a9102a1a1d83a422d600a80d0.zip
fix(App): App mute now disables notifications as well
-rw-r--r--src/components/layout/Sidebar.js8
-rw-r--r--src/i18n/locales/en-US.json4
-rw-r--r--src/stores/AppStore.js2
3 files changed, 8 insertions, 6 deletions
diff --git a/src/components/layout/Sidebar.js b/src/components/layout/Sidebar.js
index cb2ecc8ce..915ebeace 100644
--- a/src/components/layout/Sidebar.js
+++ b/src/components/layout/Sidebar.js
@@ -17,12 +17,12 @@ const messages = defineMessages({
17 defaultMessage: '!!!Add new service', 17 defaultMessage: '!!!Add new service',
18 }, 18 },
19 mute: { 19 mute: {
20 id: 'sidebar.mute', 20 id: 'sidebar.muteApp',
21 defaultMessage: '!!!Disable audio', 21 defaultMessage: '!!!Disable notifications & audio',
22 }, 22 },
23 unmute: { 23 unmute: {
24 id: 'sidebar.unmute', 24 id: 'sidebar.unmuteApp',
25 defaultMessage: '!!!Enable audio', 25 defaultMessage: '!!!Enable notifications & audio',
26 }, 26 },
27}); 27});
28 28
diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json
index 308ec8432..37034d4e1 100644
--- a/src/i18n/locales/en-US.json
+++ b/src/i18n/locales/en-US.json
@@ -62,8 +62,8 @@
62 "infobar.requiredRequestsFailed": "Could not load services and user information", 62 "infobar.requiredRequestsFailed": "Could not load services and user information",
63 "sidebar.settings": "Settings", 63 "sidebar.settings": "Settings",
64 "sidebar.addNewService": "Add new service", 64 "sidebar.addNewService": "Add new service",
65 "sidebar.mute": "Disable audio", 65 "sidebar.muteApp": "Disable notifications & audio",
66 "sidebar.unmute": "Enable audio", 66 "sidebar.unmuteApp": "Enable notifications & audio",
67 "services.welcome": "Welcome to Franz", 67 "services.welcome": "Welcome to Franz",
68 "services.getStarted": "Get started", 68 "services.getStarted": "Get started",
69 "settings.account.headline": "Account", 69 "settings.account.headline": "Account",
diff --git a/src/stores/AppStore.js b/src/stores/AppStore.js
index 0b7c60bce..71b41e499 100644
--- a/src/stores/AppStore.js
+++ b/src/stores/AppStore.js
@@ -150,6 +150,8 @@ export default class AppStore extends Store {
150 150
151 // Actions 151 // Actions
152 @action _notify({ title, options, notificationId, serviceId = null }) { 152 @action _notify({ title, options, notificationId, serviceId = null }) {
153 if (this.stores.settings.all.isAppMuted) return;
154
153 const notification = new window.Notification(title, options); 155 const notification = new window.Notification(title, options);
154 notification.onclick = (e) => { 156 notification.onclick = (e) => {
155 if (serviceId) { 157 if (serviceId) {