mirror of
https://github.com/penpot/penpot.git
synced 2025-07-19 16:17:20 +02:00
Merge remote-tracking branch 'origin/staging' into develop
This commit is contained in:
commit
93e8657f73
5 changed files with 8 additions and 16 deletions
|
@ -906,8 +906,7 @@
|
||||||
|
|
||||||
(register! ::inst type:inst)
|
(register! ::inst type:inst)
|
||||||
|
|
||||||
(register! ::fn
|
(register! ::fn [:schema fn?])
|
||||||
[:schema fn?])
|
|
||||||
|
|
||||||
;; FIXME: deprecated, replace with ::text
|
;; FIXME: deprecated, replace with ::text
|
||||||
|
|
||||||
|
|
|
@ -19,7 +19,6 @@
|
||||||
[app.main.data.websocket :as ws]
|
[app.main.data.websocket :as ws]
|
||||||
[app.main.features :as features]
|
[app.main.features :as features]
|
||||||
[app.main.repo :as rp]
|
[app.main.repo :as rp]
|
||||||
[app.util.dom :as dom]
|
|
||||||
[app.util.i18n :as i18n :refer [tr]]
|
[app.util.i18n :as i18n :refer [tr]]
|
||||||
[app.util.router :as rt]
|
[app.util.router :as rt]
|
||||||
[app.util.storage :refer [storage]]
|
[app.util.storage :refer [storage]]
|
||||||
|
@ -136,8 +135,7 @@
|
||||||
(swap! storage assoc :profile profile)
|
(swap! storage assoc :profile profile)
|
||||||
(i18n/set-locale! (:lang profile))
|
(i18n/set-locale! (:lang profile))
|
||||||
(when (not= previous-email email)
|
(when (not= previous-email email)
|
||||||
(set-current-team! nil))
|
(set-current-team! nil)))))))
|
||||||
(dom/set-html-theme-color (or (:theme profile) "default")))))))
|
|
||||||
|
|
||||||
(defn fetch-profile
|
(defn fetch-profile
|
||||||
[]
|
[]
|
||||||
|
|
|
@ -29,16 +29,11 @@
|
||||||
(not= section :auth-register-validate)
|
(not= section :auth-register-validate)
|
||||||
(not= section :auth-register-success))
|
(not= section :auth-register-success))
|
||||||
params (:query-params route)
|
params (:query-params route)
|
||||||
error (:error params)
|
error (:error params)]
|
||||||
default-light? (cf/external-feature-flag "onboarding-02" "test")]
|
|
||||||
|
|
||||||
(mf/with-effect []
|
(mf/with-effect []
|
||||||
(dom/set-html-title (tr "title.default")))
|
(dom/set-html-title (tr "title.default")))
|
||||||
|
|
||||||
(mf/with-effect [default-light?]
|
|
||||||
(when default-light?
|
|
||||||
(dom/set-html-theme-color "light")))
|
|
||||||
|
|
||||||
(mf/with-effect [error]
|
(mf/with-effect [error]
|
||||||
(when error
|
(when error
|
||||||
(st/emit! (du/show-redirect-error error))))
|
(st/emit! (du/show-redirect-error error))))
|
||||||
|
|
|
@ -177,7 +177,6 @@
|
||||||
[{:keys [params on-success-callback]}]
|
[{:keys [params on-success-callback]}]
|
||||||
(let [form (fm/use-form :schema schema:register-validate-form :initial params)
|
(let [form (fm/use-form :schema schema:register-validate-form :initial params)
|
||||||
submitted? (mf/use-state false)
|
submitted? (mf/use-state false)
|
||||||
theme (when (cf/external-feature-flag "onboarding-02" "test") "light")
|
|
||||||
|
|
||||||
on-success
|
on-success
|
||||||
(mf/use-fn
|
(mf/use-fn
|
||||||
|
@ -209,8 +208,7 @@
|
||||||
(mf/deps on-success on-error)
|
(mf/deps on-success on-error)
|
||||||
(fn [form _]
|
(fn [form _]
|
||||||
(reset! submitted? true)
|
(reset! submitted? true)
|
||||||
(let [params (cond-> (:clean-data @form)
|
(let [params (:clean-data @form)]
|
||||||
(some? theme) (assoc :theme theme))]
|
|
||||||
(->> (rp/cmd! :register-profile params)
|
(->> (rp/cmd! :register-profile params)
|
||||||
(rx/finalize #(reset! submitted? false))
|
(rx/finalize #(reset! submitted? false))
|
||||||
(rx/subs! on-success on-error)))))]
|
(rx/subs! on-success on-error)))))]
|
||||||
|
|
|
@ -126,7 +126,7 @@
|
||||||
(let [params (prepare-params options)
|
(let [params (prepare-params options)
|
||||||
params (assoc params :file-id (:id file))]
|
params (assoc params :file-id (:id file))]
|
||||||
(st/emit! (dc/create-share-link params)
|
(st/emit! (dc/create-share-link params)
|
||||||
(ptk/event ::ev/event {::ev/name "create-shared-link"
|
(ptk/event ::ev/event {::ev/name "create-share-link"
|
||||||
::ev/origin "viewer"
|
::ev/origin "viewer"
|
||||||
:can-comment (:who-comment params)
|
:can-comment (:who-comment params)
|
||||||
:can-inspect-code (:who-inspect params)}))))
|
:can-inspect-code (:who-inspect params)}))))
|
||||||
|
@ -137,7 +137,9 @@
|
||||||
(st/emit! (ntf/show {:level :info
|
(st/emit! (ntf/show {:level :info
|
||||||
:type :toast
|
:type :toast
|
||||||
:content (tr "common.share-link.link-copied-success")
|
:content (tr "common.share-link.link-copied-success")
|
||||||
:timeout 1000})))
|
:timeout 1000})
|
||||||
|
(ptk/event ::ev/event {::ev/name "copy-share-link"
|
||||||
|
::ev/origin "viewer"})))
|
||||||
|
|
||||||
try-delete-link
|
try-delete-link
|
||||||
(fn [_]
|
(fn [_]
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue