aboutsummaryrefslogtreecommitdiff
path: root/shardweb/lib/templates/identity
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-10-12 15:52:42 +0200
committerAlex Auvolat <alex@adnab.me>2018-10-12 15:52:42 +0200
commit0d358f6f699a5ce04ffe1bccf4f375b5f321391c (patch)
treeb90a1093b3ac0cd1e7d3643abb34e87078b6072e /shardweb/lib/templates/identity
parent1e91dc596fd2f7fdd96b7fd2fc50724f93e46529 (diff)
downloadshard-0d358f6f699a5ce04ffe1bccf4f375b5f321391c.tar.gz
shard-0d358f6f699a5ce04ffe1bccf4f375b5f321391c.zip
Private chat interface
Diffstat (limited to 'shardweb/lib/templates/identity')
-rw-r--r--shardweb/lib/templates/identity/list.html.eex12
1 files changed, 11 insertions, 1 deletions
diff --git a/shardweb/lib/templates/identity/list.html.eex b/shardweb/lib/templates/identity/list.html.eex
index 1354264..007af3d 100644
--- a/shardweb/lib/templates/identity/list.html.eex
+++ b/shardweb/lib/templates/identity/list.html.eex
@@ -20,11 +20,21 @@
<table class="table table-striped">
<tr>
<th>User name</th>
+ <th></th>
<th>Public key</th>
</tr>
<%= for {_id, manifest, pid} <- people_list() do %>
<tr>
- <td><i class="fa fa-user"></i> <%= GenServer.call(pid, :get_info).nick %> </td>
+ <td><i class="fa fa-user"></i> <%= GenServer.call(pid, :get_info).nick %>
+ <%= if manifest.pk == @pk do %>
+ <span class="badge badge-success"><i class="fa fa-user"></i> myself</span>
+ <% end %>
+ </td>
+ <td>
+ <%= if manifest.pk != @pk do %>
+ <a class="btn btn-xs btn-primary" href="<%= chat_path(@conn, :privchat, manifest.pk |> Base.encode16) %>"><i class="fa fa-comments"></i> PM</a>
+ <% end %>
+ </td>
<td><small><%= manifest.pk |> Base.encode16 %></small></td>
</tr>
<% end %>