mirror of
https://github.com/penpot/penpot.git
synced 2025-05-29 20:36:10 +02:00
🐛 Fix dahsboard project scroll
This commit is contained in:
parent
38b72abf32
commit
65fa434388
2 changed files with 22 additions and 4 deletions
|
@ -378,6 +378,7 @@
|
||||||
|
|
||||||
tutorial-viewed? (:viewed-tutorial? props true)
|
tutorial-viewed? (:viewed-tutorial? props true)
|
||||||
walkthrough-viewed? (:viewed-walkthrough? props true)
|
walkthrough-viewed? (:viewed-walkthrough? props true)
|
||||||
|
is-my-penpot (= (:default-team-id profile) (:id team))
|
||||||
|
|
||||||
team-id (:id team)
|
team-id (:id team)
|
||||||
|
|
||||||
|
@ -387,6 +388,7 @@
|
||||||
(st/emit! (du/update-profile-props {:team-hero? false})
|
(st/emit! (du/update-profile-props {:team-hero? false})
|
||||||
(ptk/data-event ::ev/event {::ev/name "dont-show-team-up-hero"
|
(ptk/data-event ::ev/event {::ev/name "dont-show-team-up-hero"
|
||||||
::ev/origin "dashboard"}))))
|
::ev/origin "dashboard"}))))
|
||||||
|
|
||||||
close-tutorial
|
close-tutorial
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(fn []
|
(fn []
|
||||||
|
@ -395,6 +397,7 @@
|
||||||
::ev/origin "get-started-hero"
|
::ev/origin "get-started-hero"
|
||||||
:type "tutorial"
|
:type "tutorial"
|
||||||
:section "dashboard"}))))
|
:section "dashboard"}))))
|
||||||
|
|
||||||
close-walkthrough
|
close-walkthrough
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
(fn []
|
(fn []
|
||||||
|
@ -402,7 +405,13 @@
|
||||||
(ptk/data-event ::ev/event {::ev/name "dont-show-walkthrough"
|
(ptk/data-event ::ev/event {::ev/name "dont-show-walkthrough"
|
||||||
::ev/origin "get-started-hero"
|
::ev/origin "get-started-hero"
|
||||||
:type "walkthrough"
|
:type "walkthrough"
|
||||||
:section "dashboard"}))))]
|
:section "dashboard"}))))
|
||||||
|
|
||||||
|
show-hero? (and is-my-penpot
|
||||||
|
(or (not tutorial-viewed?)
|
||||||
|
(not walkthrough-viewed?)))
|
||||||
|
|
||||||
|
show-team-hero? (and (not is-my-penpot) team-hero?)]
|
||||||
|
|
||||||
(mf/with-effect [team]
|
(mf/with-effect [team]
|
||||||
(let [tname (if (:is-default team)
|
(let [tname (if (:is-default team)
|
||||||
|
@ -423,8 +432,7 @@
|
||||||
[:& team-hero {:team team :close-fn close-banner}])
|
[:& team-hero {:team team :close-fn close-banner}])
|
||||||
|
|
||||||
(when (and (contains? cf/flags :dashboard-templates-section)
|
(when (and (contains? cf/flags :dashboard-templates-section)
|
||||||
(or (not tutorial-viewed?)
|
show-hero?)
|
||||||
(not walkthrough-viewed?)))
|
|
||||||
[:div {:class (stl/css :hero-projects)}
|
[:div {:class (stl/css :hero-projects)}
|
||||||
(when (and (not tutorial-viewed?) (:is-default team))
|
(when (and (not tutorial-viewed?) (:is-default team))
|
||||||
[:& tutorial-project
|
[:& tutorial-project
|
||||||
|
@ -435,7 +443,11 @@
|
||||||
[:& interface-walkthrough
|
[:& interface-walkthrough
|
||||||
{:close-walkthrough close-walkthrough}])])
|
{:close-walkthrough close-walkthrough}])])
|
||||||
|
|
||||||
[:div {:class (stl/css :dashboard-container :no-bg :dashboard-projects)}
|
[:div {:class (stl/css-case :dashboard-container true
|
||||||
|
:no-bg true
|
||||||
|
:dashboard-projects true
|
||||||
|
:with-hero show-hero?
|
||||||
|
:with-team-hero show-team-hero?)}
|
||||||
(for [{:keys [id] :as project} projects]
|
(for [{:keys [id] :as project} projects]
|
||||||
(let [files (when recent-map
|
(let [files (when recent-map
|
||||||
(->> (vals recent-map)
|
(->> (vals recent-map)
|
||||||
|
|
|
@ -17,6 +17,12 @@
|
||||||
|
|
||||||
.dashboard-projects {
|
.dashboard-projects {
|
||||||
user-select: none;
|
user-select: none;
|
||||||
|
height: calc(100vh - $s-64);
|
||||||
|
}
|
||||||
|
|
||||||
|
.with-hero,
|
||||||
|
.with-team-hero {
|
||||||
|
height: calc(100vh - $s-280);
|
||||||
}
|
}
|
||||||
|
|
||||||
.dashboard-shared {
|
.dashboard-shared {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue