diff options
author | 2018-11-22 11:36:11 +0100 | |
---|---|---|
committer | 2018-11-22 11:36:11 +0100 | |
commit | fd7954fef99d59ca0aa9f2b468afea3463ef2202 (patch) | |
tree | dd83cc2efd0e8ec54679b4db80ed1b5dd086feb6 /src/containers | |
parent | Fix isFullScreen typo (diff) | |
download | ferdium-app-fd7954fef99d59ca0aa9f2b468afea3463ef2202.tar.gz ferdium-app-fd7954fef99d59ca0aa9f2b468afea3463ef2202.tar.zst ferdium-app-fd7954fef99d59ca0aa9f2b468afea3463ef2202.zip |
feat(App): Add option to enable dark mode for supported services
Diffstat (limited to 'src/containers')
-rw-r--r-- | src/containers/settings/EditServiceScreen.js | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/src/containers/settings/EditServiceScreen.js b/src/containers/settings/EditServiceScreen.js index 1fc6bc85e..e69c2c2a8 100644 --- a/src/containers/settings/EditServiceScreen.js +++ b/src/containers/settings/EditServiceScreen.js | |||
@@ -6,6 +6,7 @@ import { defineMessages, intlShape } from 'react-intl'; | |||
6 | import UserStore from '../../stores/UserStore'; | 6 | import UserStore from '../../stores/UserStore'; |
7 | import RecipesStore from '../../stores/RecipesStore'; | 7 | import RecipesStore from '../../stores/RecipesStore'; |
8 | import ServicesStore from '../../stores/ServicesStore'; | 8 | import ServicesStore from '../../stores/ServicesStore'; |
9 | import SettingsStore from '../../stores/SettingsStore'; | ||
9 | import Form from '../../lib/Form'; | 10 | import Form from '../../lib/Form'; |
10 | import { gaPage } from '../../lib/analytics'; | 11 | import { gaPage } from '../../lib/analytics'; |
11 | 12 | ||
@@ -50,6 +51,10 @@ const messages = defineMessages({ | |||
50 | id: 'settings.service.form.icon', | 51 | id: 'settings.service.form.icon', |
51 | defaultMessage: '!!!Custom icon', | 52 | defaultMessage: '!!!Custom icon', |
52 | }, | 53 | }, |
54 | enableDarkMode: { | ||
55 | id: 'settings.service.form.enableDarkMode', | ||
56 | defaultMessage: '!!!Enable Dark Mode', | ||
57 | }, | ||
53 | }); | 58 | }); |
54 | 59 | ||
55 | export default @inject('stores', 'actions') @observer class EditServiceScreen extends Component { | 60 | export default @inject('stores', 'actions') @observer class EditServiceScreen extends Component { |
@@ -111,6 +116,11 @@ export default @inject('stores', 'actions') @observer class EditServiceScreen ex | |||
111 | default: null, | 116 | default: null, |
112 | type: 'file', | 117 | type: 'file', |
113 | }, | 118 | }, |
119 | isDarkModeEnabled: { | ||
120 | label: intl.formatMessage(messages.enableDarkMode), | ||
121 | value: service.isDarkModeEnabled, | ||
122 | default: this.props.stores.settings.all.app.darkMode, | ||
123 | }, | ||
114 | }, | 124 | }, |
115 | }; | 125 | }; |
116 | 126 | ||
@@ -238,6 +248,7 @@ EditServiceScreen.wrappedComponent.propTypes = { | |||
238 | user: PropTypes.instanceOf(UserStore).isRequired, | 248 | user: PropTypes.instanceOf(UserStore).isRequired, |
239 | recipes: PropTypes.instanceOf(RecipesStore).isRequired, | 249 | recipes: PropTypes.instanceOf(RecipesStore).isRequired, |
240 | services: PropTypes.instanceOf(ServicesStore).isRequired, | 250 | services: PropTypes.instanceOf(ServicesStore).isRequired, |
251 | settings: PropTypes.instanceOf(SettingsStore).isRequired, | ||
241 | }).isRequired, | 252 | }).isRequired, |
242 | router: PropTypes.shape({ | 253 | router: PropTypes.shape({ |
243 | params: PropTypes.shape({ | 254 | params: PropTypes.shape({ |