diff options
author | 2019-10-17 21:48:38 +0200 | |
---|---|---|
committer | 2019-10-17 21:48:38 +0200 | |
commit | c44cb8dc2203262b4ad52210adf40e0d022671eb (patch) | |
tree | 8a3a15a161a048f06203b9ee66763df63ab3c3ba /src/components | |
parent | Merge pull request #124 from getferdi/l10n_develop (diff) | |
download | ferdium-app-c44cb8dc2203262b4ad52210adf40e0d022671eb.tar.gz ferdium-app-c44cb8dc2203262b4ad52210adf40e0d022671eb.tar.zst ferdium-app-c44cb8dc2203262b4ad52210adf40e0d022671eb.zip |
Add toggle to disable universal dark mode
Diffstat (limited to 'src/components')
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index a826479ad..2be5c4ed7 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -79,6 +79,10 @@ const messages = defineMessages({ | |||
79 | id: 'settings.app.headlineAppearance', | 79 | id: 'settings.app.headlineAppearance', |
80 | defaultMessage: '!!!Appearance', | 80 | defaultMessage: '!!!Appearance', |
81 | }, | 81 | }, |
82 | universalDarkModeInfo: { | ||
83 | id: 'settings.app.universalDarkModeInfo', | ||
84 | defaultMessage: '!!!Universal Dark Mode tries to dynamically generate dark mode styles for services that are otherwise not currently supported.', | ||
85 | }, | ||
82 | accentColorInfo: { | 86 | accentColorInfo: { |
83 | id: 'settings.app.accentColorInfo', | 87 | id: 'settings.app.accentColorInfo', |
84 | defaultMessage: '!!!Write your accent color in a CSS-compatible format. (Default: #7367f0)', | 88 | defaultMessage: '!!!Write your accent color in a CSS-compatible format. (Default: #7367f0)', |
@@ -156,6 +160,7 @@ export default @observer class EditSettingsForm extends Component { | |||
156 | server: PropTypes.string.isRequired, | 160 | server: PropTypes.string.isRequired, |
157 | noUpdates: PropTypes.bool.isRequired, | 161 | noUpdates: PropTypes.bool.isRequired, |
158 | hibernationEnabled: PropTypes.bool.isRequired, | 162 | hibernationEnabled: PropTypes.bool.isRequired, |
163 | isDarkmodeEnabled: PropTypes.bool.isRequired, | ||
159 | openProcessManager: PropTypes.func.isRequired, | 164 | openProcessManager: PropTypes.func.isRequired, |
160 | }; | 165 | }; |
161 | 166 | ||
@@ -192,6 +197,7 @@ export default @observer class EditSettingsForm extends Component { | |||
192 | server, | 197 | server, |
193 | noUpdates, | 198 | noUpdates, |
194 | hibernationEnabled, | 199 | hibernationEnabled, |
200 | isDarkmodeEnabled, | ||
195 | openProcessManager, | 201 | openProcessManager, |
196 | } = this.props; | 202 | } = this.props; |
197 | const { intl } = this.context; | 203 | const { intl } = this.context; |
@@ -377,6 +383,22 @@ export default @observer class EditSettingsForm extends Component { | |||
377 | <Toggle field={form.$('showDisabledServices')} /> | 383 | <Toggle field={form.$('showDisabledServices')} /> |
378 | <Toggle field={form.$('showMessageBadgeWhenMuted')} /> | 384 | <Toggle field={form.$('showMessageBadgeWhenMuted')} /> |
379 | <Toggle field={form.$('darkMode')} /> | 385 | <Toggle field={form.$('darkMode')} /> |
386 | {isDarkmodeEnabled && ( | ||
387 | <> | ||
388 | <Toggle field={form.$('universalDarkMode')} /> | ||
389 | <p | ||
390 | className="settings__message" | ||
391 | style={{ | ||
392 | borderTop: 0, marginTop: 0, paddingTop: 0, marginBottom: '2rem', | ||
393 | }} | ||
394 | > | ||
395 | <span> | ||
396 | { intl.formatMessage(messages.universalDarkModeInfo) } | ||
397 | </span> | ||
398 | </p> | ||
399 | </> | ||
400 | )} | ||
401 | |||
380 | <Input | 402 | <Input |
381 | placeholder="Accent Color" | 403 | placeholder="Accent Color" |
382 | onChange={e => this.submit(e)} | 404 | onChange={e => this.submit(e)} |