aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorLibravatar André Oliveira <37463445+SpecialAro@users.noreply.github.com>2022-07-19 16:18:48 +0100
committerLibravatar GitHub <noreply@github.com>2022-07-19 16:18:48 +0100
commit23f10a1a9f69549adb26d4196a7aa9d38d787c18 (patch)
tree213eceff03499bd90bd8e454dcc0aad3fc3b7cd7 /src
parentFeature: Add Release Notes (#491) (diff)
downloadferdium-app-23f10a1a9f69549adb26d4196a7aa9d38d787c18.tar.gz
ferdium-app-23f10a1a9f69549adb26d4196a7aa9d38d787c18.tar.zst
ferdium-app-23f10a1a9f69549adb26d4196a7aa9d38d787c18.zip
feat: add 'Services' tab to settings (#495)
Diffstat (limited to 'src')
-rw-r--r--src/components/settings/settings/EditSettingsForm.jsx76
-rw-r--r--src/i18n/locales/en-US.json1
2 files changed, 48 insertions, 29 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.jsx b/src/components/settings/settings/EditSettingsForm.jsx
index a10d89570..0e5be38ed 100644
--- a/src/components/settings/settings/EditSettingsForm.jsx
+++ b/src/components/settings/settings/EditSettingsForm.jsx
@@ -46,6 +46,10 @@ const messages = defineMessages({
46 id: 'settings.app.headlineGeneral', 46 id: 'settings.app.headlineGeneral',
47 defaultMessage: 'General', 47 defaultMessage: 'General',
48 }, 48 },
49 headlineServices: {
50 id: 'settings.app.headlineServices',
51 defaultMessage: 'Services',
52 },
49 hibernateInfo: { 53 hibernateInfo: {
50 id: 'settings.app.hibernateInfo', 54 id: 'settings.app.hibernateInfo',
51 defaultMessage: 55 defaultMessage:
@@ -416,6 +420,19 @@ class EditSettingsForm extends Component {
416 {intl.formatMessage(messages.headlineGeneral)} 420 {intl.formatMessage(messages.headlineGeneral)}
417 </H5> 421 </H5>
418 <H5 422 <H5
423 id="services"
424 className={
425 this.state.activeSetttingsTab === 'services'
426 ? 'badge badge--primary'
427 : 'badge'
428 }
429 onClick={() => {
430 this.setActiveSettingsTab('services');
431 }}
432 >
433 {intl.formatMessage(messages.headlineServices)}
434 </H5>
435 <H5
419 id="appearance" 436 id="appearance"
420 className={ 437 className={
421 this.state.activeSetttingsTab === 'appearance' 438 this.state.activeSetttingsTab === 'appearance'
@@ -594,8 +611,37 @@ class EditSettingsForm extends Component {
594 > 611 >
595 <span>{intl.formatMessage(messages.scheduledDNDInfo)}</span> 612 <span>{intl.formatMessage(messages.scheduledDNDInfo)}</span>
596 </p> 613 </p>
614 </div>
615 )}
597 616
598 <Hr /> 617 {/* Services */}
618 {this.state.activeSetttingsTab === 'services' && (
619 <div>
620 <H2 className="settings__section_header">
621 {intl.formatMessage(messages.sectionServiceIconsSettings)}
622 </H2>
623
624 <Toggle field={form.$('showDisabledServices')} />
625 <Toggle field={form.$('showServiceName')} />
626
627 {isUseGrayscaleServicesEnabled && <Hr />}
628
629 <Toggle field={form.$('useGrayscaleServices')} />
630
631 {isUseGrayscaleServicesEnabled && (
632 <>
633 <Slider
634 type="number"
635 onChange={e => this.submit(e)}
636 field={form.$('grayscaleServicesDim')}
637 />
638 <Hr />
639 </>
640 )}
641
642 <Toggle field={form.$('showMessageBadgeWhenMuted')} />
643 <Toggle field={form.$('enableLongPressServiceHint')} />
644 <Select field={form.$('iconSize')} />
599 645
600 <Select field={form.$('navigationBarBehaviour')} /> 646 <Select field={form.$('navigationBarBehaviour')} />
601 647
@@ -734,34 +780,6 @@ class EditSettingsForm extends Component {
734 <Toggle field={form.$('hideSettingsButton')} /> 780 <Toggle field={form.$('hideSettingsButton')} />
735 781
736 <Toggle field={form.$('alwaysShowWorkspaces')} /> 782 <Toggle field={form.$('alwaysShowWorkspaces')} />
737
738 <HrSections />
739
740 <H2 className="settings__section_header">
741 {intl.formatMessage(messages.sectionServiceIconsSettings)}
742 </H2>
743
744 <Toggle field={form.$('showDisabledServices')} />
745 <Toggle field={form.$('showServiceName')} />
746
747 {isUseGrayscaleServicesEnabled && <Hr />}
748
749 <Toggle field={form.$('useGrayscaleServices')} />
750
751 {isUseGrayscaleServicesEnabled && (
752 <>
753 <Slider
754 type="number"
755 onChange={e => this.submit(e)}
756 field={form.$('grayscaleServicesDim')}
757 />
758 <Hr />
759 </>
760 )}
761
762 <Toggle field={form.$('showMessageBadgeWhenMuted')} />
763 <Toggle field={form.$('enableLongPressServiceHint')} />
764 <Select field={form.$('iconSize')} />
765 </div> 783 </div>
766 )} 784 )}
767 785
diff --git a/src/i18n/locales/en-US.json b/src/i18n/locales/en-US.json
index d45ab5c3c..a98bc2f77 100644
--- a/src/i18n/locales/en-US.json
+++ b/src/i18n/locales/en-US.json
@@ -268,6 +268,7 @@
268 "settings.app.headlineGeneral": "General", 268 "settings.app.headlineGeneral": "General",
269 "settings.app.headlineLanguage": "Language", 269 "settings.app.headlineLanguage": "Language",
270 "settings.app.headlinePrivacy": "Privacy", 270 "settings.app.headlinePrivacy": "Privacy",
271 "settings.app.headlineServices": "Services",
271 "settings.app.headlineUpdates": "Updates", 272 "settings.app.headlineUpdates": "Updates",
272 "settings.app.hibernateInfo": "By default, Ferdium 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.", 273 "settings.app.hibernateInfo": "By default, Ferdium 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.",
273 "settings.app.inactivityLockInfo": "Minutes of inactivity, after which Ferdium should automatically lock. Use 0 to disable", 274 "settings.app.inactivityLockInfo": "Minutes of inactivity, after which Ferdium should automatically lock. Use 0 to disable",