✨ Make template thumbnails available offline
BIN
frontend/resources/images/thumbnails/template-ant-design.jpg
Normal file
After Width: | Height: | Size: 98 KiB |
BIN
frontend/resources/images/thumbnails/template-circum-icons.jpg
Normal file
After Width: | Height: | Size: 57 KiB |
BIN
frontend/resources/images/thumbnails/template-cocomaterial.jpg
Normal file
After Width: | Height: | Size: 144 KiB |
BIN
frontend/resources/images/thumbnails/template-coreui.jpg
Normal file
After Width: | Height: | Size: 86 KiB |
After Width: | Height: | Size: 74 KiB |
After Width: | Height: | Size: 45 KiB |
After Width: | Height: | Size: 66 KiB |
After Width: | Height: | Size: 87 KiB |
After Width: | Height: | Size: 95 KiB |
|
@ -8,6 +8,7 @@
|
||||||
(:require
|
(:require
|
||||||
[app.common.data.macros :as dm]
|
[app.common.data.macros :as dm]
|
||||||
[app.common.math :as mth]
|
[app.common.math :as mth]
|
||||||
|
[app.config :as cf]
|
||||||
[app.main.data.dashboard :as dd]
|
[app.main.data.dashboard :as dd]
|
||||||
[app.main.data.events :as ev]
|
[app.main.data.events :as ev]
|
||||||
[app.main.data.modal :as modal]
|
[app.main.data.modal :as modal]
|
||||||
|
@ -82,7 +83,8 @@
|
||||||
(mf/defc card-item
|
(mf/defc card-item
|
||||||
{::mf/wrap-props false}
|
{::mf/wrap-props false}
|
||||||
[{:keys [item index is-visible collapsed on-import]}]
|
[{:keys [item index is-visible collapsed on-import]}]
|
||||||
(let [id (dm/str "card-container-" index)
|
(let [id (dm/str "card-container-" index)
|
||||||
|
thb (assoc cf/public-uri :path (dm/str "/images/thumbnails/template-" (:id item) ".jpg"))
|
||||||
|
|
||||||
on-click
|
on-click
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
@ -106,7 +108,7 @@
|
||||||
:on-key-down on-key-down}
|
:on-key-down on-key-down}
|
||||||
[:div.template-card
|
[:div.template-card
|
||||||
[:div.img-container
|
[:div.img-container
|
||||||
[:img {:src (:thumbnail-uri item)
|
[:img {:src (dm/str thb)
|
||||||
:alt (:name item)}]]
|
:alt (:name item)}]]
|
||||||
[:div.card-name [:span (:name item)]
|
[:div.card-name [:span (:name item)]
|
||||||
[:span.icon i/download]]]]))
|
[:span.icon i/download]]]]))
|
||||||
|
|