aboutsummaryrefslogtreecommitdiff
path: root/shardweb/lib/templates
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-10-12 18:16:46 +0200
committerAlex Auvolat <alex@adnab.me>2018-10-12 18:16:46 +0200
commit574b572fac144135c4381581351445bf5d0de81c (patch)
tree1ad2fa0157583a955069332e6a957250ff362967 /shardweb/lib/templates
parent7bc609a85b43ed86eccb9cd40d9db31f15aaba1d (diff)
downloadshard-574b572fac144135c4381581351445bf5d0de81c.tar.gz
shard-574b572fac144135c4381581351445bf5d0de81c.zip
Clean up interface to shards0.0.3
Diffstat (limited to 'shardweb/lib/templates')
-rw-r--r--shardweb/lib/templates/identity/list.html.eex2
-rw-r--r--shardweb/lib/templates/identity/view.html.eex2
-rw-r--r--shardweb/lib/templates/layout/app.html.eex8
-rw-r--r--shardweb/lib/templates/page/peer_list.html.eex4
-rw-r--r--shardweb/lib/templates/page/shard_list.html.eex2
5 files changed, 9 insertions, 9 deletions
diff --git a/shardweb/lib/templates/identity/list.html.eex b/shardweb/lib/templates/identity/list.html.eex
index 6437f9c..19dba2d 100644
--- a/shardweb/lib/templates/identity/list.html.eex
+++ b/shardweb/lib/templates/identity/list.html.eex
@@ -25,7 +25,7 @@
</tr>
<%= for {_id, manifest, pid} <- people_list() do %>
<tr>
- <td><i class="fa fa-user"></i> <%= GenServer.call(pid, :get_info).nick %>
+ <td><i class="fa fa-user"></i> <%= SApp.Identity.get_info(pid).nick %>
<%= if manifest.pk == @pk do %>
<span class="badge badge-success"><i class="fa fa-user"></i> myself</span>
<% end %>
diff --git a/shardweb/lib/templates/identity/view.html.eex b/shardweb/lib/templates/identity/view.html.eex
index 8bb8ca2..58be7e7 100644
--- a/shardweb/lib/templates/identity/view.html.eex
+++ b/shardweb/lib/templates/identity/view.html.eex
@@ -19,7 +19,7 @@
<%= render ShardWeb.LayoutView, "flashes.html", assigns %>
<pre>
- <%= inspect((GenServer.call(@pid, :get_info)), pretty: true, width: 40) %>
+ <%= inspect(SApp.Identity.get_info(@pid), pretty: true, width: 40) %>
</pre>
diff --git a/shardweb/lib/templates/layout/app.html.eex b/shardweb/lib/templates/layout/app.html.eex
index d96bdeb..6cedcaf 100644
--- a/shardweb/lib/templates/layout/app.html.eex
+++ b/shardweb/lib/templates/layout/app.html.eex
@@ -61,7 +61,7 @@
<b class="caret"></b>
</a>
<ul class="dropdown-menu message-dropdown">
- <%= for {id, %SApp.Chat.PrivChat.Manifest{pk_list: pk_list}, pid} <- sur do %>
+ <%= for {_id, %SApp.Chat.PrivChat.Manifest{pk_list: pk_list}, pid} <- sur do %>
<li class="message-preview">
<a href="<%= chat_path(@conn, :privchat, str_of_pk_list(@conn, pk_list)) %>">
<div class="media">
@@ -137,7 +137,7 @@
<%= for {id, %SApp.Chat.Manifest{channel: name}, pid} <- shard_list() do %>
<li class="<%= if @shard == id do "custom_active" else "" end %>">
<a href="<%= chat_path(@conn, :chat, name) %>">
- <%= if GenServer.call(pid, :has_unread) != nil do %>
+ <%= if SApp.Chat.has_unread?(pid) != nil do %>
<span class="have_unread">#<%= name %></span>
<% else %>
#<%= name %>
@@ -159,7 +159,7 @@
<%= for {id, %SApp.Chat.PrivChat.Manifest{pk_list: pk_list}, pid} <- shard_list() do %>
<li class="<%= if id == @shard do "custom_active" else "" end %>">
<a href="<%= chat_path(@conn, :privchat, str_of_pk_list(@conn, pk_list)) %>">
- <%= if GenServer.call(pid, :has_unread) != nil do %>
+ <%= if SApp.Chat.has_unread?(pid) != nil do %>
<span class="have_unread"><%= nicks_of_pk_list(@conn, pk_list) %></span>
<% else %>
<%= nicks_of_pk_list(@conn, pk_list) %>
@@ -171,7 +171,7 @@
<% end %>
</li>
<li class="<%= if @view_module == ShardWeb.PageView and @view_template == "peer_list.html" do "active" else "" end %>">
- <a href="<%= page_path(@conn, :peer_list) %>"><i class="fa fa-fw fa-globe"></i> Peer list</a>
+ <a href="<%= page_path(@conn, :peer_list) %>"><i class="fa fa-fw fa-server"></i> Peer list</a>
</li>
<li>
<a href="#"><i class="fa fa-fw fa-gear"></i> Settings</a>
diff --git a/shardweb/lib/templates/page/peer_list.html.eex b/shardweb/lib/templates/page/peer_list.html.eex
index ff6479f..09060a7 100644
--- a/shardweb/lib/templates/page/peer_list.html.eex
+++ b/shardweb/lib/templates/page/peer_list.html.eex
@@ -10,7 +10,7 @@
<i class="fa fa-dashboard"></i> Dashboard
</li>
<li class="active">
- <i class="fa fa-globe"></i> Peer list
+ <i class="fa fa-server"></i> Peer list
</li>
</ol>
</div>
@@ -29,7 +29,7 @@
<tr>
<td>
<%= case auth do %>
- <% nil -> %>(anonymous)
+ <% nil -> %><i class="fa fa-globe"></i> (anonymous)
<% %SNet.Auth{his_pk: his_pk} -> %>
<i class="fa fa-user"></i>
<%= SApp.Identity.get_nick(his_pk) %>
diff --git a/shardweb/lib/templates/page/shard_list.html.eex b/shardweb/lib/templates/page/shard_list.html.eex
index 012223a..cc23205 100644
--- a/shardweb/lib/templates/page/shard_list.html.eex
+++ b/shardweb/lib/templates/page/shard_list.html.eex
@@ -30,7 +30,7 @@
<td>
<%= case manifest do %>
<% %SApp.Identity.Manifest{pk: pk} -> %><i class="fa fa-user"></i>
- <%= GenServer.call(pid, :get_info).nick %>
+ <%= SApp.Identity.get_info(pid).nick %>
<a href="<%= identity_path(@conn, :view, pk|>Base.encode16) %>">
<small><%= Shard.Keys.pk_display pk %></small>
</a>