diff options
author | 2017-10-19 11:15:25 +0200 | |
---|---|---|
committer | 2017-10-19 11:19:50 +0200 | |
commit | ef503a1e29a540c7318efb5f2018efbf00706198 (patch) | |
tree | 05930a5d43f45c0e769c9ba256ba82f00d85b6ac /src/containers/settings/EditSettingsScreen.js | |
parent | remove unnecessary platform check (diff) | |
download | ferdium-app-ef503a1e29a540c7318efb5f2018efbf00706198.tar.gz ferdium-app-ef503a1e29a540c7318efb5f2018efbf00706198.tar.zst ferdium-app-ef503a1e29a540c7318efb5f2018efbf00706198.zip |
Add option to disable system tray icon
Diffstat (limited to 'src/containers/settings/EditSettingsScreen.js')
-rw-r--r-- | src/containers/settings/EditSettingsScreen.js | 23 |
1 files changed, 17 insertions, 6 deletions
diff --git a/src/containers/settings/EditSettingsScreen.js b/src/containers/settings/EditSettingsScreen.js index 0e17cafce..6dc2175e1 100644 --- a/src/containers/settings/EditSettingsScreen.js +++ b/src/containers/settings/EditSettingsScreen.js | |||
@@ -9,6 +9,7 @@ import UserStore from '../../stores/UserStore'; | |||
9 | import Form from '../../lib/Form'; | 9 | import Form from '../../lib/Form'; |
10 | import languages from '../../i18n/languages'; | 10 | import languages from '../../i18n/languages'; |
11 | import { gaPage } from '../../lib/analytics'; | 11 | import { gaPage } from '../../lib/analytics'; |
12 | import { DEFAULT_APP_SETTINGS } from '../../config'; | ||
12 | 13 | ||
13 | 14 | ||
14 | import EditSettingsForm from '../../components/settings/settings/EditSettingsForm'; | 15 | import EditSettingsForm from '../../components/settings/settings/EditSettingsForm'; |
@@ -26,6 +27,10 @@ const messages = defineMessages({ | |||
26 | id: 'settings.app.form.runInBackground', | 27 | id: 'settings.app.form.runInBackground', |
27 | defaultMessage: '!!!Keep Franz in background when closing the window', | 28 | defaultMessage: '!!!Keep Franz in background when closing the window', |
28 | }, | 29 | }, |
30 | enableSystemTray: { | ||
31 | id: 'settings.app.form.enableSystemTray', | ||
32 | defaultMessage: '!!!Show Franz in system tray', | ||
33 | }, | ||
29 | minimizeToSystemTray: { | 34 | minimizeToSystemTray: { |
30 | id: 'settings.app.form.minimizeToSystemTray', | 35 | id: 'settings.app.form.minimizeToSystemTray', |
31 | defaultMessage: '!!!Minimize Franz to system tray', | 36 | defaultMessage: '!!!Minimize Franz to system tray', |
@@ -61,6 +66,7 @@ export default class EditSettingsScreen extends Component { | |||
61 | settings.update({ | 66 | settings.update({ |
62 | settings: { | 67 | settings: { |
63 | runInBackground: settingsData.runInBackground, | 68 | runInBackground: settingsData.runInBackground, |
69 | enableSystemTray: settingsData.enableSystemTray, | ||
64 | minimizeToSystemTray: settingsData.minimizeToSystemTray, | 70 | minimizeToSystemTray: settingsData.minimizeToSystemTray, |
65 | locale: settingsData.locale, | 71 | locale: settingsData.locale, |
66 | beta: settingsData.beta, | 72 | beta: settingsData.beta, |
@@ -91,33 +97,38 @@ export default class EditSettingsScreen extends Component { | |||
91 | autoLaunchOnStart: { | 97 | autoLaunchOnStart: { |
92 | label: intl.formatMessage(messages.autoLaunchOnStart), | 98 | label: intl.formatMessage(messages.autoLaunchOnStart), |
93 | value: app.autoLaunchOnStart, | 99 | value: app.autoLaunchOnStart, |
94 | default: true, | 100 | default: DEFAULT_APP_SETTINGS.autoLaunchOnStart, |
95 | }, | 101 | }, |
96 | autoLaunchInBackground: { | 102 | autoLaunchInBackground: { |
97 | label: intl.formatMessage(messages.autoLaunchInBackground), | 103 | label: intl.formatMessage(messages.autoLaunchInBackground), |
98 | value: app.launchInBackground, | 104 | value: app.launchInBackground, |
99 | default: false, | 105 | default: DEFAULT_APP_SETTINGS.autoLaunchInBackground, |
100 | }, | 106 | }, |
101 | runInBackground: { | 107 | runInBackground: { |
102 | label: intl.formatMessage(messages.runInBackground), | 108 | label: intl.formatMessage(messages.runInBackground), |
103 | value: settings.all.runInBackground, | 109 | value: settings.all.runInBackground, |
104 | default: true, | 110 | default: DEFAULT_APP_SETTINGS.runInBackground, |
111 | }, | ||
112 | enableSystemTray: { | ||
113 | label: intl.formatMessage(messages.enableSystemTray), | ||
114 | value: settings.all.enableSystemTray, | ||
115 | default: DEFAULT_APP_SETTINGS.enableSystemTray, | ||
105 | }, | 116 | }, |
106 | minimizeToSystemTray: { | 117 | minimizeToSystemTray: { |
107 | label: intl.formatMessage(messages.minimizeToSystemTray), | 118 | label: intl.formatMessage(messages.minimizeToSystemTray), |
108 | value: settings.all.minimizeToSystemTray, | 119 | value: settings.all.minimizeToSystemTray, |
109 | default: false, | 120 | default: DEFAULT_APP_SETTINGS.minimizeToSystemTray, |
110 | }, | 121 | }, |
111 | locale: { | 122 | locale: { |
112 | label: intl.formatMessage(messages.language), | 123 | label: intl.formatMessage(messages.language), |
113 | value: app.locale, | 124 | value: app.locale, |
114 | options, | 125 | options, |
115 | default: 'en-US', | 126 | default: DEFAULT_APP_SETTINGS.locale, |
116 | }, | 127 | }, |
117 | beta: { | 128 | beta: { |
118 | label: intl.formatMessage(messages.beta), | 129 | label: intl.formatMessage(messages.beta), |
119 | value: user.data.beta, | 130 | value: user.data.beta, |
120 | default: false, | 131 | default: DEFAULT_APP_SETTINGS.beta, |
121 | }, | 132 | }, |
122 | }, | 133 | }, |
123 | }; | 134 | }; |