summaryrefslogtreecommitdiff
path: root/lib/lsg_web/templates/page/user.html.eex
blob: 6eeb39da494209f6f37f3ed3604319cf8531b496 (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
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 = LSGWeb.Router.Helpers.irc_path(LSGWeb.Endpoint, :index, net, LSGWeb.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>