Merge branch 'main' into develop

This commit is contained in:
Andrey Antukh 2021-09-29 11:29:01 +02:00
commit 9e5166d991
4 changed files with 15 additions and 17 deletions

View file

@ -116,9 +116,10 @@
(db/inet ip-addr) (db/inet ip-addr)
(db/tjson (:props event)) (db/tjson (:props event))
(db/tjson (d/without-nils (:context event)))])) (db/tjson (d/without-nils (:context event)))]))
events (us/conform ::events events) events (us/conform ::events events)]
rows (into [] prepare-xf events)] (when (seq events)
(db/insert-multi! pool :audit-log columns rows)) (->> (into [] prepare-xf events)
(db/insert-multi! pool :audit-log columns))))
(catch Throwable e (catch Throwable e
(let [xdata (ex-data e)] (let [xdata (ex-data e)]
(if (= :spec-validation (:code xdata)) (if (= :spec-validation (:code xdata))

View file

@ -215,7 +215,7 @@
:task :audit-log-archive}) :task :audit-log-archive})
(when (contains? cf/flags :audit-log-gc) (when (contains? cf/flags :audit-log-gc)
{:cron #app/cron "0 0 * * * ?" ;; every 1h {:cron #app/cron "0 0 0 * * ?" ;; daily
:task :audit-log-gc}) :task :audit-log-gc})
(when (or (contains? cf/flags :telemetry) (when (or (contains? cf/flags :telemetry)

View file

@ -25,7 +25,7 @@
[:div.auth [:div.auth
[:section.auth-sidebar [:section.auth-sidebar
[:a.logo {:href "https://penpot.app"} i/logo] [:a.logo {:href "#/"} i/logo]
[:span.tagline (tr "auth.sidebar-tagline")]] [:span.tagline (tr "auth.sidebar-tagline")]]
[:section.auth-content [:section.auth-content

View file

@ -184,12 +184,8 @@
(mf/defc register-validate-form (mf/defc register-validate-form
[{:keys [params] :as props}] [{:keys [params] :as props}]
(let [initial (mf/use-memo (let [form (fm/use-form :spec ::register-validate-form
(mf/deps params) :initial params)
(fn []
(assoc params :accept-newsletter-subscription false)))
form (fm/use-form :spec ::register-validate-form
:initial initial)
submitted? (mf/use-state false) submitted? (mf/use-state false)
on-submit on-submit
@ -210,18 +206,19 @@
:tab-index "1" :tab-index "1"
:label (tr "auth.fullname") :label (tr "auth.fullname")
:type "text"}]] :type "text"}]]
[:div.fields-row [:div.fields-row
[:& fm/input {:name :accept-terms-and-privacy [:& fm/input {:name :accept-terms-and-privacy
:class "check-primary" :class "check-primary"
:label (tr "auth.terms-privacy-agreement") :label (tr "auth.terms-privacy-agreement")
:type "checkbox"}]] :type "checkbox"}]]
(when (contains? @cf/flags :newsletter-registration-check) ;; (when (contains? @cf/flags :newsletter-registration-check)
[:div.fields-row ;; [:div.fields-row
[:& fm/input {:name :accept-newsletter-subscription ;; [:& fm/input {:name :accept-newsletter-subscription
:class "check-primary" ;; :class "check-primary"
:label (tr "auth.newsletter-subscription") ;; :label (tr "auth.newsletter-subscription")
:type "checkbox"}]]) ;; :type "checkbox"}]])
[:& fm/submit-button [:& fm/submit-button
{:label (tr "auth.register-submit") {:label (tr "auth.register-submit")