mirror of
https://github.com/penpot/penpot.git
synced 2025-07-26 14:07:15 +02:00
🐛 Restore the ability to enable or disable onboarding modal with flags
This commit is contained in:
parent
a147009e81
commit
243ce3650f
5 changed files with 28 additions and 20 deletions
|
@ -212,11 +212,15 @@
|
|||
|
||||
skip
|
||||
(mf/use-fn
|
||||
#(st/emit! (modal/hide)
|
||||
(if (contains? cf/flags :newsletter-subscription)
|
||||
(modal/show {:type :onboarding-newsletter-modal})
|
||||
(modal/show {:type :onboarding-team}))
|
||||
(du/mark-onboarding-as-viewed)))]
|
||||
(fn []
|
||||
(st/emit! (modal/hide)
|
||||
(du/mark-onboarding-as-viewed))
|
||||
(cond
|
||||
(contains? cf/flags :onboarding-newsletter)
|
||||
(modal/show! {:type :onboarding-newsletter-modal})
|
||||
|
||||
(contains? cf/flags :onboarding-team)
|
||||
(modal/show! {:type :onboarding-team}))))]
|
||||
|
||||
(mf/with-effect [@slide]
|
||||
(when (not= :start @slide)
|
||||
|
@ -225,6 +229,7 @@
|
|||
(fn []
|
||||
(reset! klass nil)
|
||||
(tm/dispose! sem))))
|
||||
|
||||
(if new-css-system
|
||||
[:div {:class (stl/css :modal-overlay)}
|
||||
[:div.animated {:class(dm/str @klass " " (stl/css :animated))}
|
||||
|
@ -232,8 +237,6 @@
|
|||
:start [:& onboarding-welcome {:next #(navigate :opensource)}]
|
||||
:opensource [:& onboarding-before-start {:next skip}])]]
|
||||
|
||||
|
||||
|
||||
[:div.modal-overlay
|
||||
[:div.animated {:class @klass}
|
||||
(case @slide
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue