Toggle settings

This commit is contained in:
Daniel Compton 2017-12-21 14:57:46 +13:00
parent f7bdf6e414
commit a5c052fd59
2 changed files with 6 additions and 1 deletions

View File

@ -5,7 +5,7 @@
(defn init-db []
(let [panel-width% (localstorage/get "panel-width-ratio" 0.35)
show-panel? (localstorage/get "show-panel" false)
selected-tab (localstorage/get "selected-tab" :traces)
selected-tab (localstorage/get "selected-tab" :overview)
filter-items (localstorage/get "filter-items" [])
app-db-paths (localstorage/get "app-db-paths" '())
json-ml-paths (localstorage/get "app-db-json-ml-expansions" #{})

View File

@ -65,6 +65,11 @@
(localstorage/save! "selected-tab" selected-tab)
(assoc-in db [:settings :selected-tab] selected-tab)))
(rf/reg-event-db
:settings/toggle-settings
(fn [db _]
(update-in db [:settings :showing-settings?] not)))
(rf/reg-event-db
:settings/show-panel?
(fn [db [_ show-panel?]]