From 140731cf34abaab509f6712cbd9b7d1eaa175028 Mon Sep 17 00:00:00 2001 From: Eva Date: Tue, 2 Aug 2022 08:30:07 +0200 Subject: [PATCH 1/2] :bug: Change default team image in config --- CHANGES.md | 1 + frontend/src/app/main/ui/dashboard/team.cljs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGES.md b/CHANGES.md index 1a9713d0a..503122579 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -33,6 +33,7 @@ ### :bug: Bugs fixed +- Fix team default image [Taiga #3919](https://tree.taiga.io/project/penpot/issue/3919) - Fix problem with group coordinates [#2008](https://github.com/penpot/penpot/issues/2008) - Fix problem with line-height and texts [Taiga #3578](https://tree.taiga.io/project/penpot/issue/3578) - Fix moving frame-guides outside frames [Taiga #3839](https://tree.taiga.io/project/penpot/issue/3839) diff --git a/frontend/src/app/main/ui/dashboard/team.cljs b/frontend/src/app/main/ui/dashboard/team.cljs index 4281a8219..b0fa09980 100644 --- a/frontend/src/app/main/ui/dashboard/team.cljs +++ b/frontend/src/app/main/ui/dashboard/team.cljs @@ -605,7 +605,7 @@ [:div.label (tr "dashboard.team-info")] [:div.name (:name team)] [:div.icon - [:span.update-overlay {:on-click on-image-click} i/exit] + [:span.update-overlay {:on-click on-image-click} i/image] [:img {:src (cfg/resolve-team-photo-url team)}] [:& file-uploader {:accept "image/jpeg,image/png" :multi false From 8795e134c15ecf8a7ca459b9d2c54e5d56a0c409 Mon Sep 17 00:00:00 2001 From: Eva Date: Wed, 3 Aug 2022 09:23:36 +0200 Subject: [PATCH 2/2] :bug: Fix intro action in multi input --- CHANGES.md | 1 + frontend/src/app/main/ui/components/forms.cljs | 9 ++++++--- frontend/src/app/main/ui/dashboard/team.cljs | 3 ++- frontend/src/app/main/ui/onboarding/team_choice.cljs | 3 ++- 4 files changed, 11 insertions(+), 5 deletions(-) diff --git a/CHANGES.md b/CHANGES.md index 503122579..683ca998a 100644 --- a/CHANGES.md +++ b/CHANGES.md @@ -33,6 +33,7 @@ ### :bug: Bugs fixed +- Fix intro action in multi input [Taiga #3541](https://tree.taiga.io/project/penpot/issue/3541) - Fix team default image [Taiga #3919](https://tree.taiga.io/project/penpot/issue/3919) - Fix problem with group coordinates [#2008](https://github.com/penpot/penpot/issues/2008) - Fix problem with line-height and texts [Taiga #3578](https://tree.taiga.io/project/penpot/issue/3578) diff --git a/frontend/src/app/main/ui/components/forms.cljs b/frontend/src/app/main/ui/components/forms.cljs index 8b4723a28..24720a645 100644 --- a/frontend/src/app/main/ui/components/forms.cljs +++ b/frontend/src/app/main/ui/components/forms.cljs @@ -243,7 +243,7 @@ (into [] (distinct) (conj coll item))) (mf/defc multi-input - [{:keys [form label class name trim valid-item-fn] :as props}] + [{:keys [form label class name trim valid-item-fn on-submit] :as props}] (let [form (or form (mf/use-ctx form-ctx)) input-name (get props :name) touched? (get-in @form [:touched input-name]) @@ -297,8 +297,11 @@ (dom/prevent-default event) (dom/stop-propagation event) (let [val (cond-> @value trim str/trim)] - (reset! value "") - (swap! items conj-dedup {:text val :valid (valid-item-fn val)}))) + (when (and (kbd/enter? event) (str/empty? @value) (not-empty @items)) + (on-submit form)) + (when (not (str/empty? @value)) + (reset! value "") + (swap! items conj-dedup {:text val :valid (valid-item-fn val)})))) (and (kbd/backspace? event) (str/empty? @value)) diff --git a/frontend/src/app/main/ui/dashboard/team.cljs b/frontend/src/app/main/ui/dashboard/team.cljs index b0fa09980..98c92857f 100644 --- a/frontend/src/app/main/ui/dashboard/team.cljs +++ b/frontend/src/app/main/ui/dashboard/team.cljs @@ -142,7 +142,8 @@ :auto-focus? true :trim true :valid-item-fn us/parse-email - :label (tr "modals.invite-member.emails")}] + :label (tr "modals.invite-member.emails") + :on-submit on-submit}] [:& fm/select {:name :role :options roles}]] [:div.action-buttons diff --git a/frontend/src/app/main/ui/onboarding/team_choice.cljs b/frontend/src/app/main/ui/onboarding/team_choice.cljs index 43c62616a..2247fe9e3 100644 --- a/frontend/src/app/main/ui/onboarding/team_choice.cljs +++ b/frontend/src/app/main/ui/onboarding/team_choice.cljs @@ -171,7 +171,8 @@ :auto-focus? true :trim true :valid-item-fn us/parse-email - :label (tr "modals.invite-member.emails")}] + :label (tr "modals.invite-member.emails") + :on-submit on-submit}] [:& fm/select {:name :role :options roles}]] [:div.buttons