mirror of
https://github.com/penpot/penpot.git
synced 2025-02-10 00:58:26 -05:00
Properly format created-at date on icons and images.
This commit is contained in:
parent
e4c020f78f
commit
8f8bff7b76
2 changed files with 7 additions and 4 deletions
|
@ -19,6 +19,7 @@
|
|||
[uxbox.util.i18n :as t :refer (tr)]
|
||||
[uxbox.util.data :refer (read-string)]
|
||||
[uxbox.util.mixins :as mx :include-macros true]
|
||||
[uxbox.util.datetime :as dt]
|
||||
[uxbox.util.rstore :as rs]
|
||||
[uxbox.util.schema :as sc]
|
||||
[uxbox.util.lens :as ul]
|
||||
|
@ -290,7 +291,7 @@
|
|||
i/organize]])])))
|
||||
|
||||
(mx/defc grid-item
|
||||
[{:keys [id] :as icon} selected?]
|
||||
[{:keys [id created-at] :as icon} selected?]
|
||||
(letfn [(toggle-selection [event]
|
||||
(rs/emit! (di/toggle-icon-selection id)))
|
||||
(toggle-selection-shifted [event]
|
||||
|
@ -309,7 +310,7 @@
|
|||
(icon/icon-svg icon)]
|
||||
[:div.item-info
|
||||
[:h3 (:name icon)]
|
||||
[:span.date "Uploaded at 21/09/2016"]]
|
||||
(str "Uploaded at " (dt/format created-at "L"))]
|
||||
#_[:div.project-th-actions
|
||||
[:div.project-th-icon.edit i/pencil]
|
||||
[:div.project-th-icon.delete i/trash]]]))
|
||||
|
|
|
@ -18,6 +18,7 @@
|
|||
[uxbox.main.ui.lightbox :as lbx]
|
||||
[uxbox.main.ui.keyboard :as kbd]
|
||||
[uxbox.main.ui.dashboard.header :refer (header)]
|
||||
[uxbox.util.datetime :as dt]
|
||||
[uxbox.util.data :as data :refer (read-string)]
|
||||
[uxbox.util.dom :as dom]))
|
||||
|
||||
|
@ -294,7 +295,7 @@
|
|||
i/organize]])])))
|
||||
|
||||
(mx/defc grid-item
|
||||
[{:keys [id] :as image} selected?]
|
||||
[{:keys [id created-at] :as image} selected?]
|
||||
(letfn [(toggle-selection [event]
|
||||
(rs/emit! (di/toggle-image-selection id)))
|
||||
(toggle-selection-shifted [event]
|
||||
|
@ -312,7 +313,8 @@
|
|||
[:label {:for (:id image)}]]]
|
||||
[:div.item-info
|
||||
[:h3 (:name image)]
|
||||
[:span.date "Uploaded at 12/11/2016"]]]))
|
||||
[:span.date
|
||||
(str "Uploaded at " (dt/format created-at "L"))]]]))
|
||||
|
||||
(mx/defc grid
|
||||
{:mixins [mx/static mx/reactive]}
|
||||
|
|
Loading…
Add table
Reference in a new issue