diff options
Diffstat (limited to 'src/components/settings/settings/EditSettingsForm.js')
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 50 |
1 files changed, 46 insertions, 4 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 0b69f7514..835fd394b 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -9,6 +9,7 @@ import Button from '../../ui/Button'; | |||
9 | import Toggle from '../../ui/Toggle'; | 9 | import Toggle from '../../ui/Toggle'; |
10 | import Select from '../../ui/Select'; | 10 | import Select from '../../ui/Select'; |
11 | import PremiumFeatureContainer from '../../ui/PremiumFeatureContainer'; | 11 | import PremiumFeatureContainer from '../../ui/PremiumFeatureContainer'; |
12 | import Input from '../../ui/Input'; | ||
12 | 13 | ||
13 | import { FRANZ_TRANSLATION } from '../../../config'; | 14 | import { FRANZ_TRANSLATION } from '../../../config'; |
14 | 15 | ||
@@ -21,6 +22,14 @@ const messages = defineMessages({ | |||
21 | id: 'settings.app.headlineGeneral', | 22 | id: 'settings.app.headlineGeneral', |
22 | defaultMessage: '!!!General', | 23 | defaultMessage: '!!!General', |
23 | }, | 24 | }, |
25 | serverInfo: { | ||
26 | id: 'settings.app.serverInfo', | ||
27 | defaultMessage: '!!!We advice you to logout after changing your server as your settings might not be saved otherwise.', | ||
28 | }, | ||
29 | todoServerInfo: { | ||
30 | id: 'settings.app.todoServerInfo', | ||
31 | defaultMessage: '!!!This server will be used for the "Franz Todo" feature. The default server will only work for premium users. (default: https://app.franztodos.com)', | ||
32 | }, | ||
24 | headlineLanguage: { | 33 | headlineLanguage: { |
25 | id: 'settings.app.headlineLanguage', | 34 | id: 'settings.app.headlineLanguage', |
26 | defaultMessage: '!!!Language', | 35 | defaultMessage: '!!!Language', |
@@ -39,7 +48,7 @@ const messages = defineMessages({ | |||
39 | }, | 48 | }, |
40 | translationHelp: { | 49 | translationHelp: { |
41 | id: 'settings.app.translationHelp', | 50 | id: 'settings.app.translationHelp', |
42 | defaultMessage: '!!!Help us to translate Franz into your language.', | 51 | defaultMessage: '!!!Help us to translate Ferdi into your language.', |
43 | }, | 52 | }, |
44 | subheadlineCache: { | 53 | subheadlineCache: { |
45 | id: 'settings.app.subheadlineCache', | 54 | id: 'settings.app.subheadlineCache', |
@@ -47,7 +56,7 @@ const messages = defineMessages({ | |||
47 | }, | 56 | }, |
48 | cacheInfo: { | 57 | cacheInfo: { |
49 | id: 'settings.app.cacheInfo', | 58 | id: 'settings.app.cacheInfo', |
50 | defaultMessage: '!!!Franz cache is currently using {size} of disk space.', | 59 | defaultMessage: '!!!Ferdi cache is currently using {size} of disk space.', |
51 | }, | 60 | }, |
52 | buttonClearAllCache: { | 61 | buttonClearAllCache: { |
53 | id: 'settings.app.buttonClearAllCache', | 62 | id: 'settings.app.buttonClearAllCache', |
@@ -71,7 +80,7 @@ const messages = defineMessages({ | |||
71 | }, | 80 | }, |
72 | updateStatusUpToDate: { | 81 | updateStatusUpToDate: { |
73 | id: 'settings.app.updateStatusUpToDate', | 82 | id: 'settings.app.updateStatusUpToDate', |
74 | defaultMessage: '!!!You are using the latest version of Franz', | 83 | defaultMessage: '!!!You are using the latest version of Ferdi', |
75 | }, | 84 | }, |
76 | currentVersion: { | 85 | currentVersion: { |
77 | id: 'settings.app.currentVersion', | 86 | id: 'settings.app.currentVersion', |
@@ -147,6 +156,8 @@ export default @observer class EditSettingsForm extends Component { | |||
147 | updateButtonLabelMessage = messages.buttonSearchForUpdate; | 156 | updateButtonLabelMessage = messages.buttonSearchForUpdate; |
148 | } | 157 | } |
149 | 158 | ||
159 | const isLoggedIn = Boolean(localStorage.getItem('authToken')); | ||
160 | |||
150 | return ( | 161 | return ( |
151 | <div className="settings__main"> | 162 | <div className="settings__main"> |
152 | <div className="settings__header"> | 163 | <div className="settings__header"> |
@@ -163,14 +174,33 @@ export default @observer class EditSettingsForm extends Component { | |||
163 | <Toggle field={form.$('autoLaunchOnStart')} /> | 174 | <Toggle field={form.$('autoLaunchOnStart')} /> |
164 | <Toggle field={form.$('runInBackground')} /> | 175 | <Toggle field={form.$('runInBackground')} /> |
165 | <Toggle field={form.$('enableSystemTray')} /> | 176 | <Toggle field={form.$('enableSystemTray')} /> |
177 | <Toggle field={form.$('privateNotifications')} /> | ||
166 | {process.platform === 'win32' && ( | 178 | {process.platform === 'win32' && ( |
167 | <Toggle field={form.$('minimizeToSystemTray')} /> | 179 | <Toggle field={form.$('minimizeToSystemTray')} /> |
168 | )} | 180 | )} |
181 | <Input | ||
182 | placeholder="Server" | ||
183 | onChange={e => this.submit(e)} | ||
184 | field={form.$('server')} | ||
185 | autoFocus | ||
186 | /> | ||
187 | {isLoggedIn && ( | ||
188 | <p>{ intl.formatMessage(messages.serverInfo) }</p> | ||
189 | )} | ||
169 | {isWorkspaceEnabled && ( | 190 | {isWorkspaceEnabled && ( |
170 | <Toggle field={form.$('keepAllWorkspacesLoaded')} /> | 191 | <Toggle field={form.$('keepAllWorkspacesLoaded')} /> |
171 | )} | 192 | )} |
172 | {isTodosEnabled && ( | 193 | {isTodosEnabled && ( |
173 | <Toggle field={form.$('enableTodos')} /> | 194 | <> |
195 | <Toggle field={form.$('enableTodos')} /> | ||
196 | <Input | ||
197 | placeholder="Todo Server" | ||
198 | onChange={e => this.submit(e)} | ||
199 | field={form.$('todoServer')} | ||
200 | autoFocus | ||
201 | /> | ||
202 | <p>{ intl.formatMessage(messages.todoServerInfo) }</p> | ||
203 | </> | ||
174 | )} | 204 | )} |
175 | 205 | ||
176 | {/* Appearance */} | 206 | {/* Appearance */} |
@@ -257,6 +287,18 @@ export default @observer class EditSettingsForm extends Component { | |||
257 | <span className="mdi mdi-information" /> | 287 | <span className="mdi mdi-information" /> |
258 | {intl.formatMessage(messages.languageDisclaimer)} | 288 | {intl.formatMessage(messages.languageDisclaimer)} |
259 | </p> | 289 | </p> |
290 | <p className="settings__message"> | ||
291 | <span className="mdi mdi-github-face" /> | ||
292 | <span> | ||
293 | Ferdi is based on | ||
294 | {' '} | ||
295 | <a href="https://github.com/meetfranz/franz" target="_blank">Franz</a> | ||
296 | , a project published | ||
297 | under the | ||
298 | {' '} | ||
299 | <a href="https://github.com/meetfranz/franz/blob/master/LICENSE" target="_blank">Apache-2.0 License</a> | ||
300 | </span> | ||
301 | </p> | ||
260 | </form> | 302 | </form> |
261 | </div> | 303 | </div> |
262 | </div> | 304 | </div> |