about summary refs log tree commit diff
path: root/app/views/auth/shared/_progress.html.haml
diff options
context:
space:
mode:
authorStarfall <us@starfall.systems>2023-04-22 20:32:00 -0500
committerStarfall <us@starfall.systems>2023-04-22 20:32:00 -0500
commit609ee7b2979252464e63acbfd2eff3e0e3786f3e (patch)
tree6ade160c4354b803ed36ae5dae28a0ae38bcf032 /app/views/auth/shared/_progress.html.haml
parent4fe1689de43f4404eb9530fcfbcbfb26d6c1c13a (diff)
parent5b58ebb04fe197cc7aa0cfc05a4d1b2df8da0050 (diff)
Merge remote-tracking branch 'glitch/main'
Diffstat (limited to 'app/views/auth/shared/_progress.html.haml')
-rw-r--r--app/views/auth/shared/_progress.html.haml25
1 files changed, 25 insertions, 0 deletions
diff --git a/app/views/auth/shared/_progress.html.haml b/app/views/auth/shared/_progress.html.haml
new file mode 100644
index 000000000..578f62fa9
--- /dev/null
+++ b/app/views/auth/shared/_progress.html.haml
@@ -0,0 +1,25 @@
+- progress_index = { rules: 0, details: 1, confirm: 2 }[stage.to_sym]
+
+%ol.progress-tracker
+  %li{ class: progress_index.positive? ? 'completed' : 'active' }
+    .circle
+      - if progress_index.positive?
+        = check_icon
+    .label= t('auth.progress.rules')
+  %li.separator{ class: progress_index.positive? ? 'completed' : nil }
+  %li{ class: [progress_index > 1 && 'completed', progress_index == 1 && 'active'] }
+    .circle
+      - if progress_index > 1
+        = check_icon
+    .label= t('auth.progress.details')
+  %li.separator{ class: progress_index > 1 ? 'completed' : nil }
+  %li{ class: [progress_index > 2 && 'completed', progress_index == 2 && 'active'] }
+    .circle
+      - if progress_index > 2
+        = check_icon
+    .label= t('auth.progress.confirm')
+  - if approved_registrations?
+    %li.separator{ class: progress_index > 2 ? 'completed' : nil }
+    %li
+      .circle
+      .label= t('auth.progress.review')