mirror of
https://github.com/penpot/penpot.git
synced 2025-05-09 05:35:53 +02:00
✨ Do not show time for empty projects at dashboard
This commit is contained in:
parent
fa3445edfb
commit
27810c9df8
1 changed files with 7 additions and 5 deletions
|
@ -52,17 +52,19 @@
|
||||||
(mf/defc recent-project
|
(mf/defc recent-project
|
||||||
[{:keys [project files first? locale] :as props}]
|
[{:keys [project files first? locale] :as props}]
|
||||||
(let [project-id (:id project)
|
(let [project-id (:id project)
|
||||||
team-id (:team-id project)]
|
team-id (:team-id project)
|
||||||
|
file-count (or (:file-count project) 0)]
|
||||||
[:div.recent-files-row
|
[:div.recent-files-row
|
||||||
{:class-name (when first? "first")}
|
{:class-name (when first? "first")}
|
||||||
[:div.recent-files-row-title
|
[:div.recent-files-row-title
|
||||||
[:h2.recent-files-row-title-name {:on-click #(st/emit! (rt/nav :dashboard-project {:team-id team-id
|
[:h2.recent-files-row-title-name {:on-click #(st/emit! (rt/nav :dashboard-project {:team-id team-id
|
||||||
:project-id project-id}))
|
:project-id project-id}))
|
||||||
:style {:cursor "pointer"}} (:name project)]
|
:style {:cursor "pointer"}} (:name project)]
|
||||||
[:span.recent-files-row-title-info (str (:file-count project) " files")]
|
[:span.recent-files-row-title-info (str file-count " files")]
|
||||||
(let [time (-> (:modified-at project)
|
(when (> file-count 0)
|
||||||
(dt/timeago {:locale locale}))]
|
(let [time (-> (:modified-at project)
|
||||||
[:span.recent-files-row-title-info (str ", " time)])]
|
(dt/timeago {:locale locale}))]
|
||||||
|
[:span.recent-files-row-title-info (str ", " time)]))]
|
||||||
[:& grid {:id (:id project)
|
[:& grid {:id (:id project)
|
||||||
:files files
|
:files files
|
||||||
:hide-new? true}]]))
|
:hide-new? true}]]))
|
||||||
|
|
Loading…
Add table
Reference in a new issue