diff options
author | 2018-11-22 14:14:25 +0100 | |
---|---|---|
committer | 2018-11-22 14:14:25 +0100 | |
commit | 46b8c8c4b3a5b80e0187b284abc84566a7e784db (patch) | |
tree | 7fd378bcdd18e78c42dfeb61a15f89fd10106046 /src/containers/settings/EditServiceScreen.js | |
parent | ADD features loading spinner (diff) | |
parent | feat(App): Add option to enable dark mode for supported services (diff) | |
download | ferdium-app-46b8c8c4b3a5b80e0187b284abc84566a7e784db.tar.gz ferdium-app-46b8c8c4b3a5b80e0187b284abc84566a7e784db.tar.zst ferdium-app-46b8c8c4b3a5b80e0187b284abc84566a7e784db.zip |
Merge branch 'develop' into feature/features-api
Diffstat (limited to 'src/containers/settings/EditServiceScreen.js')
-rw-r--r-- | src/containers/settings/EditServiceScreen.js | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/src/containers/settings/EditServiceScreen.js b/src/containers/settings/EditServiceScreen.js index f2d5550e1..17d727642 100644 --- a/src/containers/settings/EditServiceScreen.js +++ b/src/containers/settings/EditServiceScreen.js | |||
@@ -7,6 +7,7 @@ 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 FeaturesStore from '../../stores/FeaturesStore'; | 9 | import FeaturesStore from '../../stores/FeaturesStore'; |
10 | import SettingsStore from '../../stores/SettingsStore'; | ||
10 | import Form from '../../lib/Form'; | 11 | import Form from '../../lib/Form'; |
11 | import { gaPage } from '../../lib/analytics'; | 12 | import { gaPage } from '../../lib/analytics'; |
12 | 13 | ||
@@ -51,10 +52,13 @@ const messages = defineMessages({ | |||
51 | id: 'settings.service.form.icon', | 52 | id: 'settings.service.form.icon', |
52 | defaultMessage: '!!!Custom icon', | 53 | defaultMessage: '!!!Custom icon', |
53 | }, | 54 | }, |
55 | enableDarkMode: { | ||
56 | id: 'settings.service.form.enableDarkMode', | ||
57 | defaultMessage: '!!!Enable Dark Mode', | ||
58 | }, | ||
54 | }); | 59 | }); |
55 | 60 | ||
56 | @inject('stores', 'actions') @observer | 61 | export default @inject('stores', 'actions') @observer class EditServiceScreen extends Component { |
57 | export default class EditServiceScreen extends Component { | ||
58 | static contextTypes = { | 62 | static contextTypes = { |
59 | intl: intlShape, | 63 | intl: intlShape, |
60 | }; | 64 | }; |
@@ -113,6 +117,11 @@ export default class EditServiceScreen extends Component { | |||
113 | default: null, | 117 | default: null, |
114 | type: 'file', | 118 | type: 'file', |
115 | }, | 119 | }, |
120 | isDarkModeEnabled: { | ||
121 | label: intl.formatMessage(messages.enableDarkMode), | ||
122 | value: service.isDarkModeEnabled, | ||
123 | default: this.props.stores.settings.all.app.darkMode, | ||
124 | }, | ||
116 | }, | 125 | }, |
117 | }; | 126 | }; |
118 | 127 | ||
@@ -245,6 +254,7 @@ EditServiceScreen.wrappedComponent.propTypes = { | |||
245 | recipes: PropTypes.instanceOf(RecipesStore).isRequired, | 254 | recipes: PropTypes.instanceOf(RecipesStore).isRequired, |
246 | services: PropTypes.instanceOf(ServicesStore).isRequired, | 255 | services: PropTypes.instanceOf(ServicesStore).isRequired, |
247 | features: PropTypes.instanceOf(FeaturesStore).isRequired, | 256 | features: PropTypes.instanceOf(FeaturesStore).isRequired, |
257 | settings: PropTypes.instanceOf(SettingsStore).isRequired, | ||
248 | }).isRequired, | 258 | }).isRequired, |
249 | router: PropTypes.shape({ | 259 | router: PropTypes.shape({ |
250 | params: PropTypes.shape({ | 260 | params: PropTypes.shape({ |