diff options
author | Jordan Bracco <href@random.sh> | 2022-12-20 02:19:42 +0000 |
---|---|---|
committer | Jordan Bracco <href@random.sh> | 2022-12-20 19:29:41 +0100 |
commit | 9958e90eb5eb5a2cc171c40860745e95a96bd429 (patch) | |
tree | b49cdb1d0041b9c0a81a14950d38c0203896f527 /lib/web/templates/page/user.html.eex | |
parent | Rename to Nola (diff) |
Actually do not prefix folders with nola_ refs T77
Diffstat (limited to 'lib/web/templates/page/user.html.eex')
-rw-r--r-- | lib/web/templates/page/user.html.eex | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/lib/web/templates/page/user.html.eex b/lib/web/templates/page/user.html.eex new file mode 100644 index 0000000..de9f718 --- /dev/null +++ b/lib/web/templates/page/user.html.eex @@ -0,0 +1,43 @@ +<div class="prose prose-lg"> +<ul> + <li><%= link("Help", to: "/-") %></li> + <%= unless List.keyfind(@metas, "identity-id", 0) do %> + <li><%= link("Connect with random.sh", to: Routes.open_id_path(@conn, :login)) %></li> + <% end %> +</ul> + +<h2>channels</h2> +<ul> + <%= for {net, channel} <- @memberships do %> + <li> + <% url = NolaWeb.Router.Helpers.irc_path(NolaWeb.Endpoint, :index, net, NolaWeb.format_chan(channel)) %> + <%= link([net, ": ", content_tag(:strong, channel)], to: url) %> + </li> + <% end %> +</ul> + +<h2>connections</h2> +<ul> + <%= for user <- @users do %> + <li> + <strong><%= user.network %></strong>: <strong><%= user.nick %></strong>!<%= user.username %>@<%= user.host %> <i><%= user.realname %></i><br /> + <%= Enum.join(Enum.intersperse(Enum.map(user.privileges, fn({c, _}) -> c end), ", ")) %> + </li> + <% end %> +</ul> + +<h2>account</h2> +<ul> + <li>account-id: <%= @conn.assigns.account.id %></li> + <%= for {k, v} <- @metas do %> + <li><%= k %>: <%= to_string(v) %></li> + <% end %> +</ul> + +<strong>irc auths:</strong> +<ul> + <%= for {net, {predicate, v}} <- @predicates do %> + <li><%= net %>: <%= to_string(predicate) %>, <%= v %></li> + <% end %> +</ul> +</div> |