refactor(progress_bar): should be a component
This commit is contained in:
parent
af31e097fb
commit
47a8d33d85
5 changed files with 10 additions and 2 deletions
2
app/components/attachment/progress_bar_component.rb
Normal file
2
app/components/attachment/progress_bar_component.rb
Normal file
|
@ -0,0 +1,2 @@
|
|||
class Attachment::ProgressBarComponent < ApplicationComponent
|
||||
end
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
en:
|
||||
loading: Loading
|
|
@ -0,0 +1,3 @@
|
|||
---
|
||||
fr:
|
||||
loading: Chargement de fichier
|
|
@ -1,5 +1,5 @@
|
|||
%template#progress-bar-template
|
||||
.direct-upload
|
||||
.direct-upload__progress{ role: "progressbar", 'aria-label': "Chargement de fichier", tabindex: "0", 'aria-valuemin': "0", 'aria-valuemax': "100", max: "100", style: "width: 0%" }
|
||||
.direct-upload__progress{ role: "progressbar", 'aria-label': t(".loading"), tabindex: "0", 'aria-valuemin': "0", 'aria-valuemax': "100", max: "100", style: "width: 0%" }
|
||||
%span.direct-upload__filename
|
||||
%slot{ name: "filename" }
|
|
@ -59,4 +59,4 @@
|
|||
- if Rails.env.development?
|
||||
= vite_typescript_tag 'axe-core'
|
||||
= yield :charts_js
|
||||
= render partial: "layouts/progress_bar"
|
||||
= render Attachment::ProgressBarComponent.new
|
||||
|
|
Loading…
Reference in a new issue