Improve appearance of subscriptions panel
This commit is contained in:
parent
065e5f8a50
commit
6128ec1901
|
@ -71,10 +71,6 @@
|
|||
[:span {:class "toggle"
|
||||
:on-click #(rf/dispatch [:app-db/toggle-expansion path])}
|
||||
[:button.expansion-button (if @expanded? "▼" "▶")]]
|
||||
|
||||
|
||||
|
||||
|
||||
(if (and @expanded? (cljs-devtools-has-body (get-object jsonml) (get-config jsonml)))
|
||||
(jsonml->hiccup
|
||||
(cljs-devtools-body
|
||||
|
@ -124,7 +120,9 @@
|
|||
(cond
|
||||
(and @expanded?
|
||||
(or (string? data)
|
||||
(number? data))) [:div {:style {:margin "10px 0"}} data]
|
||||
(number? data)
|
||||
(boolean? data)
|
||||
(nil? data))) [:div {:style {:margin "10px 0"}} (prn-str data)]
|
||||
@expanded? (jsonml->hiccup (cljs-devtools-header data) (conj path 0)))]])))
|
||||
|
||||
(defn subscription-render [data title path]
|
||||
|
@ -141,5 +139,7 @@
|
|||
(cond
|
||||
(and @expanded?
|
||||
(or (string? data)
|
||||
(number? data))) [:div {:style {:margin "10px 0"}} data]
|
||||
(number? data)
|
||||
(boolean? data)
|
||||
(nil? data))) [:div {:style {:margin "10px 0"}} (prn-str data)]
|
||||
@expanded? (jsonml->hiccup (cljs-devtools-header data) (conj path 0)))]])))
|
||||
|
|
|
@ -21,9 +21,10 @@
|
|||
[:div.panel-content-scrollable {:style {:margin-left "10px"}}
|
||||
[:div.subtrees {:style {:margin "20px 0"}}
|
||||
(doall
|
||||
(->> @subs/query->reaction
|
||||
(sort)
|
||||
(map (fn [me]
|
||||
(let [[query-v dyn-v :as inputs] (key me)]
|
||||
@re-frame.db/app-db
|
||||
^{:key query-v}
|
||||
[:div.subtree-wrapper {:style {:margin "10px 0"}}
|
||||
[:div.subtree
|
||||
|
@ -33,5 +34,7 @@
|
|||
[:span.subtree-button-string
|
||||
(prn-str (first (key me)))]]
|
||||
(into [:subs] query-v)]]]))
|
||||
@subs/query->reaction))]]])
|
||||
)))
|
||||
(do @re-frame.db/app-db
|
||||
nil)]]])
|
||||
|
||||
|
|
Loading…
Reference in New Issue