diff options
author | 2022-07-06 23:57:25 +0100 | |
---|---|---|
committer | 2022-07-06 22:57:25 +0000 | |
commit | 395850868b51b8c9aa077560bd0b4a4d80478fe7 (patch) | |
tree | 893d348bcdc355919069ca743d4f10cd54c8f2b8 /src/components/settings/services/EditServiceForm.js | |
parent | Upgrade 'electron' to '19.0.8' (diff) | |
download | ferdium-app-395850868b51b8c9aa077560bd0b4a4d80478fe7.tar.gz ferdium-app-395850868b51b8c9aa077560bd0b4a4d80478fe7.tar.zst ferdium-app-395850868b51b8c9aa077560bd0b4a4d80478fe7.zip |
Add file size info and error message while setting a custom image in the recipe settings screen (#437)
Co-authored-by: Ricardo Cino <ricardo@cino.io>
Co-authored-by: Vijay Aravamudhan <vraravam@users.noreply.github.com>
Diffstat (limited to 'src/components/settings/services/EditServiceForm.js')
-rw-r--r-- | src/components/settings/services/EditServiceForm.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/src/components/settings/services/EditServiceForm.js b/src/components/settings/services/EditServiceForm.js index 3da0246ac..f69d86726 100644 --- a/src/components/settings/services/EditServiceForm.js +++ b/src/components/settings/services/EditServiceForm.js | |||
@@ -141,6 +141,14 @@ const messages = defineMessages({ | |||
141 | id: 'settings.service.reloadRequired', | 141 | id: 'settings.service.reloadRequired', |
142 | defaultMessage: 'Changes require reload of the service', | 142 | defaultMessage: 'Changes require reload of the service', |
143 | }, | 143 | }, |
144 | maxFileSize: { | ||
145 | id: 'settings.service.form.maxFileSize', | ||
146 | defaultMessage: 'Maximum filesize:', | ||
147 | }, | ||
148 | maxFileSizeError: { | ||
149 | id: 'settings.service.form.maxFileSizeError', | ||
150 | defaultMessage: 'The file you are trying to submit is too large.', | ||
151 | }, | ||
144 | }); | 152 | }); |
145 | 153 | ||
146 | class EditServiceForm extends Component { | 154 | class EditServiceForm extends Component { |
@@ -398,6 +406,12 @@ class EditServiceForm extends Component { | |||
398 | field={form.$('customIcon')} | 406 | field={form.$('customIcon')} |
399 | textDelete={intl.formatMessage(messages.iconDelete)} | 407 | textDelete={intl.formatMessage(messages.iconDelete)} |
400 | textUpload={intl.formatMessage(messages.iconUpload)} | 408 | textUpload={intl.formatMessage(messages.iconUpload)} |
409 | maxSize={2_097_152} | ||
410 | maxFiles={1} | ||
411 | textMaxFileSize={intl.formatMessage(messages.maxFileSize)} | ||
412 | textMaxFileSizeError={intl.formatMessage( | ||
413 | messages.maxFileSizeError, | ||
414 | )} | ||
401 | /> | 415 | /> |
402 | </div> | 416 | </div> |
403 | </div> | 417 | </div> |