diff options
Diffstat (limited to 'src/components/settings/settings/EditSettingsForm.js')
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 30 |
1 files changed, 28 insertions, 2 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index ff30daed2..19333fdff 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,10 @@ 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 | }, | ||
24 | headlineLanguage: { | 29 | headlineLanguage: { |
25 | id: 'settings.app.headlineLanguage', | 30 | id: 'settings.app.headlineLanguage', |
26 | defaultMessage: '!!!Language', | 31 | defaultMessage: '!!!Language', |
@@ -39,7 +44,7 @@ const messages = defineMessages({ | |||
39 | }, | 44 | }, |
40 | translationHelp: { | 45 | translationHelp: { |
41 | id: 'settings.app.translationHelp', | 46 | id: 'settings.app.translationHelp', |
42 | defaultMessage: '!!!Help us to translate Franz into your language.', | 47 | defaultMessage: '!!!Help us to translate Ferdi into your language.', |
43 | }, | 48 | }, |
44 | subheadlineCache: { | 49 | subheadlineCache: { |
45 | id: 'settings.app.subheadlineCache', | 50 | id: 'settings.app.subheadlineCache', |
@@ -47,7 +52,7 @@ const messages = defineMessages({ | |||
47 | }, | 52 | }, |
48 | cacheInfo: { | 53 | cacheInfo: { |
49 | id: 'settings.app.cacheInfo', | 54 | id: 'settings.app.cacheInfo', |
50 | defaultMessage: '!!!Franz cache is currently using {size} of disk space.', | 55 | defaultMessage: '!!!Ferdi cache is currently using {size} of disk space.', |
51 | }, | 56 | }, |
52 | buttonClearAllCache: { | 57 | buttonClearAllCache: { |
53 | id: 'settings.app.buttonClearAllCache', | 58 | id: 'settings.app.buttonClearAllCache', |
@@ -145,6 +150,8 @@ export default @observer class EditSettingsForm extends Component { | |||
145 | updateButtonLabelMessage = messages.buttonSearchForUpdate; | 150 | updateButtonLabelMessage = messages.buttonSearchForUpdate; |
146 | } | 151 | } |
147 | 152 | ||
153 | const isLoggedIn = Boolean(localStorage.getItem('authToken')); | ||
154 | |||
148 | return ( | 155 | return ( |
149 | <div className="settings__main"> | 156 | <div className="settings__main"> |
150 | <div className="settings__header"> | 157 | <div className="settings__header"> |
@@ -164,6 +171,15 @@ export default @observer class EditSettingsForm extends Component { | |||
164 | {process.platform === 'win32' && ( | 171 | {process.platform === 'win32' && ( |
165 | <Toggle field={form.$('minimizeToSystemTray')} /> | 172 | <Toggle field={form.$('minimizeToSystemTray')} /> |
166 | )} | 173 | )} |
174 | <Input | ||
175 | placeholder="Server" | ||
176 | onChange={e => this.submit(e)} | ||
177 | field={form.$('server')} | ||
178 | autoFocus | ||
179 | /> | ||
180 | { isLoggedIn && ( | ||
181 | <p>{ intl.formatMessage(messages.serverInfo) }</p> | ||
182 | )} | ||
167 | {isTodosEnabled && ( | 183 | {isTodosEnabled && ( |
168 | <Toggle field={form.$('enableTodos')} /> | 184 | <Toggle field={form.$('enableTodos')} /> |
169 | )} | 185 | )} |
@@ -252,6 +268,16 @@ export default @observer class EditSettingsForm extends Component { | |||
252 | <span className="mdi mdi-information" /> | 268 | <span className="mdi mdi-information" /> |
253 | {intl.formatMessage(messages.languageDisclaimer)} | 269 | {intl.formatMessage(messages.languageDisclaimer)} |
254 | </p> | 270 | </p> |
271 | <p className="settings__message"> | ||
272 | <span className="mdi mdi-github-face" /> | ||
273 | Ferdi is based on | ||
274 | {' '} | ||
275 | <a href="https://github.com/meetfranz/franz" target="_blank">Franz</a> | ||
276 | , a project published | ||
277 | under the | ||
278 | {' '} | ||
279 | <a href="https://github.com/meetfranz/franz/blob/master/LICENSE" target="_blank">Apache-2.0 License</a> | ||
280 | </p> | ||
255 | </form> | 281 | </form> |
256 | </div> | 282 | </div> |
257 | </div> | 283 | </div> |