- <.remix_icon icon="windy-line" class="text-gray-400 text-xl" />
+
+
+ <.remix_icon icon="delete-bin-6-line" class="text-gray-700 text-xl bg-gray-100 p-3 rounded-full" />
+
+
+ You haven't deleted any cells or sections yet. Once you do, they'll appear here.
+
- There are currently no cells in the bin.
+ <% @matching_entries == [] -> %>
+
+
+ <.remix_icon icon="file-search-line" class="text-gray-700 text-xl bg-gray-100 p-3 rounded-full" />
+
+
+ We couldn't find any results for your query.
+
-
- <%= for {%{cell: cell} = entry, index} <- Enum.take(@matching_entries, @limit) |> Enum.with_index(1) do %>
-
-
-
- <%= index %>.
- <%= Cell.type(cell) |> Atom.to_string() |> String.capitalize() %> cell
- deleted from “<%= entry.section_name %>” section
- <%= format_date_relatively(entry.deleted_at) %>
-
-
-
-
-
-
-
-
+ <% true -> %>
+
+ <%= for %{cell: cell} = entry <- Enum.take(@matching_entries, @limit) do %>
+
+
+
+ <.cell_icon cell_type={Cell.type(cell)}/>
+
+ <%= Cell.type(cell) |> Atom.to_string() |> String.capitalize() %> cell
+ deleted from “<%= entry.section_name %>” section
+
+
+
+
+ <%= format_date_relatively(entry.deleted_at) %>
+
+
+
+ <.code_preview
+ source_id={"bin-cell-#{cell.id}-source"}
+ language={Cell.type(cell)}
+ source={cell.source} />
+
+
+
- <.code_preview
- source_id={"bin-cell-#{cell.id}-source"}
- language={Cell.type(cell)}
- source={cell.source} />
-
- <% end %>
- <%= if length(@matching_entries) > @limit do %>
-
-
-
- <% end %>
-
+ <% end %>
+ <%= if length(@matching_entries) > @limit do %>
+
+
+
+ <% end %>
+
<% end %>
"""
end
+ defp cell_icon(%{cell_type: :elixir} = assigns) do
+ ~H"""
+
+ """
+ end
+
+ defp cell_icon(%{cell_type: :markdown} = assigns) do
+ ~H"""
+
+ """
+ end
+
defp format_date_relatively(date) do
time_words = date |> DateTime.to_naive() |> Livebook.Utils.Time.time_ago_in_words()
time_words <> " ago"