diff --git a/backend/resources/app/onboarding.edn b/backend/resources/app/onboarding.edn index 3a94d29ed..20c9f9fc3 100644 --- a/backend/resources/app/onboarding.edn +++ b/backend/resources/app/onboarding.edn @@ -30,4 +30,10 @@ :file-uri "https://github.com/penpot/penpot-files/raw/binary-files/Open-Color-Scheme.penpot"} {:id "flex-layout-playground" :name "Flex Layout Playground" - :file-uri "https://github.com/penpot/penpot-files/raw/binary-files/Flex-Layout-Playground.penpot"}] + :file-uri "https://github.com/penpot/penpot-files/raw/binary-files/Flex-Layout-Playground.penpot"} + {:id "prototype-examples" + :name "Prototipe template" + :file-uri "https://github.com/penpot/penpot-files/raw/binary-files/prototype-examples.penpot"} + {:id "penpot-design-system" + :name "Design system example" + :file-uri "https://github.com/penpot/penpot-files/raw/binary-files/Penpot-Design-system.penpot"}] diff --git a/backend/src/app/auth/oidc.clj b/backend/src/app/auth/oidc.clj index 69f7eb7d0..5b34ca10a 100644 --- a/backend/src/app/auth/oidc.clj +++ b/backend/src/app/auth/oidc.clj @@ -420,12 +420,6 @@ (defn- get-info [{:keys [::provider ::setup/props] :as cfg} {:keys [params] :as request}] - (when-let [error (get params :error)] - (ex/raise :type :internal - :code :error-on-retrieving-code - :error-id error - :error-desc (get params :error_description))) - (let [state (get params :state) code (get params :code) state (tokens/verify props {:token state :iss :oauth}) @@ -609,9 +603,11 @@ (defn- callback-handler [cfg request] (try - (let [info (get-info cfg request) - profile (get-profile cfg info)] - (process-callback cfg request info profile)) + (if-let [error (dm/get-in request [:params :error])] + (redirect-with-error "unable-to-auth" error) + (let [info (get-info cfg request) + profile (get-profile cfg info)] + (process-callback cfg request info profile))) (catch Throwable cause (l/err :hint "error on oauth process" :cause cause) (redirect-with-error "unable-to-auth" (ex-message cause))))) diff --git a/frontend/resources/images/thumbnails/template-prototype-examples.jpg b/frontend/resources/images/thumbnails/template-prototype-examples.jpg new file mode 100644 index 000000000..5e5d4dab4 Binary files /dev/null and b/frontend/resources/images/thumbnails/template-prototype-examples.jpg differ diff --git a/frontend/src/app/main/data/dashboard.cljs b/frontend/src/app/main/data/dashboard.cljs index 6e5e53d1a..02fb05be4 100644 --- a/frontend/src/app/main/data/dashboard.cljs +++ b/frontend/src/app/main/data/dashboard.cljs @@ -299,7 +299,19 @@ (ptk/reify ::libraries-fetched ptk/UpdateEvent (update [_ state] - (assoc state :builtin-templates libraries)))) + (let [templates-a-b-test? (cf/external-feature-flag "dashboard-01" "test") + remove-ids (if templates-a-b-test? + #{"wireframing-kit" "prototype-examples" "plants-app" "penpot-design-system"} + #{"prototype-examples" "penpot-design-system"}) + libraries (cond->> libraries + :always + (remove #(contains? remove-ids (:id %))) + templates-a-b-test? + (concat [{:id "wireframing-kit", :name "Wireframe library"} + {:id "prototype-examples", :name "Prototype template"} + {:id "plants-app", :name "UI mockup example"} + {:id "penpot-design-system", :name "Design system example"}]))] + (assoc state :builtin-templates libraries))))) (defn fetch-builtin-templates [] diff --git a/frontend/src/app/main/data/users.cljs b/frontend/src/app/main/data/users.cljs index 967c00c57..0d6461979 100644 --- a/frontend/src/app/main/data/users.cljs +++ b/frontend/src/app/main/data/users.cljs @@ -695,15 +695,20 @@ (ptk/reify ::show-redirect-error ptk/WatchEvent (watch [_ _ _] - (let [hint (case error - "registration-disabled" - (tr "errors.registration-disabled") - "profile-blocked" - (tr "errors.profile-blocked") - "auth-provider-not-allowed" - (tr "errors.auth-provider-not-allowed") - "email-domain-not-allowed" - (tr "errors.email-domain-not-allowed") - :else - (tr "errors.generic"))] + (when-let [hint (case error + "registration-disabled" + (tr "errors.registration-disabled") + "profile-blocked" + (tr "errors.profile-blocked") + "auth-provider-not-allowed" + (tr "errors.auth-provider-not-allowed") + "email-domain-not-allowed" + (tr "errors.email-domain-not-allowed") + + ;; We explicitly do not show any error here, it a explicit user operation. + "unable-to-auth" + nil + + (tr "errors.generic"))] + (rx/of (msg/warn hint))))))