diff options
author | AJ ONeal <coolaj86@gmail.com> | 2018-10-28 16:46:16 -0600 |
---|---|---|
committer | techknowlogick <hello@techknowlogick.com> | 2018-10-28 18:46:16 -0400 |
commit | b8451190d85af255a94b02cdfdd6d375015b3864 (patch) | |
tree | 19430b0cb6609dbf7904625269aa47a2b8e344b5 /templates | |
parent | a2ee2a3c67304920a968c1c852e43b3dc2d7c3e7 (diff) | |
download | gitea-b8451190d85af255a94b02cdfdd6d375015b3864.tar.gz gitea-b8451190d85af255a94b02cdfdd6d375015b3864.zip |
UX of link account (Step 1) (#5006)
* Show either sign up OR sign in
* disambiguate fresh start from adding recovery options
* use tabs to switch between account link flows
* add active to tab body as well
* changes as per discussion
* handle specific error; fix missing err typo
Diffstat (limited to 'templates')
-rw-r--r-- | templates/user/auth/link_account.tmpl | 32 | ||||
-rw-r--r-- | templates/user/auth/signin_inner.tmpl | 14 | ||||
-rw-r--r-- | templates/user/auth/signup_inner.tmpl | 14 |
3 files changed, 49 insertions, 11 deletions
diff --git a/templates/user/auth/link_account.tmpl b/templates/user/auth/link_account.tmpl index 73aafd6feb..339ca855dd 100644 --- a/templates/user/auth/link_account.tmpl +++ b/templates/user/auth/link_account.tmpl @@ -1,15 +1,33 @@ {{template "base/head" .}} + <div class="user link-account"> <div class="ui middle very relaxed page grid"> <div class="column"> - <p class="large center"> - {{.i18n.Tr "link_account_signin_or_signup"}} - </p> + + <div class="ui tabular menu"> + <!-- TODO handle .ShowRegistrationButton once other login bugs are fixed --> + <div class="item {{if not .user_exists}}active{{end}}" + data-tab="auth-link-signup-tab"> + {{.i18n.Tr "auth.oauth_signup_tab"}} + </div> + <div class="item {{if .user_exists}}active{{end}}" + data-tab="auth-link-signin-tab"> + {{.i18n.Tr "auth.oauth_signin_tab"}} + </div> + </div> + + <div class="ui tab {{if not .user_exists}}active{{end}}" + data-tab="auth-link-signup-tab"> + {{template "user/auth/signup_inner" .}} + </div> + <div class="ui tab {{if .user_exists}}active{{end}}" + data-tab="auth-link-signin-tab"> + <div class="ui user signin container icon"> + {{template "user/auth/signin_inner" .}} + </div> + </div> </div> </div> </div> -<div class="ui user signin container icon"> -{{template "user/auth/signin_inner" .}} -</div> -{{template "user/auth/signup_inner" .}} + {{template "base/footer" .}} diff --git a/templates/user/auth/signin_inner.tmpl b/templates/user/auth/signin_inner.tmpl index 019bda570c..bf1cc055f4 100644 --- a/templates/user/auth/signin_inner.tmpl +++ b/templates/user/auth/signin_inner.tmpl @@ -2,7 +2,11 @@ {{template "base/alert" .}} {{end}} <h4 class="ui top attached header center"> - {{.i18n.Tr "auth.login_userpass"}} + {{if .LinkAccountMode}} + {{.i18n.Tr "auth.oauth_signin_title"}} + {{else}} + {{.i18n.Tr "auth.login_userpass"}} + {{end}} </h4> <div class="ui attached segment"> <form class="ui form" action="{{.SignInLink}}" method="post"> @@ -27,7 +31,13 @@ <div class="inline field"> <label></label> - <button class="ui green button">{{.i18n.Tr "sign_in"}}</button> + <button class="ui green button"> + {{if .LinkAccountMode}} + {{.i18n.Tr "auth.oauth_signin_submit"}} + {{else}} + {{.i18n.Tr "sign_in"}} + {{end}} + </button> <a href="{{AppSubUrl}}/user/forgot_password">{{.i18n.Tr "auth.forgot_password"}}</a> </div> diff --git a/templates/user/auth/signup_inner.tmpl b/templates/user/auth/signup_inner.tmpl index cd969276b9..25b50dad86 100644 --- a/templates/user/auth/signup_inner.tmpl +++ b/templates/user/auth/signup_inner.tmpl @@ -4,7 +4,11 @@ <form class="ui form" action="{{.SignUpLink}}" method="post"> {{.CsrfTokenHtml}} <h3 class="ui top attached header"> - {{.i18n.Tr "sign_up"}} + {{if .LinkAccountMode}} + {{.i18n.Tr "auth.oauth_signup_title"}} + {{else}} + {{.i18n.Tr "sign_up"}} + {{end}} </h3> <div class="ui attached segment"> {{if or (not .LinkAccountMode) (and .LinkAccountMode .LinkAccountModeRegister)}} @@ -47,7 +51,13 @@ <div class="inline field"> <label></label> - <button class="ui green button">{{.i18n.Tr "auth.create_new_account"}}</button> + <button class="ui green button"> + {{if .LinkAccountMode}} + {{.i18n.Tr "auth.oauth_signup_submit"}} + {{else}} + {{.i18n.Tr "auth.create_new_account"}} + {{end}} + </button> </div> {{if not .LinkAccountMode}} |