Files
fizzy/app/views/notifications/settings/_bucket.html.erb
T
2025-02-26 15:57:16 -06:00

19 lines
895 B
Plaintext

<%= turbo_frame_tag dom_id(bucket, :subscription) do %>
<%= form_with url: bucket_subscriptions_path(bucket), method: :put, data: { controller: "form"} do |form| %>
<div class="flex align-center gap-half pad-inline">
<h2 class="txt-medium overflow-ellipsis">
<%= bucket.name %>
</h2>
<hr class="separator--horizontal flex-item-grow" style="--border-color: var(--color-subtle-dark); --border-style: dashed" aria-hidden="true">
<label class="switch">
<%= form.checkbox :subscribed, checked: bucket.subscribed_by?(local_assigns[:user]), id: dom_id(bucket, :subscribed),
class: "switch__input", include_hidden: false, data: { action: "form#submit" } %>
<span class="switch__btn round"></span>
<span class="for-screen-reader">Enable notifications for this bucket</span>
</label>
</div>
<% end %>
<% end %>