0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-04-12 15:01:28 -05:00

Merge remote-tracking branch 'origin/main' into develop

This commit is contained in:
Andrey Antukh 2021-05-06 19:53:21 +02:00
commit 1fd2b3fff8
8 changed files with 41 additions and 16 deletions

View file

@ -12,6 +12,16 @@
### :heart: Community contributions by (Thank you!)
## 1.5.1-alpha
### :bug: Bugs fixed
- Fix issue with bitmap image clipboard.
- Fix issue when removing all path points.
- Increase default team invitation token expiration to 48h.
- Fix wrong error message when an expired token is used.
## 1.5.0-alpha
### :sparkles: New features

View file

@ -39,8 +39,8 @@
:opt-un [::uri]))
(defmethod ig/init-key ::reporter
[_ {:keys [receiver] :as cfg}]
(l/info :msg "intializing mattermost error reporter")
[_ {:keys [receiver uri] :as cfg}]
(l/info :msg "intializing mattermost error reporter" :uri uri)
(let [output (a/chan (a/sliding-buffer 128)
(filter #(= (:level %) "error")))]
(receiver :sub output)
@ -63,6 +63,7 @@
(let [uri (:uri cfg)
text (str "Unhandled exception (@channel):\n"
"- detail: " (cfg/get :public-uri) "/dbg/error-by-id/" id "\n"
"- profile-id: `" (:profile-id cdata) "`\n"
"- host: `" host "`\n"
"- version: `" version "`\n"
(when error

View file

@ -309,7 +309,7 @@
team (db/get-by-id conn :team team-id)
itoken (tokens :generate
{:iss :team-invitation
:exp (dt/in-future "6h")
:exp (dt/in-future "48h")
:profile-id (:id profile)
:role role
:team-id team-id

View file

@ -72,18 +72,26 @@
(rx/subs
(fn [tdata]
(handle-token tdata))
(fn [error]
(case (:code error)
:email-already-exists
(fn [{:keys [type code] :as error}]
(cond
(and (= :validation type)
(= :invalid-token code)
(= :token-expired (:reason error)))
(let [msg (tr "errors.token-expired")]
(ts/schedule 100 #(st/emit! (dm/error msg)))
(st/emit! (rt/nav :auth-login)))
(= :email-already-exists code)
(let [msg (tr "errors.email-already-exists")]
(ts/schedule 100 #(st/emit! (dm/error msg)))
(st/emit! (rt/nav :auth-login)))
:email-already-validated
(= :email-already-validated code)
(let [msg (tr "errors.email-already-validated")]
(ts/schedule 100 #(st/emit! (dm/warn msg)))
(st/emit! (rt/nav :auth-login)))
:else
(let [msg (tr "errors.generic")]
(ts/schedule 100 #(st/emit! (dm/error msg)))
(st/emit! (rt/nav :auth-login)))))))))

View file

@ -85,7 +85,8 @@
;; https://tree.taiga.io/project/uxboxproject/issue/1083
;; {:value "viewer" :label (tr "labels.viewer")}]
initial (mf/use-memo (mf/deps team) (constantly {:team-id (:id team)}))
initial (mf/use-memo (mf/deps team) (constantly {:team-id (:id team)
:role "editor"}))
form (fm/use-form :spec ::invite-member-form
:initial initial)
on-success

View file

@ -6,6 +6,7 @@
(ns app.main.ui.onboarding
(:require
[app.config :as cf]
[app.common.spec :as us]
[app.main.data.dashboard :as dd]
[app.main.data.messages :as dm]
@ -38,9 +39,9 @@
[:div.modal-right
[:div.modal-title
[:h2 "Welcome to Penpot!"]]
[:span.release "Alpha version 1.0"]
[:span.release "Alpha version " (:main @cf/version)]
[:div.modal-content
[:p "We are very happy to introduce you to the very first Alpha 1.0 release."]
[:p "We are very happy to introduce you to the very first Alpha release."]
[:p "Penpot is still at development stage and there will be constant updates. We hope you enjoy the first stable version."]]
[:div.modal-navigation
[:button.btn-secondary {:on-click next} "Continue"]]]

View file

@ -535,6 +535,10 @@ msgstr "The registration is currently disabled."
msgid "errors.terms-privacy-agreement-invalid"
msgstr "You must accept our terms of service and privacy policy."
#: src/app/main/ui/auth/verify_token.cljs
msgid "errors.token-expired"
msgstr "Token expired"
#: src/app/main/data/media.cljs, src/app/main/ui/workspace/sidebar/options/menus/exports.cljs, src/app/main/ui/handoff/exports.cljs
msgid "errors.unexpected-error"
msgstr "An unexpected error occurred."
@ -1111,9 +1115,7 @@ msgstr "Verify new email"
#: src/app/main/ui/settings/change_email.cljs
msgid "modals.change-email.info"
msgstr ""
"We'll send you an email to your current email “%s” to verify your "
"identity."
msgstr "We'll send you an email to your current email “%s” to verify your identity."
#: src/app/main/ui/settings/change_email.cljs
msgid "modals.change-email.new-email"
@ -1137,9 +1139,7 @@ msgstr "Yes, delete my account"
#: src/app/main/ui/settings/delete_account.cljs
msgid "modals.delete-account.info"
msgstr ""
"By removing your account youll lose all your current projects and "
"archives."
msgstr "By removing your account youll lose all your current projects and archives."
#: src/app/main/ui/settings/delete_account.cljs
msgid "modals.delete-account.title"

View file

@ -556,6 +556,10 @@ msgstr "El registro está actualmente desactivado."
msgid "errors.terms-privacy-agreement-invalid"
msgstr "Debes aceptar nuestros términos de servicio y política de privacidad."
#: src/app/main/ui/auth/verify_token.cljs
msgid "errors.token-expired"
msgstr "Token expirado"
#: src/app/main/data/media.cljs, src/app/main/ui/workspace/sidebar/options/menus/exports.cljs, src/app/main/ui/handoff/exports.cljs
msgid "errors.unexpected-error"
msgstr "Ha ocurrido un error inesperado."