From d6736a8bcf52c4ce003ec4a46123a1425c3e91ad Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Thu, 8 May 2025 15:43:56 -0500 Subject: [PATCH 1/2] Update bubble text when 0 days --- app/views/cards/display/_preview.html.erb | 2 +- app/views/cards/display/preview/_bubble.html.erb | 8 +++++--- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/app/views/cards/display/_preview.html.erb b/app/views/cards/display/_preview.html.erb index d6b35c135..7bba36249 100644 --- a/app/views/cards/display/_preview.html.erb +++ b/app/views/cards/display/_preview.html.erb @@ -30,7 +30,7 @@ <%= render "cards/display/common/background", card: card %> <% if card.closing_soon? %> - <%= render "cards/display/preview/bubble", label: "Closes in", days: card.days_until_close %> + <%= render "cards/display/preview/bubble", days: card.days_until_close %> <% end %> <% end %> <% end %> diff --git a/app/views/cards/display/preview/_bubble.html.erb b/app/views/cards/display/preview/_bubble.html.erb index 1b90ae83c..411b758fd 100644 --- a/app/views/cards/display/preview/_bubble.html.erb +++ b/app/views/cards/display/preview/_bubble.html.erb @@ -1,22 +1,24 @@ +<% days = 0 %> +
- <%= label %> + <%= days < 1 ? "Closes" : "Closes in" %> - <%= days %> + <%= days < 1 ? "!" : days %> - <%= "Day".pluralize(days) %> + <%= days < 1 ? "today" : "Day".pluralize(days) %> From 5281022ef305ae560214e76a814f7512d2186594 Mon Sep 17 00:00:00 2001 From: Andy Smith Date: Thu, 8 May 2025 15:44:48 -0500 Subject: [PATCH 2/2] Remove unused var --- app/views/cards/display/preview/_bubble.html.erb | 2 -- 1 file changed, 2 deletions(-) diff --git a/app/views/cards/display/preview/_bubble.html.erb b/app/views/cards/display/preview/_bubble.html.erb index 411b758fd..e9401ffec 100644 --- a/app/views/cards/display/preview/_bubble.html.erb +++ b/app/views/cards/display/preview/_bubble.html.erb @@ -1,5 +1,3 @@ -<% days = 0 %> -