add default price source selection configuration for the stats page
This commit is contained in:
parent
503b5f3551
commit
f527c1fab0
|
@ -234,9 +234,13 @@
|
|||
[widget-row [big-number-statistic "Complete Sets" @total-sets-owned-all-from]]
|
||||
[widget-row [big-number-statistic "Owned Foil Cards" @owned-foil-total]]]))
|
||||
|
||||
(defn default-price-source
|
||||
[]
|
||||
(if (exists? js/__defaultPriceSource)
|
||||
js/__defaultPriceSource))
|
||||
|
||||
(defonce settings (r/atom {:online? false
|
||||
:pricing-source nil}))
|
||||
:pricing-source (default-price-source)}))
|
||||
|
||||
(defvc stats-page
|
||||
[list-id]
|
||||
|
|
|
@ -34,7 +34,9 @@
|
|||
[:a {:href "https://github.com/gered/mtgcoll"} "GitHub Project"]]]]
|
||||
(js-env-settings "" (boolean (config/get :dev?)))
|
||||
(javascript-tag
|
||||
(string/join "\n" [(str "var __authRequired = " (boolean (seq (config/get :users))))]))
|
||||
(string/join "\n" [(str "var __authRequired = " (boolean (seq (config/get :users))) ";")]))
|
||||
(if-let [default-price-source (config/get :default-price-source)]
|
||||
(javascript-tag (str "var __defaultPriceSource = '" default-price-source "';")))
|
||||
(include-js "cljs/app.js")]))
|
||||
|
||||
(def main-page-routes
|
||||
|
|
Loading…
Reference in a new issue