0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-03-11 23:31:21 -05:00

🐛 Fix projects & teams dashboard pages

This commit is contained in:
Belén Albeza 2024-03-14 15:15:14 +01:00
parent 75d0648065
commit b5fe07d5ee
3 changed files with 32 additions and 26 deletions

View file

@ -21,7 +21,7 @@
.dashboard-content {
display: grid;
grid-template-rows: $s-64 auto auto 1fr;
grid-template-rows: $s-64 1fr;
position: relative;
grid-row: 1 / span 2;
padding: $s-16 $s-16 0 0;

View file

@ -417,31 +417,32 @@
(when (seq projects)
[:*
[:& header]
[:div {:class (stl/css :projects-container)}
[:*
(when team-hero?
[:& team-hero {:team team :close-fn close-banner}])
(when team-hero?
[:& team-hero {:team team :close-fn close-banner}])
(when (and (contains? cf/flags :dashboard-templates-section)
(or (not tutorial-viewed?)
(not walkthrough-viewed?)))
[:div {:class (stl/css :hero-projects)}
(when (and (not tutorial-viewed?) (:is-default team))
[:& tutorial-project
{:close-tutorial close-tutorial
:default-project-id default-project-id}])
(when (and (contains? cf/flags :dashboard-templates-section)
(or (not tutorial-viewed?)
(not walkthrough-viewed?)))
[:div {:class (stl/css :hero-projects)}
(when (and (not tutorial-viewed?) (:is-default team))
[:& tutorial-project
{:close-tutorial close-tutorial
:default-project-id default-project-id}])
(when (and (not walkthrough-viewed?) (:is-default team))
[:& interface-walkthrough
{:close-walkthrough close-walkthrough}])])
(when (and (not walkthrough-viewed?) (:is-default team))
[:& interface-walkthrough
{:close-walkthrough close-walkthrough}])])
[:div {:class (stl/css :dashboard-container :no-bg :dashboard-projects)}
(for [{:keys [id] :as project} projects]
(let [files (when recent-map
(->> (vals recent-map)
(filterv #(= id (:project-id %)))
(sort-by :modified-at #(compare %2 %1))))]
[:& project-item {:project project
:team team
:files files
:first? (= project (first projects))
:key id}]))]])))
[:div {:class (stl/css :dashboard-container :no-bg :dashboard-projects)}
(for [{:keys [id] :as project} projects]
(let [files (when recent-map
(->> (vals recent-map)
(filterv #(= id (:project-id %)))
(sort-by :modified-at #(compare %2 %1))))]
[:& project-item {:project project
:team team
:files files
:first? (= project (first projects))
:key id}]))]]]])))

View file

@ -44,6 +44,11 @@
--actions-opacity: 1;
}
.projects-container {
display: grid;
grid-auto-rows: min-content;
}
.project {
display: flex;
flex-direction: row;