mirror of
https://github.com/penpot/penpot.git
synced 2025-05-21 09:56:12 +02:00
Merge pull request #4273 from penpot/ladybenko-7173-fix-dashboard-layouts
🐛 Fix projects & teams dashboard pages
This commit is contained in:
commit
d8a9e1a2cb
3 changed files with 32 additions and 26 deletions
|
@ -21,7 +21,7 @@
|
||||||
|
|
||||||
.dashboard-content {
|
.dashboard-content {
|
||||||
display: grid;
|
display: grid;
|
||||||
grid-template-rows: $s-64 auto auto 1fr;
|
grid-template-rows: $s-64 1fr;
|
||||||
position: relative;
|
position: relative;
|
||||||
grid-row: 1 / span 2;
|
grid-row: 1 / span 2;
|
||||||
padding: $s-16 $s-16 0 0;
|
padding: $s-16 $s-16 0 0;
|
||||||
|
|
|
@ -417,31 +417,32 @@
|
||||||
(when (seq projects)
|
(when (seq projects)
|
||||||
[:*
|
[:*
|
||||||
[:& header]
|
[:& header]
|
||||||
|
[:div {:class (stl/css :projects-container)}
|
||||||
|
[:*
|
||||||
|
(when team-hero?
|
||||||
|
[:& team-hero {:team team :close-fn close-banner}])
|
||||||
|
|
||||||
(when team-hero?
|
(when (and (contains? cf/flags :dashboard-templates-section)
|
||||||
[:& team-hero {:team team :close-fn close-banner}])
|
(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)
|
(when (and (not walkthrough-viewed?) (:is-default team))
|
||||||
(or (not tutorial-viewed?)
|
[:& interface-walkthrough
|
||||||
(not walkthrough-viewed?)))
|
{:close-walkthrough close-walkthrough}])])
|
||||||
[: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))
|
[:div {:class (stl/css :dashboard-container :no-bg :dashboard-projects)}
|
||||||
[:& interface-walkthrough
|
(for [{:keys [id] :as project} projects]
|
||||||
{:close-walkthrough close-walkthrough}])])
|
(let [files (when recent-map
|
||||||
|
(->> (vals recent-map)
|
||||||
[:div {:class (stl/css :dashboard-container :no-bg :dashboard-projects)}
|
(filterv #(= id (:project-id %)))
|
||||||
(for [{:keys [id] :as project} projects]
|
(sort-by :modified-at #(compare %2 %1))))]
|
||||||
(let [files (when recent-map
|
[:& project-item {:project project
|
||||||
(->> (vals recent-map)
|
:team team
|
||||||
(filterv #(= id (:project-id %)))
|
:files files
|
||||||
(sort-by :modified-at #(compare %2 %1))))]
|
:first? (= project (first projects))
|
||||||
[:& project-item {:project project
|
:key id}]))]]]])))
|
||||||
:team team
|
|
||||||
:files files
|
|
||||||
:first? (= project (first projects))
|
|
||||||
:key id}]))]])))
|
|
||||||
|
|
|
@ -44,6 +44,11 @@
|
||||||
--actions-opacity: 1;
|
--actions-opacity: 1;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.projects-container {
|
||||||
|
display: grid;
|
||||||
|
grid-auto-rows: min-content;
|
||||||
|
}
|
||||||
|
|
||||||
.project {
|
.project {
|
||||||
display: flex;
|
display: flex;
|
||||||
flex-direction: row;
|
flex-direction: row;
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue