Now displays default text strings (plus some refactoring)

This commit is contained in:
Gregg8 2018-01-10 16:10:52 +11:00
parent ad1cace88b
commit 841b206778
1 changed files with 20 additions and 15 deletions

View File

@ -73,7 +73,7 @@
:on-click #(println "Clicked [end state]")]]]]]) :on-click #(println "Clicked [end state]")]]]]])
(defn path-header [p] (defn path-header [p]
(let [search-string (rf/subscribe [:app-db/search-string]) (let [search-string (r/atom (when (some? p) (prn-str p))) ;;(rf/subscribe [:app-db/search-string])
*pod-open (r/atom true)] *pod-open (r/atom true)]
(fn [p] (fn [p]
[rc/h-box [rc/h-box
@ -190,15 +190,9 @@
:children ["---after-diff---"]] :children ["---after-diff---"]]
[rc/gap-f :size "12px"]]]) [rc/gap-f :size "12px"]]])
(defn paths [] (defn no-pods
(let [ []
pods [["x" "y"] [:abc 123] nil] [rc/h-box
;pods nil
]
[rc/v-box
:gap pod-gap
:children (if (empty? pods)
[[rc/h-box
:margin "0px 0px 0px 19px" :margin "0px 0px 0px 19px"
:gap common/gs-7s :gap common/gs-7s
:align :start :align :start
@ -207,8 +201,19 @@
[rc/label [rc/label
:style {:width "150px" :style {:width "150px"
:margin-top "22px"} :margin-top "22px"}
:label "add inspectors to show what happened to app-db"]]]] :label "add inspectors to show what happened to app-db"]]])
(doall (for [p pods] [app-db-path p])))]))
(defn paths []
(let [
pods [["x" "y"] [:abc 123] nil]
;pods nil
]
(fn []
[rc/v-box
:gap pod-gap
:children (if (empty? pods)
[[no-pods]]
(doall (for [p pods] [app-db-path p])))])))
(defn render-state [data] (defn render-state [data]