diff options
author | 2017-12-27 13:09:17 +0100 | |
---|---|---|
committer | 2017-12-27 13:09:17 +0100 | |
commit | 150cfe764aeb9e93341ba2f231fd121fe85472af (patch) | |
tree | bc398a878ec736f666502af983160aa7829a7a3d /src/components/settings/services | |
parent | Merge branch 'develop' into feature/icon-upload (diff) | |
download | ferdium-app-150cfe764aeb9e93341ba2f231fd121fe85472af.tar.gz ferdium-app-150cfe764aeb9e93341ba2f231fd121fe85472af.tar.zst ferdium-app-150cfe764aeb9e93341ba2f231fd121fe85472af.zip |
First working draft of icon upload
Diffstat (limited to 'src/components/settings/services')
-rw-r--r-- | src/components/settings/services/EditServiceForm.js | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/components/settings/services/EditServiceForm.js b/src/components/settings/services/EditServiceForm.js index ee69d53aa..4f2f98a01 100644 --- a/src/components/settings/services/EditServiceForm.js +++ b/src/components/settings/services/EditServiceForm.js | |||
@@ -127,6 +127,11 @@ export default class EditServiceForm extends Component { | |||
127 | const values = form.values(); | 127 | const values = form.values(); |
128 | let isValid = true; | 128 | let isValid = true; |
129 | 129 | ||
130 | const files = form.$('customIcon').files; | ||
131 | if (files) { | ||
132 | values.iconFile = files[0]; | ||
133 | } | ||
134 | |||
130 | if (recipe.validateUrl && values.customUrl) { | 135 | if (recipe.validateUrl && values.customUrl) { |
131 | this.setState({ isValidatingCustomUrl: true }); | 136 | this.setState({ isValidatingCustomUrl: true }); |
132 | try { | 137 | try { |
@@ -224,7 +229,7 @@ export default class EditServiceForm extends Component { | |||
224 | </div> | 229 | </div> |
225 | <div className="service-icon"> | 230 | <div className="service-icon"> |
226 | {/* <Input field={form.$('name')} focus /> */} | 231 | {/* <Input field={form.$('name')} focus /> */} |
227 | <ImageUpload field={form.$('icon')} /> | 232 | <ImageUpload field={form.$('customIcon')} /> |
228 | </div> | 233 | </div> |
229 | </div> | 234 | </div> |
230 | {(recipe.hasTeamId || recipe.hasCustomUrl) && ( | 235 | {(recipe.hasTeamId || recipe.hasCustomUrl) && ( |