style(attachments): better UX when we can try to upload without network

This commit is contained in:
Colin Darie 2022-11-24 14:05:53 +01:00
parent 42b84384dd
commit cb2afc74b0
6 changed files with 15 additions and 12 deletions

View file

@ -98,7 +98,7 @@ class Attachment::EditComponent < ApplicationComponent
def retry_button_options
{
type: 'button',
class: 'fr-btn fr-btn--sm fr-btn--tertiary fr-mt-1w fr-icon-refresh-line fr-btn--icon-left attachment-error-retry',
class: 'fr-btn fr-btn--sm fr-btn--tertiary fr-mt-1w attachment-upload-error-retry',
data: { input_target: ".#{attachment_input_class}", action: 'autosave#onClickRetryButton' }
}
end

View file

@ -2,7 +2,7 @@
fr:
max_file_size: "Taille maximale : %{max_file_size}."
allowed_formats: "Formats supportés : %{formats}"
retry: -essayer
retry: essayer
delete: Supprimer
errors:
uploading: "Une erreur sest produite pendant lenvoi du fichier."

View file

@ -32,8 +32,8 @@
.fr-mt-2w
= render component
.attachment-error.hidden
%p.fr-error-text= t('.errors.uploading')
= button_tag(**retry_button_options) do
= t(".retry")
.attachment-upload-error.hidden
%p.fr-error-text= t('.errors.uploading')
= button_tag(**retry_button_options) do
= t(".retry")