From 94d94684c80036d16bf661d59ae23f9008049479 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 6 May 2021 17:25:13 +0200 Subject: [PATCH 1/7] :paperclip: Minor logging change on mattermost ns. --- backend/src/app/loggers/mattermost.clj | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/backend/src/app/loggers/mattermost.clj b/backend/src/app/loggers/mattermost.clj index 6b2c7dc8cb..fca570962a 100644 --- a/backend/src/app/loggers/mattermost.clj +++ b/backend/src/app/loggers/mattermost.clj @@ -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) From 2138530f3ee7152514b89efd90e4cd22ca0efd47 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 6 May 2021 17:25:40 +0200 Subject: [PATCH 2/7] :tada: Add `profile-id` on mattermost error reporter. --- backend/src/app/loggers/mattermost.clj | 1 + 1 file changed, 1 insertion(+) diff --git a/backend/src/app/loggers/mattermost.clj b/backend/src/app/loggers/mattermost.clj index fca570962a..ec5d8b52e3 100644 --- a/backend/src/app/loggers/mattermost.clj +++ b/backend/src/app/loggers/mattermost.clj @@ -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 From d2f8d4a306602f560fbee6ecf5567c01943e271a Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 6 May 2021 17:26:08 +0200 Subject: [PATCH 3/7] :sparkles: Increase default team invitation token expiration. --- backend/src/app/rpc/mutations/teams.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/backend/src/app/rpc/mutations/teams.clj b/backend/src/app/rpc/mutations/teams.clj index 701833162f..c545d52b87 100644 --- a/backend/src/app/rpc/mutations/teams.clj +++ b/backend/src/app/rpc/mutations/teams.clj @@ -307,7 +307,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 From e98b88f673cd637fe2a741894c2bd3b2fd143bf1 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 6 May 2021 17:26:51 +0200 Subject: [PATCH 4/7] :sparkles: Set default role on invitation modal. Just a quality of life improvement. --- frontend/src/app/main/ui/dashboard/team.cljs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/frontend/src/app/main/ui/dashboard/team.cljs b/frontend/src/app/main/ui/dashboard/team.cljs index d1126444ed..64eed4beef 100644 --- a/frontend/src/app/main/ui/dashboard/team.cljs +++ b/frontend/src/app/main/ui/dashboard/team.cljs @@ -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 From 8a8403834f362fd341f526430b21457cf786d9c8 Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 6 May 2021 17:27:50 +0200 Subject: [PATCH 5/7] :lipstick: Cosmetic change on onboarding modal. --- frontend/src/app/main/ui/onboarding.cljs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/frontend/src/app/main/ui/onboarding.cljs b/frontend/src/app/main/ui/onboarding.cljs index 963e0cae36..a14f22a9fa 100644 --- a/frontend/src/app/main/ui/onboarding.cljs +++ b/frontend/src/app/main/ui/onboarding.cljs @@ -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"]]] From 2d75efbacef306f821a468e22c46082d46bc514f Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 6 May 2021 17:41:42 +0200 Subject: [PATCH 6/7] :bug: Add correct error mesage when using an expired token. --- .../src/app/main/ui/auth/verify_token.cljs | 16 ++++++-- frontend/translations/en.po | 37 +++++++------------ frontend/translations/es.po | 4 ++ 3 files changed, 30 insertions(+), 27 deletions(-) diff --git a/frontend/src/app/main/ui/auth/verify_token.cljs b/frontend/src/app/main/ui/auth/verify_token.cljs index a926cf85b9..b24521f099 100644 --- a/frontend/src/app/main/ui/auth/verify_token.cljs +++ b/frontend/src/app/main/ui/auth/verify_token.cljs @@ -74,18 +74,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))))))))) diff --git a/frontend/translations/en.po b/frontend/translations/en.po index eb0eee9d93..6fb62455c4 100644 --- a/frontend/translations/en.po +++ b/frontend/translations/en.po @@ -1,25 +1,16 @@ -# SOME DESCRIPTIVE TITLE. -# Copyright (C) YEAR Free Software Foundation, Inc. -# FIRST AUTHOR , YEAR. -# -#, fuzzy msgid "" msgstr "" -"Project-Id-Version: PACKAGE VERSION\n" -"PO-Revision-Date: 2021-04-22 13:43+0200\n" -"Last-Translator: FULL NAME \n" -"Language-Team: LANGUAGE \n" +"PO-Revision-Date: 2021-04-14 13:44+0000\n" +"Last-Translator: Andrés Moya \n" +"Language-Team: English " +"\n" +"Language: en\n" "MIME-Version: 1.0\n" -"Content-Type: text/plain; charset=iso-8859-1\n" +"Content-Type: text/plain; charset=utf-8\n" "Content-Transfer-Encoding: 8bit\n" +"Plural-Forms: nplurals=2; plural=n != 1;\n" +"X-Generator: Weblate 4.6-dev\n" -# ~ msgid "" -# ~ msgstr "" -# ~ "Language: en\n" -# ~ "MIME-Version: 1.0\n" -# ~ "Content-Type: text/plain; charset=utf-8\n" -# ~ "Content-Transfer-Encoding: 8bit\n" -# ~ "Plural-Forms: nplurals=2; plural=(n != 1);\n" #: src/app/main/ui/auth/register.cljs msgid "auth.already-have-account" msgstr "Already have an account?" @@ -492,6 +483,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." @@ -1068,9 +1063,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" @@ -1094,9 +1087,7 @@ msgstr "Yes, delete my account" #: src/app/main/ui/settings/delete_account.cljs msgid "modals.delete-account.info" -msgstr "" -"By removing your account you’ll lose all your current projects and " -"archives." +msgstr "By removing your account you’ll lose all your current projects and archives." #: src/app/main/ui/settings/delete_account.cljs msgid "modals.delete-account.title" diff --git a/frontend/translations/es.po b/frontend/translations/es.po index 46bacd4eb2..44078530f1 100644 --- a/frontend/translations/es.po +++ b/frontend/translations/es.po @@ -494,6 +494,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." From 39066bfee3d23c8ae012b5fb53cb05d91bff955d Mon Sep 17 00:00:00 2001 From: Andrey Antukh Date: Thu, 6 May 2021 18:05:25 +0200 Subject: [PATCH 7/7] :books: Update changelog. --- CHANGES.md | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/CHANGES.md b/CHANGES.md index d45f28d5c1..2cbb124c32 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -9,6 +9,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