aboutsummaryrefslogtreecommitdiff
path: root/shardweb
diff options
context:
space:
mode:
authorAlex Auvolat <alex@adnab.me>2018-10-12 16:47:54 +0200
committerAlex Auvolat <alex@adnab.me>2018-10-12 16:47:54 +0200
commit76749e8f64ce3caf7e0e5c17dfee373dcf4dfe6e (patch)
treecd7651cf771cc45315322096df576fddd8cb8950 /shardweb
parentf5b4131160520a2540445619188c3c8e0f37da37 (diff)
downloadshard-76749e8f64ce3caf7e0e5c17dfee373dcf4dfe6e.tar.gz
shard-76749e8f64ce3caf7e0e5c17dfee373dcf4dfe6e.zip
tweaks
Diffstat (limited to 'shardweb')
-rw-r--r--shardweb/assets/brunch-config.js17
-rw-r--r--shardweb/assets/package-lock.json5
-rw-r--r--shardweb/assets/package.json6
-rw-r--r--shardweb/lib/router.ex4
-rw-r--r--shardweb/lib/templates/chat/chat.html.eex2
-rw-r--r--shardweb/lib/templates/layout/app.html.eex7
-rw-r--r--shardweb/lib/templates/page/shard_list.html.eex8
7 files changed, 26 insertions, 23 deletions
diff --git a/shardweb/assets/brunch-config.js b/shardweb/assets/brunch-config.js
index 9808ab0..28e4593 100644
--- a/shardweb/assets/brunch-config.js
+++ b/shardweb/assets/brunch-config.js
@@ -48,14 +48,15 @@ exports.config = {
// Do not use ES6 compiler in vendor code
ignore: [/vendor/]
},
- copycat: {
- "fonts": ["node_modules/startbootstrap-sb-admin/fonts"],
- "css": ["node_modules/startbootstrap-sb-admin/css"],
- "js": ["node_modules/startbootstrap-sb-admin/js"],
- "font-awesome": ["node_modules/startbootstrap-sb-admin/font-awesome"],
- verbose: true,
- onlyChanged: true
- }
+ copycat: {
+ "fonts": ["node_modules/startbootstrap-sb-admin/fonts",
+ "node_modules/font-awesome/fonts"],
+ "css": ["node_modules/startbootstrap-sb-admin/css",
+ "node_modules/font-awesome/css"],
+ "js": ["node_modules/startbootstrap-sb-admin/js"],
+ verbose: true,
+ onlyChanged: true
+ }
},
modules: {
diff --git a/shardweb/assets/package-lock.json b/shardweb/assets/package-lock.json
index f8e5231..3e06420 100644
--- a/shardweb/assets/package-lock.json
+++ b/shardweb/assets/package-lock.json
@@ -2803,6 +2803,11 @@
"resolve-dir": "^0.1.0"
}
},
+ "font-awesome": {
+ "version": "4.7.0",
+ "resolved": "https://registry.npmjs.org/font-awesome/-/font-awesome-4.7.0.tgz",
+ "integrity": "sha1-j6jPBBGhoxr9B7BtKQK7n8gVoTM="
+ },
"for-in": {
"version": "1.0.2",
"resolved": "https://registry.npmjs.org/for-in/-/for-in-1.0.2.tgz",
diff --git a/shardweb/assets/package.json b/shardweb/assets/package.json
index 797f7f7..5fedb68 100644
--- a/shardweb/assets/package.json
+++ b/shardweb/assets/package.json
@@ -6,16 +6,16 @@
"watch": "brunch watch --stdin"
},
"dependencies": {
- "copycat-brunch": "^1.1.0",
+ "font-awesome": "^4.7.0",
"phoenix": "file:../deps/phoenix",
"phoenix_html": "file:../deps/phoenix_html",
"startbootstrap-sb-admin": "3.3.7"
},
"devDependencies": {
+ "copycat-brunch": "^1.1.0",
"babel-brunch": "6.1.1",
"brunch": "^2.10.17",
"clean-css-brunch": "2.10.0",
- "uglify-js-brunch": "2.10.0",
- "copycat-brunch": "1.1.0"
+ "uglify-js-brunch": "2.10.0"
}
}
diff --git a/shardweb/lib/router.ex b/shardweb/lib/router.ex
index 2c69b8c..981f946 100644
--- a/shardweb/lib/router.ex
+++ b/shardweb/lib/router.ex
@@ -18,9 +18,9 @@ defmodule ShardWeb.Router do
scope "/", ShardWeb do
pipe_through :browser # Use the default browser stack
- get "/", PageController, :peer_list
+ get "/", PageController, :shard_list
+ get "/peers", PageController, :peer_list
post "/peer/add", PageController, :add_peer
- get "/dashboard", PageController, :shard_list
get "/people", IdentityController, :list
get "/people/:pk", IdentityController, :view
diff --git a/shardweb/lib/templates/chat/chat.html.eex b/shardweb/lib/templates/chat/chat.html.eex
index 45609d8..28cc9e6 100644
--- a/shardweb/lib/templates/chat/chat.html.eex
+++ b/shardweb/lib/templates/chat/chat.html.eex
@@ -18,7 +18,7 @@
<i class="fa fa-comments"></i> Chat rooms
</li>
<li class="active">
- <i class="fa fa-users"></i> #<%= @chan %>
+ <i class="fa fa-hashtag"></i> <%= @chan %>
</li>
<% else %>
<li>
diff --git a/shardweb/lib/templates/layout/app.html.eex b/shardweb/lib/templates/layout/app.html.eex
index 067ad57..44ba35d 100644
--- a/shardweb/lib/templates/layout/app.html.eex
+++ b/shardweb/lib/templates/layout/app.html.eex
@@ -21,7 +21,7 @@
<link href="<%= static_path(@conn, "/css/plugins/morris.css") %>" rel="stylesheet">
<!-- Custom Fonts -->
- <link href="<%= static_path(@conn, "/font-awesome/css/font-awesome.min.css") %>" rel="stylesheet" type="text/css">
+ <link href="<%= static_path(@conn, "/css/font-awesome.min.css") %>" rel="stylesheet" type="text/css">
<!-- HTML5 Shim and Respond.js IE8 support of HTML5 elements and media queries -->
<!-- WARNING: Respond.js doesn't work if you view the page via file:// -->
@@ -47,7 +47,7 @@
<span class="icon-bar"></span>
<span class="icon-bar"></span>
</button>
- <a class="navbar-brand" href="<%= page_path(@conn, :peer_list) %>">Shard</a>
+ <a class="navbar-brand" href="<%= page_path(@conn, :shard_list) %>">Shard</a>
</div>
<!-- Top Menu Items -->
<ul class="nav navbar-right top-nav">
@@ -176,9 +176,6 @@
<li>
<a href="#"><i class="fa fa-fw fa-gear"></i> Settings</a>
</li>
- <li class="<%= if @view_module == ShardWeb.PageView and @view_template == "shard_list.html" do "active" else "" end %>">
- <a href="<%= page_path(@conn, :shard_list) %>"><i class="fa fa-fw fa-dashboard"></i> Dashboard</a>
- </li>
</ul>
</div>
<!-- /.navbar-collapse -->
diff --git a/shardweb/lib/templates/page/shard_list.html.eex b/shardweb/lib/templates/page/shard_list.html.eex
index 485bfa1..012223a 100644
--- a/shardweb/lib/templates/page/shard_list.html.eex
+++ b/shardweb/lib/templates/page/shard_list.html.eex
@@ -35,15 +35,15 @@
<small><%= Shard.Keys.pk_display pk %></small>
</a>
- <% %SApp.Chat.Manifest{channel: chan} -> %><i class="fa fa-comments"></i>
+ <% %SApp.Chat.Manifest{channel: chan} -> %><i class="fa fa-hashtag"></i>
<a href="<%= chat_path(@conn, :chat, chan) %>">
- #<%= chan %>
+ <%= chan %>
</a>
- <% %SApp.Chat.PrivChat.Manifest{pk_list: pk_list} -> %><i class="fa fa-comment"></i>
+ <% %SApp.Chat.PrivChat.Manifest{pk_list: pk_list} -> %><i class="fa fa-comments"></i>
<a href="<%= chat_path(@conn, :privchat,
(pk_list |> Enum.filter(&(&1!=@pk)) |> Enum.map(&Base.encode16/1) |> Enum.join(","))) %>">
- @<%= pk_list |> Enum.filter(&(&1!=@pk)) |> Enum.map(&SApp.Identity.get_nick/1) |> Enum.join(", ") %>
+ <%= pk_list |> Enum.filter(&(&1!=@pk)) |> Enum.map(&SApp.Identity.get_nick/1) |> Enum.join(", ") %>
</a>
<% x -> %> <%= inspect x %>