From 0058453fd92748d20eb1562fcea5871cec4c4f5a Mon Sep 17 00:00:00 2001 From: Giteabot Date: Fri, 9 Jun 2023 06:59:18 -0400 Subject: [PATCH] Modify OAuth login ui and fix display name, iconurl related logic (#25030) (#25161) Backport #25030 by @HesterG Close #24808 Co-Authour @wxiaoguang @silverwind 1. Most svgs are found from https://worldvectorlogo.com/ , and some are from conversion of png to svg. (facebook and nextcloud). And also changed `templates/user/settings/security/accountlinks.tmpl`. 2. Fixed display name and iconurl related logic # After Screen Shot 2023-06-05 at 14 09 05 On mobile Screen Shot 2023-06-05 at 14 09 46 user/settings/security/accountlinks (The dropdown might be improved later) Screen Shot 2023-06-01 at 10 01 44 Co-authored-by: HesterG Co-authored-by: silverwind Co-authored-by: wxiaoguang --- options/locale/locale_en-US.ini | 3 +- public/img/auth/azuread.png | Bin 3099 -> 0 bytes public/img/auth/azuread.svg | 1 + public/img/auth/azureadv2.png | Bin 3099 -> 0 bytes public/img/auth/azureadv2.svg | 1 + public/img/auth/bitbucket.png | Bin 2161 -> 0 bytes public/img/auth/bitbucket.svg | 1 + public/img/auth/discord.png | Bin 1559 -> 0 bytes public/img/auth/discord.svg | 1 + public/img/auth/dropbox.png | Bin 1424 -> 0 bytes public/img/auth/dropbox.svg | 1 + public/img/auth/facebook.png | Bin 2088 -> 0 bytes public/img/auth/facebook.svg | 1 + public/img/auth/gitea.png | Bin 5576 -> 0 bytes public/img/auth/gitea.svg | 1 + public/img/auth/github.png | Bin 1151 -> 0 bytes public/img/auth/github.svg | 1 + public/img/auth/gitlab.png | Bin 3616 -> 0 bytes public/img/auth/gitlab.svg | 1 + public/img/auth/google.png | Bin 1622 -> 0 bytes public/img/auth/google.svg | 1 + public/img/auth/mastodon.png | Bin 5112 -> 0 bytes public/img/auth/mastodon.svg | 1 + public/img/auth/microsoftonline.png | Bin 792 -> 0 bytes public/img/auth/microsoftonline.svg | 1 + public/img/auth/nextcloud.png | Bin 2918 -> 0 bytes public/img/auth/nextcloud.svg | 1 + public/img/auth/openid_connect.svg | 1 - public/img/auth/twitter.png | Bin 2709 -> 0 bytes public/img/auth/twitter.svg | 1 + public/img/auth/yandex.png | Bin 826 -> 0 bytes public/img/auth/yandex.svg | 1 + services/auth/signin.go | 2 +- services/auth/source/oauth2/providers.go | 44 ++-- services/auth/source/oauth2/providers_base.go | 15 +- .../auth/source/oauth2/providers_custom.go | 2 +- .../auth/source/oauth2/providers_openid.go | 8 +- .../auth/source/oauth2/providers_simple.go | 6 +- templates/user/auth/signin_inner.tmpl | 28 +-- .../user/settings/security/accountlinks.tmpl | 2 +- web_src/css/base.css | 4 + web_src/css/form.css | 6 +- web_src/fomantic/_site/globals/site.variables | 1 + web_src/fomantic/build/semantic.css | 213 ------------------ 44 files changed, 80 insertions(+), 270 deletions(-) delete mode 100644 public/img/auth/azuread.png create mode 100644 public/img/auth/azuread.svg delete mode 100644 public/img/auth/azureadv2.png create mode 100644 public/img/auth/azureadv2.svg delete mode 100644 public/img/auth/bitbucket.png create mode 100644 public/img/auth/bitbucket.svg delete mode 100644 public/img/auth/discord.png create mode 100644 public/img/auth/discord.svg delete mode 100644 public/img/auth/dropbox.png create mode 100644 public/img/auth/dropbox.svg delete mode 100644 public/img/auth/facebook.png create mode 100644 public/img/auth/facebook.svg delete mode 100644 public/img/auth/gitea.png create mode 100644 public/img/auth/gitea.svg delete mode 100644 public/img/auth/github.png create mode 100644 public/img/auth/github.svg delete mode 100644 public/img/auth/gitlab.png create mode 100644 public/img/auth/gitlab.svg delete mode 100644 public/img/auth/google.png create mode 100644 public/img/auth/google.svg delete mode 100644 public/img/auth/mastodon.png create mode 100644 public/img/auth/mastodon.svg delete mode 100644 public/img/auth/microsoftonline.png create mode 100644 public/img/auth/microsoftonline.svg delete mode 100644 public/img/auth/nextcloud.png create mode 100644 public/img/auth/nextcloud.svg delete mode 100644 public/img/auth/openid_connect.svg delete mode 100644 public/img/auth/twitter.png create mode 100644 public/img/auth/twitter.svg delete mode 100644 public/img/auth/yandex.png create mode 100644 public/img/auth/yandex.svg diff --git a/options/locale/locale_en-US.ini b/options/locale/locale_en-US.ini index 195252c47d..9528708623 100644 --- a/options/locale/locale_en-US.ini +++ b/options/locale/locale_en-US.ini @@ -4,7 +4,8 @@ explore = Explore help = Help logo = Logo sign_in = Sign In -sign_in_with = Sign In With +sign_in_with_provider = Sign in with %s +sign_in_or = or sign_out = Sign Out sign_up = Register link_account = Link Account diff --git a/public/img/auth/azuread.png b/public/img/auth/azuread.png deleted file mode 100644 index 1adbf15e28a0da8e8001a97790da0ad234e2b48a..0000000000000000000000000000000000000000 GIT binary patch literal 0 HcmV?d00001 literal 3099 zcmV+$4CM2PP)QW3UpbYT_V*|T~!`J0tf+A zpxSn+t*@oa+7??{d_k2$Z3XHB#DF{mA5eL!C^V3SBt{a5iWU_Fg^&PAW+pSq%$+;; zoZTOp2{)6O%w!(PkGlWNntjjX+uzw|pMCbd!1waK^qIVWj7)uvLF%iCcM+u=F{mes zYTKUeD-1v%5>RVH^*Ih}$!T@|`XlZ+eTAb>2v};Tork@+0sy=!v9eR@rj4JsUDp>_ zdYyn(E%ao$2h+5=7O&9NoE4>S9BCcc+jx4FfVEDVR^rA&5#m{$lUu&9(UHwxkg+#0 z^%?=|o%F*B58m+*ShzM{HS?U4PWMN>g$d{-0=C&Hz1EAGCJsZSw$%;3Q7_cE-|h`u zKraxmfJmwpIQ*>-{iE$uep;FR>L+c_BokLal1@OX1A9O7Vt7yb2m;DZsgJMy%snev zxB`+?0#-QaAC(@AkEO4y604|F-%R%Lm^1>`w$Pnr9y~^IjNy=luBJhhY(4JEO&G8s zNeTg*T4`jNj16);*8AnOlc!YIA!)~B!U@>iLYW8MD7SOy;u(hs5JV6}INGG<9(S}= zBnqQe5=y`VBI$^V+V51P#yW=9a3X++Kt!lIqg=b}VC!3n#0w;t0E->vN4&Twmc9h| zjlN)bI}sNM+4rq?&Pz3}g^9$RFaln-)AA}A*Y~s^!N1CaI<3A4;R&1*iccy}79Doo zo+#W2Az-zG9w?FV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