Files
fizzy/app/views/bubbles/_pop_toggle.html.erb
T
Kevin McConnell dac2611c57 Auto-pop bubbles
2025-02-12 13:20:05 +00:00

17 lines
916 B
Plaintext

<div class="bubble__actions-container center border-radius pad flex-inline align-center justify-center gap pad-inline-double" style="--bubble-color: <%= @bubble.color %>">
<% if bubble.popped? %>
<span class="bubble__pop-message">Popped by <%= bubble.popped_by.name %> on <%= local_datetime_tag(bubble.popped_at, style: :shortdate) %>.</span>
<%= button_to bucket_bubble_pop_path(bubble.bucket, bubble), method: :delete, class: "btn btn--plain borderless fill-transparent" do %>
<span>Un-pop</span>
<% end %>
<% else %>
<%= button_to bucket_bubble_pop_path(bubble.bucket, bubble), class: "btn borderless" do %>
<%= image_tag "pop.svg", aria: { hidden: true }, size: 24, class: "colorize--white" %>
<span>Pop</span>
<% end %>
<span class="bubble__pop-message">
Auto-pops <%= local_datetime_tag(bubble.auto_pop_at, style: :indays) %>.
</span>
<% end %>
</div>