mirror of
https://github.com/penpot/penpot.git
synced 2025-02-08 16:18:11 -05:00
✨ Improve onboarding initialization
This commit is contained in:
parent
273a5f7a0a
commit
93ac80f217
5 changed files with 26 additions and 17 deletions
|
@ -491,7 +491,6 @@
|
|||
ptk/WatchEvent
|
||||
(watch [_ _ _]
|
||||
(let [props {:onboarding-questions-answered true
|
||||
:onboarding-viewed true
|
||||
:onboarding-questions onboarding-questions}]
|
||||
(->> (rp/cmd! :update-profile-props {:props props})
|
||||
(rx/map (constantly (fetch-profile))))))))
|
||||
|
|
|
@ -98,23 +98,29 @@
|
|||
#_[:& app.main.ui.onboarding/onboarding-modal]
|
||||
#_[:& app.main.ui.onboarding.team-choice/onboarding-team-modal]
|
||||
(when-let [props (get profile :props)]
|
||||
(let [show-question-modal? (and (not (:onboarding-viewed props))
|
||||
(contains? cf/flags :onboarding)
|
||||
(not (:onboarding-questions-answered props))
|
||||
(contains? cf/flags :onboarding-questions))
|
||||
(let [show-question-modal?
|
||||
(and (contains? cf/flags :onboarding)
|
||||
(not (:onboarding-viewed props))
|
||||
(not (contains? props :onboarding-questions)))
|
||||
|
||||
show-newsletter-modal? (and (not (:onboarding-viewed props))
|
||||
(contains? cf/flags :onboarding)
|
||||
(contains? cf/flags :onboarding-newsletter))
|
||||
show-newsletter-modal?
|
||||
(and (contains? cf/flags :onboarding)
|
||||
(not (:onboarding-viewed props))
|
||||
(not (contains? props :newsletter-updates))
|
||||
(contains? props :onboarding-questions))
|
||||
|
||||
show-team-modal? (and (not (:onboarding-viewed props))
|
||||
(contains? cf/flags :onboarding)
|
||||
(contains? cf/flags :onboarding-team))
|
||||
show-team-modal?
|
||||
(and (contains? cf/flags :onboarding)
|
||||
(not (:onboarding-viewed props))
|
||||
(not (contains? props :onboarding-team-id))
|
||||
(contains? props :newsletter-updates))
|
||||
|
||||
show-release-modal?
|
||||
(and (contains? cf/flags :onboarding)
|
||||
(:onboarding-viewed props)
|
||||
(not= (:release-notes-viewed props) (:main cf/version))
|
||||
(not= "0.0" (:main cf/version)))]
|
||||
|
||||
show-release-modal? (and (contains? cf/flags :onboarding)
|
||||
(:onboarding-viewed props)
|
||||
(not= (:release-notes-viewed props) (:main cf/version))
|
||||
(not= "0.0" (:main cf/version)))]
|
||||
(cond
|
||||
show-question-modal?
|
||||
[:& questions-modal]
|
||||
|
|
|
@ -298,7 +298,6 @@
|
|||
:value value'
|
||||
:checked checked?}]]))]))
|
||||
|
||||
|
||||
(mf/defc image-radio-buttons
|
||||
{::mf/wrap-props false}
|
||||
[props]
|
||||
|
@ -328,6 +327,7 @@
|
|||
|
||||
(when (fn? on-change)
|
||||
(on-change name value)))))]
|
||||
|
||||
[:div {:class (if image
|
||||
class
|
||||
(dm/str class " " (stl/css :custom-radio)))}
|
||||
|
@ -336,6 +336,7 @@
|
|||
value' (encode-fn value)
|
||||
checked? (= value current-value)
|
||||
key (str/ffmt "%-%" (d/name name) (d/name value'))]
|
||||
|
||||
[:label {:for key
|
||||
:key key
|
||||
:style {:grid-area area}
|
||||
|
|
|
@ -86,7 +86,8 @@
|
|||
(mf/use-fn
|
||||
(fn [response]
|
||||
(let [team-id (:id response)]
|
||||
(st/emit! (du/update-profile-props {:onboarding-team-id team-id})
|
||||
(st/emit! (du/update-profile-props {:onboarding-team-id team-id
|
||||
:onboarding-viewed true})
|
||||
(rt/nav :dashboard-projects {:team-id team-id})))))
|
||||
|
||||
on-error
|
||||
|
|
|
@ -197,6 +197,8 @@ msgstr ""
|
|||
"Al crear una nueva cuenta, aceptas nuestros [términos de servicio](%s) y "
|
||||
"[política de privacidad](%s)."
|
||||
|
||||
#: src/app/main/ui/auth/register.cljs
|
||||
#, markdown
|
||||
msgid "auth.terms-and-privacy-agreement"
|
||||
msgstr ""
|
||||
"Yo acepto los [términos de servicio](%s) y la [política de privacidad](%s)."
|
||||
|
|
Loading…
Add table
Reference in a new issue