Rename app-state to app-db

This commit is contained in:
Daniel Compton 2017-10-27 13:24:01 +13:00
parent 4708a6e95e
commit 33f9e0966b
2 changed files with 23 additions and 22 deletions

View File

@ -1,6 +1,6 @@
(ns day8.re-frame.trace (ns day8.re-frame.trace
(:require [day8.re-frame.trace.subvis :as subvis] (:require [day8.re-frame.trace.subvis :as subvis]
[day8.re-frame.trace.app-state :as app-state] [day8.re-frame.trace.app-db :as app-state]
[day8.re-frame.trace.styles :as styles] [day8.re-frame.trace.styles :as styles]
[day8.re-frame.trace.components :as components] [day8.re-frame.trace.components :as components]
[day8.re-frame.trace.localstorage :as localstorage] [day8.re-frame.trace.localstorage :as localstorage]
@ -385,15 +385,16 @@
[:div.nav [:div.nav
[:button {:class (str "tab button " (when (= @selected-tab :traces) "active")) [:button {:class (str "tab button " (when (= @selected-tab :traces) "active"))
:on-click #(reset! selected-tab :traces)} "Traces"] :on-click #(reset! selected-tab :traces)} "Traces"]
[:button {:class (str "tab button " (when (= @selected-tab :app-state) "active")) [:button {:class (str "tab button " (when (= @selected-tab :app-db) "active"))
:on-click #(reset! selected-tab :app-state)} "app-state"] :on-click #(reset! selected-tab :app-db)} "App DB"]
#_[:button {:class (str "tab button " (when (= @selected-tab :subvis) "active")) #_[:button {:class (str "tab button " (when (= @selected-tab :subvis) "active"))
:on-click #(reset! selected-tab :subvis)} "SubVis"]]] :on-click #(reset! selected-tab :subvis)} "SubVis"]]]
(case @selected-tab (case @selected-tab
:traces [render-trace-panel] :traces [render-trace-panel]
:app-state [app-state/render-state db/app-db] :app-db [app-state/render-state db/app-db]
:subvis [subvis/render-subvis traces :subvis [subvis/render-subvis traces
[:div.panel-content-scrollable]])]]]))}))) [:div.panel-content-scrollable]]
[app-state/render-state db/app-db])]]]))})))
(defn panel-div [] (defn panel-div []
(let [id "--re-frame-trace--" (let [id "--re-frame-trace--"

View File

@ -1,4 +1,4 @@
(ns day8.re-frame.trace.app-state (ns day8.re-frame.trace.app-db
(:require [reagent.core :as r] (:require [reagent.core :as r]
[clojure.string :as str] [clojure.string :as str]
[devtools.formatters.core :as cljs-devtools] [devtools.formatters.core :as cljs-devtools]