From 77fcd6a2a1234e89ca909159fa1b67637d70a563 Mon Sep 17 00:00:00 2001 From: End Nightshade Date: Wed, 4 Mar 2026 20:00:18 -0700 Subject: [PATCH] add badge for verif needed --- app/components/sidebar.rb | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/app/components/sidebar.rb b/app/components/sidebar.rb index a81ccf4..765066a 100644 --- a/app/components/sidebar.rb +++ b/app/components/sidebar.rb @@ -38,13 +38,18 @@ class Components::Sidebar < Components::Base # Add verification link if user needs to submit or resubmit if current_identity.present? status = current_identity.verification_status - if status == "needs_submission" || status == "pending" - items << { - label: t("sidebar.verification"), - path: new_verifications_path, - icon: status == "pending" ? "clock" : "card-id" - } - end + + # Show a small badge when the user needs to take a verification action. + # We use a numeric badge so the rendering helper can decide whether to display it. + badge_count = 0 + badge_count = 1 if status == "needs_submission" || status == "pending" + + items << { + label: t("sidebar.verification"), + path: new_verifications_path, + icon: status == "pending" ? "clock" : "card-id", + badge: badge_count + } end items << { label: t("sidebar.addresses"), path: addresses_path, icon: "email" }