diff options
author | 2018-01-06 23:51:04 +0100 | |
---|---|---|
committer | 2018-01-06 23:51:04 +0100 | |
commit | fb16f121e8ff6678c74148cd456b964a85742fbe (patch) | |
tree | 5534162572aca6bda4d22984ab6103c76510d193 /src/containers | |
parent | Merge pull request #541 from meetfranz/feature/external-links (diff) | |
parent | fix displaying old icon while uploading new icon (diff) | |
download | ferdium-app-fb16f121e8ff6678c74148cd456b964a85742fbe.tar.gz ferdium-app-fb16f121e8ff6678c74148cd456b964a85742fbe.tar.zst ferdium-app-fb16f121e8ff6678c74148cd456b964a85742fbe.zip |
Merge pull request #525 from meetfranz/feature/icon-upload
[PR] Feature/icon upload
Diffstat (limited to 'src/containers')
-rw-r--r-- | src/containers/settings/EditServiceScreen.js | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/src/containers/settings/EditServiceScreen.js b/src/containers/settings/EditServiceScreen.js index 3c52152b1..c26195a1e 100644 --- a/src/containers/settings/EditServiceScreen.js +++ b/src/containers/settings/EditServiceScreen.js | |||
@@ -46,6 +46,10 @@ const messages = defineMessages({ | |||
46 | id: 'settings.service.form.indirectMessages', | 46 | id: 'settings.service.form.indirectMessages', |
47 | defaultMessage: '!!!Show message badge for all new messages', | 47 | defaultMessage: '!!!Show message badge for all new messages', |
48 | }, | 48 | }, |
49 | icon: { | ||
50 | id: 'settings.service.form.icon', | ||
51 | defaultMessage: '!!!Custom icon', | ||
52 | }, | ||
49 | }); | 53 | }); |
50 | 54 | ||
51 | @inject('stores', 'actions') @observer | 55 | @inject('stores', 'actions') @observer |
@@ -102,6 +106,12 @@ export default class EditServiceScreen extends Component { | |||
102 | value: !service.isMuted, | 106 | value: !service.isMuted, |
103 | default: true, | 107 | default: true, |
104 | }, | 108 | }, |
109 | customIcon: { | ||
110 | label: intl.formatMessage(messages.icon), | ||
111 | value: service.hasCustomUploadedIcon ? service.icon : false, | ||
112 | default: null, | ||
113 | type: 'file', | ||
114 | }, | ||
105 | }, | 115 | }, |
106 | }; | 116 | }; |
107 | 117 | ||
@@ -199,6 +209,12 @@ export default class EditServiceScreen extends Component { | |||
199 | return (<div>Loading...</div>); | 209 | return (<div>Loading...</div>); |
200 | } | 210 | } |
201 | 211 | ||
212 | if (!recipe) { | ||
213 | return ( | ||
214 | <div>something went wrong</div> | ||
215 | ); | ||
216 | } | ||
217 | |||
202 | const form = this.prepareForm(recipe, service); | 218 | const form = this.prepareForm(recipe, service); |
203 | 219 | ||
204 | return ( | 220 | return ( |