diff options
Diffstat (limited to 'src/components/settings/settings/EditSettingsForm.js')
-rw-r--r-- | src/components/settings/settings/EditSettingsForm.js | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index b01368f69..2be5c4ed7 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js | |||
@@ -79,6 +79,14 @@ 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 | }, | ||
86 | accentColorInfo: { | ||
87 | id: 'settings.app.accentColorInfo', | ||
88 | defaultMessage: '!!!Write your accent color in a CSS-compatible format. (Default: #7367f0)', | ||
89 | }, | ||
82 | headlineAdvanced: { | 90 | headlineAdvanced: { |
83 | id: 'settings.app.headlineAdvanced', | 91 | id: 'settings.app.headlineAdvanced', |
84 | defaultMessage: '!!!Advanced', | 92 | defaultMessage: '!!!Advanced', |
@@ -152,6 +160,7 @@ export default @observer class EditSettingsForm extends Component { | |||
152 | server: PropTypes.string.isRequired, | 160 | server: PropTypes.string.isRequired, |
153 | noUpdates: PropTypes.bool.isRequired, | 161 | noUpdates: PropTypes.bool.isRequired, |
154 | hibernationEnabled: PropTypes.bool.isRequired, | 162 | hibernationEnabled: PropTypes.bool.isRequired, |
163 | isDarkmodeEnabled: PropTypes.bool.isRequired, | ||
155 | openProcessManager: PropTypes.func.isRequired, | 164 | openProcessManager: PropTypes.func.isRequired, |
156 | }; | 165 | }; |
157 | 166 | ||
@@ -188,6 +197,7 @@ export default @observer class EditSettingsForm extends Component { | |||
188 | server, | 197 | server, |
189 | noUpdates, | 198 | noUpdates, |
190 | hibernationEnabled, | 199 | hibernationEnabled, |
200 | isDarkmodeEnabled, | ||
191 | openProcessManager, | 201 | openProcessManager, |
192 | } = this.props; | 202 | } = this.props; |
193 | const { intl } = this.context; | 203 | const { intl } = this.context; |
@@ -373,6 +383,28 @@ export default @observer class EditSettingsForm extends Component { | |||
373 | <Toggle field={form.$('showDisabledServices')} /> | 383 | <Toggle field={form.$('showDisabledServices')} /> |
374 | <Toggle field={form.$('showMessageBadgeWhenMuted')} /> | 384 | <Toggle field={form.$('showMessageBadgeWhenMuted')} /> |
375 | <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 | |||
402 | <Input | ||
403 | placeholder="Accent Color" | ||
404 | onChange={e => this.submit(e)} | ||
405 | field={form.$('accentColor')} | ||
406 | /> | ||
407 | <p>{intl.formatMessage(messages.accentColorInfo)}</p> | ||
376 | 408 | ||
377 | {/* Language */} | 409 | {/* Language */} |
378 | <h2 id="language">{intl.formatMessage(messages.headlineLanguage)}</h2> | 410 | <h2 id="language">{intl.formatMessage(messages.headlineLanguage)}</h2> |