only show public and active identities on home page
This commit is contained in:
parent
e03737853c
commit
bcae8b0d92
2 changed files with 5 additions and 2 deletions
|
@ -8,7 +8,7 @@
|
||||||
|
|
||||||
<div class="w-full mt-6 sm:w-auto">
|
<div class="w-full mt-6 sm:w-auto">
|
||||||
<div class="flex gap-4 text-sm leading-6 text-theme-base">
|
<div class="flex gap-4 text-sm leading-6 text-theme-base">
|
||||||
<%= for identity <- @identities do %>
|
<%= for identity <- @public_identities do %>
|
||||||
<div>
|
<div>
|
||||||
<a
|
<a
|
||||||
rel={identity.rel}
|
rel={identity.rel}
|
||||||
|
|
|
@ -8,7 +8,10 @@ defmodule ChiyaWeb.GlobalAssigns do
|
||||||
|
|
||||||
def fetch_identities(conn, _opts) do
|
def fetch_identities(conn, _opts) do
|
||||||
identities = Chiya.Identities.list_identities()
|
identities = Chiya.Identities.list_identities()
|
||||||
assign(conn, :identities, identities)
|
|
||||||
|
conn
|
||||||
|
|> assign(:identities, identities)
|
||||||
|
|> assign(:public_identities, Enum.filter(identities, fn i -> i.public && i.active end))
|
||||||
end
|
end
|
||||||
|
|
||||||
def fetch_public_channels(conn, _opts) do
|
def fetch_public_channels(conn, _opts) do
|
||||||
|
|
Loading…
Reference in a new issue