refactor(attachment): extract PendingPoll component
This commit is contained in:
parent
b110e58f2f
commit
42363e0b0d
13 changed files with 109 additions and 83 deletions
|
@ -27,11 +27,10 @@
|
|||
- if !as_multiple?
|
||||
= file_field(champ, field_name, **file_field_options)
|
||||
|
||||
- if in_progress?
|
||||
%div{ data: poll_controller_options }
|
||||
- if attachment.created_at < 30.seconds.ago
|
||||
.fr-mt-2w
|
||||
= render Attachment::LongProcessingRefreshComponent.new(attachment: attachment)
|
||||
- if persisted?
|
||||
- Attachment::PendingPollComponent.new(attachment: attachment, poll_url:).then do |component|
|
||||
.fr-mt-2w
|
||||
= render component
|
||||
|
||||
.attachment-error.hidden
|
||||
%p.fr-error-text= t('.errors.uploading')
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue