aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDavid Barksdale <amatus@amatus.name>2015-01-01 18:53:25 -0600
committerDavid Barksdale <amatus@amatus.name>2015-01-01 18:53:25 -0600
commit49304ac679a0b1270064ca4e8381c459a276f02f (patch)
tree9d3736f314dc90b4e91cbddca7d709fba7816423
parentf831c73094765777b79ed9b7060a340849b8b941 (diff)
Add connection count dropdown arrow and red color
-rw-r--r--src/hl/index.cljs.hl21
1 files changed, 12 insertions, 9 deletions
diff --git a/src/hl/index.cljs.hl b/src/hl/index.cljs.hl
index 69a4f45..469712b 100644
--- a/src/hl/index.cljs.hl
+++ b/src/hl/index.cljs.hl
@@ -298,15 +298,18 @@
:position "bottom right"
:on "click"}
"Connections"
- (div :class "ui label"
- :text (cell=
- (count
- (filter
- (fn [[_ info]]
- (and
- (= 5 (:transport-state info))
- (= 3 (:core-state info))))
- peers)))))
+ (let [connection-count
+ (cell=
+ (count (filter (fn [[_ info]]
+ (and
+ (= 5 (:transport-state info))
+ (= 3 (:core-state info))))
+ peers)))]
+ (div :class (cell=
+ {:ui true :label true :dropdown true
+ :red (zero? connection-count)})
+ (text "~{connection-count}")
+ (i :class "dropdown icon"))))
(div :class "ui flowing popup"
(peer-table))
(div :class "right item"