1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
|
import { systemPreferences } from '@electron/remote';
import { Component } from 'react';
import PropTypes from 'prop-types';
import { observer } from 'mobx-react';
import prettyBytes from 'pretty-bytes';
import { defineMessages, injectIntl } from 'react-intl';
import Form from '../../../lib/Form';
import Button from '../../ui/Button';
import Toggle from '../../ui/Toggle';
import ToggleRaw from '../../ui/ToggleRaw';
import Select from '../../ui/Select';
import Input from '../../ui/Input';
import { DEFAULT_APP_SETTINGS, FRANZ_TRANSLATION, GITHUB_FRANZ_URL } from '../../../config';
import {
isMac,
isWindows,
lockFerdiShortcutKey,
} from '../../../environment';
import { ferdiVersion, userDataPath, userDataRecipesPath } from '../../../environment-remote';
import { openPath } from '../../../helpers/url-helpers';
import globalMessages from '../../../i18n/globalMessages';
const debug = require('debug')('Ferdi:EditSettingsForm');
const messages = defineMessages({
headlineGeneral: {
id: 'settings.app.headlineGeneral',
defaultMessage: 'General',
},
sentryInfo: {
id: 'settings.app.sentryInfo',
defaultMessage:
'Sending telemetry data allows us to find errors in Ferdi - we will not send any personal information like your message data!',
},
hibernateInfo: {
id: 'settings.app.hibernateInfo',
defaultMessage:
'By default, Ferdi will keep all your services open and loaded in the background so they are ready when you want to use them. Service Hibernation will unload your services after a specified amount. This is useful to save RAM or keeping services from slowing down your computer.',
},
inactivityLockInfo: {
id: 'settings.app.inactivityLockInfo',
defaultMessage:
'Minutes of inactivity, after which Ferdi should automatically lock. Use 0 to disable',
},
todoServerInfo: {
id: 'settings.app.todoServerInfo',
defaultMessage: 'This server will be used for the "Ferdi Todo" feature.',
},
lockedPassword: {
id: 'settings.app.lockedPassword',
defaultMessage: 'Password',
},
lockedPasswordInfo: {
id: 'settings.app.lockedPasswordInfo',
defaultMessage:
"Please make sure to set a password you'll remember.\nIf you loose this password, you will have to reinstall Ferdi.",
},
lockInfo: {
id: 'settings.app.lockInfo',
defaultMessage:
'Password Lock allows you to keep your messages protected.\nUsing Password Lock, you will be prompted to enter your password everytime you start Ferdi or lock Ferdi yourself using the lock symbol in the bottom left corner or the shortcut {lockShortcut}.',
},
scheduledDNDTimeInfo: {
id: 'settings.app.scheduledDNDTimeInfo',
defaultMessage:
'Times in 24-Hour-Format. End time can be before start time (e.g. start 17:00, end 09:00) to enable Do-not-Disturb overnight.',
},
scheduledDNDInfo: {
id: 'settings.app.scheduledDNDInfo',
defaultMessage:
'Scheduled Do-not-Disturb allows you to define a period of time in which you do not want to get Notifications from Ferdi.',
},
headlineLanguage: {
id: 'settings.app.headlineLanguage',
defaultMessage: 'Language',
},
headlineUpdates: {
id: 'settings.app.headlineUpdates',
defaultMessage: 'Updates',
},
headlineAppearance: {
id: 'settings.app.headlineAppearance',
defaultMessage: 'Appearance',
},
universalDarkModeInfo: {
id: 'settings.app.universalDarkModeInfo',
defaultMessage:
'Universal Dark Mode tries to dynamically generate dark mode styles for services that are otherwise not currently supported.',
},
accentColorInfo: {
id: 'settings.app.accentColorInfo',
defaultMessage:
'Write your accent color in a CSS-compatible format. (Default: {defaultAccentColor})',
},
headlinePrivacy: {
id: 'settings.app.headlinePrivacy',
defaultMessage: 'Privacy',
},
headlineAdvanced: {
id: 'settings.app.headlineAdvanced',
defaultMessage: 'Advanced',
},
translationHelp: {
id: 'settings.app.translationHelp',
defaultMessage: 'Help us to translate Ferdi into your language.',
},
spellCheckerLanguageInfo: {
id: 'settings.app.spellCheckerLanguageInfo',
defaultMessage:
"Ferdi uses your Mac's build-in spellchecker to check for typos. If you want to change the languages the spellchecker checks for, you can do so in your Mac's System Preferences.",
},
subheadlineCache: {
id: 'settings.app.subheadlineCache',
defaultMessage: 'Cache',
},
cacheInfo: {
id: 'settings.app.cacheInfo',
defaultMessage: 'Ferdi cache is currently using {size} of disk space.',
},
cacheNotCleared: {
id: 'settings.app.cacheNotCleared',
defaultMessage: "Couldn't clear all cache",
},
buttonClearAllCache: {
id: 'settings.app.buttonClearAllCache',
defaultMessage: 'Clear cache',
},
subheadlineFerdiProfile: {
id: 'settings.app.subheadlineFerdiProfile',
defaultMessage: 'Ferdi Profile',
},
buttonOpenFerdiProfileFolder: {
id: 'settings.app.buttonOpenFerdiProfileFolder',
defaultMessage: 'Open Profile folder',
},
buttonOpenFerdiServiceRecipesFolder: {
id: 'settings.app.buttonOpenFerdiServiceRecipesFolder',
defaultMessage: 'Open Service Recipes folder',
},
buttonSearchForUpdate: {
id: 'settings.app.buttonSearchForUpdate',
defaultMessage: 'Check for updates',
},
buttonInstallUpdate: {
id: 'settings.app.buttonInstallUpdate',
defaultMessage: 'Restart & install update',
},
updateStatusSearching: {
id: 'settings.app.updateStatusSearching',
defaultMessage: 'Is searching for update',
},
updateStatusAvailable: {
id: 'settings.app.updateStatusAvailable',
defaultMessage: 'Update available, downloading...',
},
updateStatusUpToDate: {
id: 'settings.app.updateStatusUpToDate',
defaultMessage: 'You are using the latest version of Ferdi',
},
currentVersion: {
id: 'settings.app.currentVersion',
defaultMessage: 'Current version:',
},
appRestartRequired: {
id: 'settings.app.restartRequired',
defaultMessage: 'Changes require restart',
},
languageDisclaimer: {
id: 'settings.app.languageDisclaimer',
defaultMessage:
'Official translations are English & German. All other languages are community based translations.',
},
});
const Hr = () => <hr style={{ marginBottom: 20 }} />;
@observer
class EditSettingsForm extends Component {
static propTypes = {
checkForUpdates: PropTypes.func.isRequired,
installUpdate: PropTypes.func.isRequired,
form: PropTypes.instanceOf(Form).isRequired,
onSubmit: PropTypes.func.isRequired,
isCheckingForUpdates: PropTypes.bool.isRequired,
isUpdateAvailable: PropTypes.bool.isRequired,
noUpdateAvailable: PropTypes.bool.isRequired,
updateIsReadyToInstall: PropTypes.bool.isRequired,
isClearingAllCache: PropTypes.bool.isRequired,
onClearAllCache: PropTypes.func.isRequired,
getCacheSize: PropTypes.func.isRequired,
isTodosEnabled: PropTypes.bool.isRequired,
isTodosActivated: PropTypes.bool.isRequired,
isWorkspaceEnabled: PropTypes.bool.isRequired,
automaticUpdates: PropTypes.bool.isRequired,
isDarkmodeEnabled: PropTypes.bool.isRequired,
isAdaptableDarkModeEnabled: PropTypes.bool.isRequired,
isNightlyEnabled: PropTypes.bool.isRequired,
hasAddedTodosAsService: PropTypes.bool.isRequired,
isOnline: PropTypes.bool.isRequired,
};
state = {
activeSetttingsTab: 'general',
clearCacheButtonClicked: false,
};
setActiveSettingsTab(tab) {
this.setState({
activeSetttingsTab: tab,
});
}
onClearCacheClicked = () => {
this.setState({ clearCacheButtonClicked: true });
};
submit(e) {
e.preventDefault();
this.props.form.submit({
onSuccess: form => {
const values = form.values();
this.props.onSubmit(values);
},
onError: () => {},
});
}
render() {
const {
checkForUpdates,
installUpdate,
form,
isCheckingForUpdates,
isAdaptableDarkModeEnabled,
isUpdateAvailable,
noUpdateAvailable,
updateIsReadyToInstall,
isClearingAllCache,
onClearAllCache,
getCacheSize,
isTodosEnabled,
isWorkspaceEnabled,
automaticUpdates,
isDarkmodeEnabled,
isTodosActivated,
isNightlyEnabled,
hasAddedTodosAsService,
isOnline,
} = this.props;
const { intl } = this.props;
let updateButtonLabelMessage = messages.buttonSearchForUpdate;
if (isCheckingForUpdates) {
updateButtonLabelMessage = messages.updateStatusSearching;
} else if (isUpdateAvailable) {
updateButtonLabelMessage = messages.updateStatusAvailable;
} else {
updateButtonLabelMessage = messages.buttonSearchForUpdate;
}
const { lockingFeatureEnabled, scheduledDNDEnabled } =
window.ferdi.stores.settings.all.app;
let cacheSize;
let notCleared;
if (this.state.activeSetttingsTab === 'advanced') {
const cacheSizeBytes = getCacheSize();
debug('cacheSizeBytes:', cacheSizeBytes);
if (typeof cacheSizeBytes === 'number') {
cacheSize = prettyBytes(cacheSizeBytes);
debug('cacheSize:', cacheSize);
notCleared =
this.state.clearCacheButtonClicked &&
isClearingAllCache === false &&
cacheSizeBytes !== 0;
} else {
cacheSize = '…';
notCleared = false;
}
}
const profileFolder = userDataPath();
const recipeFolder = userDataRecipesPath();
return (
<div className="settings__main">
<div className="settings__header">
<h1>{intl.formatMessage(globalMessages.settings)}</h1>
</div>
<div className="settings__body">
<form
onSubmit={e => this.submit(e)}
onChange={e => this.submit(e)}
id="form"
>
{/* Titles */}
<div className="recipes__navigation">
<h2
id="general"
className={
this.state.activeSetttingsTab === 'general'
? 'badge badge--primary'
: 'badge'
}
onClick={() => {
this.setActiveSettingsTab('general');
}}
>
{intl.formatMessage(messages.headlineGeneral)}
</h2>
<h2
id="appearance"
className={
this.state.activeSetttingsTab === 'appearance'
? 'badge badge--primary'
: 'badge'
}
onClick={() => {
this.setActiveSettingsTab('appearance');
}}
>
{intl.formatMessage(messages.headlineAppearance)}
</h2>
<h2
id="privacy"
className={
this.state.activeSetttingsTab === 'privacy'
? 'badge badge--primary'
: 'badge'
}
onClick={() => {
this.setActiveSettingsTab('privacy');
}}
>
{intl.formatMessage(messages.headlinePrivacy)}
</h2>
<h2
id="language"
className={
this.state.activeSetttingsTab === 'language'
? 'badge badge--primary'
: 'badge'
}
onClick={() => {
this.setActiveSettingsTab('language');
}}
>
{intl.formatMessage(messages.headlineLanguage)}
</h2>
<h2
id="advanced"
className={
this.state.activeSetttingsTab === 'advanced'
? 'badge badge--primary'
: 'badge'
}
onClick={() => {
this.setActiveSettingsTab('advanced');
}}
>
{intl.formatMessage(messages.headlineAdvanced)}
</h2>
<h2
id="updates"
className={
this.state.activeSetttingsTab === 'updates'
? 'badge badge--primary'
: 'badge'
}
onClick={() => {
this.setActiveSettingsTab('updates');
}}
>
{intl.formatMessage(messages.headlineUpdates)}
</h2>
</div>
{/* General */}
{this.state.activeSetttingsTab === 'general' && (
<div>
<Toggle field={form.$('autoLaunchOnStart')} />
<Toggle field={form.$('runInBackground')} />
<Toggle field={form.$('confirmOnQuit')} />
<Toggle field={form.$('enableSystemTray')} />
<Toggle field={form.$('reloadAfterResume')} />
<Toggle field={form.$('startMinimized')} />
{isWindows && <Toggle field={form.$('minimizeToSystemTray')} />}
{isWindows && <Toggle field={form.$('closeToSystemTray')} />}
<Select field={form.$('navigationBarBehaviour')} />
<Hr />
<Select field={form.$('hibernationStrategy')} />
<Toggle field={form.$('hibernateOnStartup')} />
<p
className="settings__message"
style={{
borderTop: 0,
marginTop: 0,
paddingTop: 0,
marginBottom: '2rem',
}}
>
<span>{intl.formatMessage(messages.hibernateInfo)}</span>
</p>
<Select field={form.$('wakeUpStrategy')} />
<Hr />
{isWorkspaceEnabled && (
<>
<Toggle field={form.$('keepAllWorkspacesLoaded')} />
<Hr />
</>
)}
{isTodosEnabled && !hasAddedTodosAsService && (
<>
<Toggle field={form.$('enableTodos')} />
{isTodosActivated && (
<div>
<Select field={form.$('predefinedTodoServer')} />
{form.$('predefinedTodoServer').value ===
'isUsingCustomTodoService' && (
<div>
<Input
placeholder="Todo Server"
onChange={e => this.submit(e)}
field={form.$('customTodoServer')}
/>
<p
className="settings__message"
style={{
borderTop: 0,
marginTop: 0,
paddingTop: 0,
marginBottom: '2rem',
}}
>
{intl.formatMessage(messages.todoServerInfo)}
</p>
</div>
)}
</div>
)}
<Hr />
</>
)}
<Toggle field={form.$('scheduledDNDEnabled')} />
{scheduledDNDEnabled && (
<>
<div
style={{
display: 'flex',
justifyContent: 'center',
}}
>
<div
style={{
padding: '0 1rem',
width: '100%',
}}
>
<Input
placeholder="17:00"
onChange={e => this.submit(e)}
field={form.$('scheduledDNDStart')}
type="time"
/>
</div>
<div
style={{
padding: '0 1rem',
width: '100%',
}}
>
<Input
placeholder="09:00"
onChange={e => this.submit(e)}
field={form.$('scheduledDNDEnd')}
type="time"
/>
</div>
</div>
<p>{intl.formatMessage(messages.scheduledDNDTimeInfo)}</p>
</>
)}
<p
className="settings__message"
style={{
borderTop: 0,
marginTop: 0,
paddingTop: 0,
marginBottom: '2rem',
}}
>
<span>{intl.formatMessage(messages.scheduledDNDInfo)}</span>
</p>
</div>
)}
{/* Appearance */}
{this.state.activeSetttingsTab === 'appearance' && (
<div>
<Toggle field={form.$('showDisabledServices')} />
<Toggle field={form.$('showMessageBadgeWhenMuted')} />
{isMac && <Toggle field={form.$('showDragArea')} />}
<Hr />
<Toggle field={form.$('adaptableDarkMode')} />
{!isAdaptableDarkModeEnabled && (
<Toggle field={form.$('darkMode')} />
)}
{(isDarkmodeEnabled || isAdaptableDarkModeEnabled) && (
<>
<Toggle field={form.$('universalDarkMode')} />
<p
className="settings__message"
style={{
borderTop: 0,
marginTop: 0,
paddingTop: 0,
marginBottom: '2rem',
}}
>
<span>
{intl.formatMessage(messages.universalDarkModeInfo)}
</span>
</p>
</>
)}
<Hr />
<Toggle field={form.$('splitMode')} />
<Hr />
<Select field={form.$('serviceRibbonWidth')} />
<Toggle field={form.$('useVerticalStyle')} />
<Toggle field={form.$('alwaysShowWorkspaces')} />
<Hr />
<Select field={form.$('iconSize')} />
<Toggle field={form.$('enableLongPressServiceHint')} />
<Hr />
<Input
placeholder="Accent Color"
onChange={e => this.submit(e)}
field={form.$('accentColor')}
/>
<p>
{intl.formatMessage(messages.accentColorInfo, {
defaultAccentColor: DEFAULT_APP_SETTINGS.accentColor,
})}
</p>
</div>
)}
{/* Privacy */}
{this.state.activeSetttingsTab === 'privacy' && (
<div>
<Toggle field={form.$('privateNotifications')} />
<Toggle field={form.$('clipboardNotifications')} />
{(isWindows || isMac) && (
<Toggle field={form.$('notifyTaskBarOnMessage')} />
)}
<Hr />
<Select field={form.$('searchEngine')} />
<Hr />
<Toggle field={form.$('sentry')} />
<p className="settings__help">
{intl.formatMessage(messages.sentryInfo)}
</p>
<p className="settings__help">
{intl.formatMessage(messages.appRestartRequired)}
</p>
<Hr />
<Toggle field={form.$('lockingFeatureEnabled')} />
{lockingFeatureEnabled && (
<>
{isMac && systemPreferences.canPromptTouchID() && (
<Toggle field={form.$('useTouchIdToUnlock')} />
)}
<Input
placeholder={intl.formatMessage(messages.lockedPassword)}
onChange={e => this.submit(e)}
field={form.$('lockedPassword')}
type="password"
scorePassword
showPasswordToggle
/>
<p>{intl.formatMessage(messages.lockedPasswordInfo)}</p>
<Input
placeholder="Lock after inactivity"
onChange={e => this.submit(e)}
field={form.$('inactivityLock')}
autoFocus
/>
<p>{intl.formatMessage(messages.inactivityLockInfo)}</p>
</>
)}
<p
className="settings__message"
style={{
borderTop: 0,
marginTop: 0,
paddingTop: 0,
marginBottom: '2rem',
}}
>
<span>
{intl.formatMessage(messages.lockInfo, {
lockShortcut: `${lockFerdiShortcutKey(false)}`,
})}
</span>
</p>
</div>
)}
{/* Language */}
{this.state.activeSetttingsTab === 'language' && (
<div>
<Select field={form.$('locale')} showLabel={false} />
<Hr />
<Toggle field={form.$('enableSpellchecking')} />
{!isMac && form.$('enableSpellchecking').value && (
<Select field={form.$('spellcheckerLanguage')} />
)}
{isMac && form.$('enableSpellchecking').value && (
<p className="settings__help">
{intl.formatMessage(messages.spellCheckerLanguageInfo)}
</p>
)}
<p className="settings__help">
{intl.formatMessage(messages.appRestartRequired)}
</p>
<Hr />
<a
href={FRANZ_TRANSLATION}
target="_blank"
className="link"
rel="noreferrer"
>
{intl.formatMessage(messages.translationHelp)}{' '}
<i className="mdi mdi-open-in-new" />
</a>
</div>
)}
{/* Advanced */}
{this.state.activeSetttingsTab === 'advanced' && (
<div>
<Toggle field={form.$('enableGPUAcceleration')} />
<Toggle field={form.$('enableGlobalHideShortcut')} />
<p className="settings__help indented__help">
{intl.formatMessage(messages.appRestartRequired)}
</p>
<Hr />
<Input
placeholder="User Agent"
onChange={e => this.submit(e)}
field={form.$('userAgentPref')}
/>
<p className="settings__help">
{intl.formatMessage(globalMessages.userAgentHelp)}
</p>
<p className="settings__help">
{intl.formatMessage(messages.appRestartRequired)}
</p>
<Hr />
<div className="settings__settings-group">
<h3>{intl.formatMessage(messages.subheadlineCache)}</h3>
<p>
{intl.formatMessage(messages.cacheInfo, {
size: cacheSize,
})}
</p>
{notCleared && (
<p>{intl.formatMessage(messages.cacheNotCleared)}</p>
)}
<p>
<Button
buttonType="secondary"
label={intl.formatMessage(messages.buttonClearAllCache)}
onClick={() => {
onClearAllCache();
this.onClearCacheClicked();
}}
disabled={isClearingAllCache}
loaded={!isClearingAllCache}
/>
</p>
</div>
<Hr />
<div className="settings__settings-group">
<h3>
{intl.formatMessage(messages.subheadlineFerdiProfile)}
</h3>
<p>
<div className="settings__open-settings-file-container">
<Button
buttonType="secondary"
label={intl.formatMessage(
messages.buttonOpenFerdiProfileFolder,
)}
className="settings__open-settings-file-button"
onClick={() => openPath(profileFolder)}
/>
<Button
buttonType="secondary"
label={intl.formatMessage(
messages.buttonOpenFerdiServiceRecipesFolder,
)}
className="settings__open-settings-file-button"
onClick={() => openPath(recipeFolder)}
/>
</div>
</p>
</div>
</div>
)}
{/* Updates */}
{this.state.activeSetttingsTab === 'updates' && (
<div>
<Toggle field={form.$('automaticUpdates')} />
{automaticUpdates && (
<div>
<Toggle field={form.$('beta')} />
<ToggleRaw
field={{
value: isNightlyEnabled,
id: 'nightly',
label: 'Include nightly versions',
name: 'Nightly builds',
}}
onChange={
window.ferdi.features.nightlyBuilds.toggleFeature
}
/>
{updateIsReadyToInstall ? (
<Button
label={intl.formatMessage(messages.buttonInstallUpdate)}
onClick={installUpdate}
/>
) : (
<Button
buttonType="secondary"
label={intl.formatMessage(updateButtonLabelMessage)}
onClick={checkForUpdates}
disabled={
!automaticUpdates ||
isCheckingForUpdates ||
isUpdateAvailable ||
!isOnline
}
loaded={!isCheckingForUpdates || !isUpdateAvailable}
/>
)}
<br />
</div>
)}
{intl.formatMessage(messages.currentVersion)} {ferdiVersion}
{noUpdateAvailable && (
<>
<br />
<br />
{intl.formatMessage(messages.updateStatusUpToDate)}
</>
)}
<p className="settings__message">
<span className="mdi mdi-github-face" />
<span>
Ferdi is based on{' '}
<a
href={`${GITHUB_FRANZ_URL}/franz`}
target="_blank"
rel="noreferrer"
>
Franz
</a>
, a project published under the{' '}
<a
href={`${GITHUB_FRANZ_URL}/franz/blob/master/LICENSE`}
target="_blank"
rel="noreferrer"
>
Apache-2.0 License
</a>
</span>
<br />
<span className="mdi mdi-information" />
{intl.formatMessage(messages.languageDisclaimer)}
</p>
</div>
)}
</form>
</div>
</div>
);
}
}
export default injectIntl(EditSettingsForm);
|