Add toggling stuff

This commit is contained in:
2023-12-04 01:05:02 +00:00
parent 09433c76fc
commit 6ca30eb5bb
2 changed files with 30 additions and 2 deletions

View File

@@ -5,7 +5,21 @@
JS.push("toggle_view_state")
|> JS.dispatch("toggle_view_state", detail: %{"grid" => !@grid})
}>
Toggle List/Grid
<%= if @grid do %>
List View
<% else %>
Grid View
<% end %>
</.button>
</:actions>
<:actions :if={!@current_user}>
<.button phx-click={JS.push("toggle_hidden_items")}>
<%= if @hidden do %>
Hide
<% else %>
Show
<% end %>
Received
</.button>
</:actions>
</.header>