From b0e698520f0be4e054b8f3d1feff694d1ddf1779 Mon Sep 17 00:00:00 2001 From: Steliyan Stoyanov Date: Tue, 29 Oct 2019 20:34:19 +0200 Subject: Add "adaptable dark mode" checkbox --- .../settings/settings/EditSettingsForm.js | 3 + src/containers/settings/EditSettingsScreen.js | 10 ++ src/i18n/locales/defaultMessages.json | 169 +++++++++++---------- src/i18n/locales/en-US.json | 1 + .../settings/settings/EditSettingsForm.json | 116 +++++++------- .../containers/settings/EditSettingsScreen.json | 53 ++++--- src/stores/ServicesStore.js | 5 + 7 files changed, 201 insertions(+), 156 deletions(-) (limited to 'src') diff --git a/src/components/settings/settings/EditSettingsForm.js b/src/components/settings/settings/EditSettingsForm.js index 2be5c4ed7..d567a47d1 100644 --- a/src/components/settings/settings/EditSettingsForm.js +++ b/src/components/settings/settings/EditSettingsForm.js @@ -12,6 +12,7 @@ import PremiumFeatureContainer from '../../ui/PremiumFeatureContainer'; import Input from '../../ui/Input'; import { FRANZ_TRANSLATION } from '../../../config'; +import { isMac } from '../../../environment'; function escapeHtml(unsafe) { return unsafe @@ -383,8 +384,10 @@ export default @observer class EditSettingsForm extends Component { + {isMac && } {isDarkmodeEnabled && ( <> +

this._shareSettingsWithServiceProcess(), ); + reaction( + () => this.stores.settings.app.adaptableDarkMode, + () => this._shareSettingsWithServiceProcess(), + ); + reaction( () => this.stores.settings.app.universalDarkMode, () => this._shareSettingsWithServiceProcess(), -- cgit v1.2.3-70-g09d2