🎉 Add dashboard custom fonts management.

This commit is contained in:
Andrey Antukh 2021-04-29 13:04:19 +02:00 committed by Andrés Moya
parent 2582e87ffa
commit e15a212b14
42 changed files with 1329 additions and 208 deletions

View file

@ -10,6 +10,7 @@
[app.config :as cfg]
[app.util.globals :as globals]
[app.util.storage :refer [storage]]
[app.util.object :as obj]
[app.util.transit :as t]
[beicon.core :as rx]
[cuerdas.core :as str]
@ -136,6 +137,13 @@
([code] (t @locale code))
([code & args] (apply t @locale code args)))
(mf/defc tr-html
{::mf/wrap-props false}
[props]
(let [label (obj/get props "label")
tag-name (obj/get props "tag-name" "p")]
[:> tag-name {:dangerouslySetInnerHTML #js {:__html (tr label)}}]))
;; DEPRECATED
(defn use-locale
[]

View file

@ -29,6 +29,10 @@
[file]
(file-reader #(.readAsText %1 file)))
(defn read-file-as-array-buffer
[file]
(file-reader #(.readAsArrayBuffer %1 file)))
(defn read-file-as-data-url
[file]
(file-reader #(.readAsDataURL ^js %1 file)))