0
Fork 0
mirror of https://github.com/penpot/penpot.git synced 2025-02-24 07:46:13 -05:00

🎉 Add 3rd party auth buttons to register page.

This commit is contained in:
Andrey Antukh 2021-02-03 17:45:45 +01:00 committed by Hirunatan
parent e182cc4028
commit 53be7feee1
2 changed files with 28 additions and 6 deletions

View file

@ -107,6 +107,7 @@
[:& fm/submit-button
{:label (tr "auth.login-submit")
:on-click on-submit}]
(when cfg/login-with-ldap
[:& fm/submit-button
{:label (tr "auth.login-with-ldap-submit")

View file

@ -18,6 +18,7 @@
[app.main.ui.components.forms :as fm]
[app.main.ui.icons :as i]
[app.main.ui.messages :as msgs]
[app.main.ui.auth.login :as login]
[app.util.dom :as dom]
[app.util.i18n :refer [tr t]]
[app.util.router :as rt]
@ -130,9 +131,29 @@
:tab-index "4"}
(t locale "auth.login-here")]]
(when cfg/allow-demo-users
[:div.link-entry
[:span (t locale "auth.create-demo-profile") " "]
[:a {:on-click #(st/emit! da/create-demo-profile)
:tab-index "5"}
(t locale "auth.create-demo-account")]])]])
(when cfg/allow-demo-users
[:div.link-entry
[:span (t locale "auth.create-demo-profile") " "]
[:a {:on-click #(st/emit! da/create-demo-profile)
:tab-index "5"}
(t locale "auth.create-demo-account")]])]
(when cfg/google-client-id
[:a.btn-ocean.btn-large.btn-google-auth
{:on-click login/login-with-google}
"Login with Google"])
(when cfg/gitlab-client-id
[:a.btn-ocean.btn-large.btn-gitlab-auth
{:on-click login/login-with-gitlab}
[:img.logo
{:src "/images/icons/brand-gitlab.svg"}]
(tr "auth.login-with-gitlab-submit")])
(when cfg/github-client-id
[:a.btn-ocean.btn-large.btn-github-auth
{:on-click login/login-with-github}
[:img.logo
{:src "/images/icons/brand-github.svg"}]
(tr "auth.login-with-github-submit")])])