Anbraten
9c00dda33a
Refactor login page ( #31530 )
...
As requested in
https://github.com/go-gitea/gitea/pull/31504#issuecomment-2196196646 .
This PR refactor the login page:
![Screenshot from 2024-07-04
19-23-10](https://github.com/go-gitea/gitea/assets/6918444/c45700f4-6747-473c-bdee-2156718a7953 )
![Screenshot from 2024-07-04
19-23-21](https://github.com/go-gitea/gitea/assets/6918444/b1bf71cf-85f9-4517-a409-cc6d72e6af8f )
![Screenshot from 2024-06-30
09-35-20](https://github.com/go-gitea/gitea/assets/6918444/728cc37e-0cca-4883-afec-a43663d2c666 )
# Changes
- [x] use separate box for passkey login and go to registration
- [x] move forgot passoword next to password label
- [x] fix password required label `*` and padding
- [x] remove tabs from login page
---------
Co-authored-by: silverwind <me@silverwind.io>
5 months ago
silverwind
68ec9b4859
Migrate margin and padding helpers to tailwind ( #30043 )
...
This will conclude the refactor of 1:1 class replacements to tailwind,
except `gt-hidden`. Commands ran:
```bash
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-0#tw-$1$2-0#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-1#tw-$1$2-0.5#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-2#tw-$1$2-1#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-3#tw-$1$2-2#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-4#tw-$1$2-4#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-5#tw-$1$2-8#g' {web_src/js,templates,routers,services}/**/*
```
8 months ago
silverwind
90a4f9a49e
Migrate `gap` helpers to tailwind ( #30034 )
...
Commands ran:
```sh
perl -p -i -e 's#gt-gap-0#tw-gap-0#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-1#tw-gap-0.5#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-2#tw-gap-1#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-3#tw-gap-2#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-4#tw-gap-4#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-5#tw-gap-8#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-x-0#tw-gap-x-0#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-x-1#tw-gap-x-0.5#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-x-2#tw-gap-x-1#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-x-3#tw-gap-x-2#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-x-4#tw-gap-x-4#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-x-5#tw-gap-x-8#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-y-0#tw-gap-y-0#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-y-1#tw-gap-y-0.5#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-y-2#tw-gap-y-1#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-y-3#tw-gap-y-2#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-y-4#tw-gap-y-4#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-y-5#tw-gap-y-8#g' web_src/js/**/* templates/**/*
8 months ago
silverwind
04f9ad0568
Fix incorrect tailwind migration ( #30007 )
...
Fixes https://github.com/go-gitea/gitea/issues/30005 . Regression from
https://github.com/go-gitea/gitea/pull/29945 .
There was only once instance of `tw-content-center` before that PR, so I
just ran below command and reverted that one instance.
```sh
perl -p -i -e 's#tw-content-center#tw-items-center#g' web_src/js/**/* templates/**/* models/**/* tests/**/*
```
8 months ago
silverwind
f88ad5424f
Replace 10 more gt- classes with tw- ( #29945 )
...
Likely the biggest change of the tailwind refactors. Only thing of note
is that `tw-flex-1` resolves to `flex: 1 1 0%` while our `gt-f1` was
`flex: 1 1 0`, I don't think it will make any difference. Commands I've
ran:
```sh
perl -p -i -e 's#gt-vm#tw-align-middle#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-fw#tw-flex-wrap#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-f1#tw-flex-1#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-fc#tw-flex-col#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-sb#tw-justify-between#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-je#tw-justify-end#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-jc#tw-justify-center#g' web_src/js/**/* templates/**/* models/**/*
perl -p -i -e 's#gt-ac#tw-content-center#g' web_src/js/**/* templates/**/* models/**/* tests/**/*
perl -p -i -e 's#gt-df#tw-flex#g' web_src/js/**/* templates/**/* models/**/* tests/**/*
perl -p -i -e 's#gt-dib#tw-inline-block#g' web_src/js/**/* templates/**/* models/**/* tests/**/*
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
8 months ago
Rafael Heard
c996e35958
Move all login and account creation page labels to be above inputs ( #29432 )
...
There are a few inconsistencies within Gitea and this PR addresses one
of them. This PR updates the sign-in page layout, including the register
and openID tabs, to match the layout of the settings pages
(/user/settings) for more consistency.
This PR updates the following routes:
`/user/login`
`/user/sign_up`
`/user/login/openid`
`/user/forgot_password`
`/user/link_account`
`/user/recover_account`
**Before**
<img width="968" alt="Screenshot 2024-02-05 at 8 27 24 AM"
src="https://github.com/go-gitea/gitea/assets/6152817/fb0cb517-57c0-4eed-be1d-56f36bd1960d ">
**After**
<img width="968" alt="Screenshot 2024-02-05 at 8 26 39 AM"
src="https://github.com/go-gitea/gitea/assets/6152817/428d691d-0a42-4a67-a646-05527f2a7b41 ">
This PR addresses a revert of the original PR due to this
[comment](https://github.com/go-gitea/gitea/pull/28753#issuecomment-1956596817 ).
---------
Co-authored-by: rafh <rafaelheard@gmail.com>
9 months ago
Lunny Xiao
e6e50696b8
Revert #28753 because UI broken. ( #29293 )
...
Revert #29255
Revert #28753
9 months ago
Rafael Heard
1c14cd0c43
move sign in labels to be above inputs ( #28753 )
...
There are a few inconsistencies within Gitea and this PR addresses one of them.
This PR updates the sign-in page layout, including the register and openID tabs,
to match the layout of the settings pages (`/user/settings`) for more consistency.
**Before**
<img width="968" alt="Screenshot 2024-02-05 at 8 27 24 AM"
src="https://github.com/go-gitea/gitea/assets/6152817/fb0cb517-57c0-4eed-be1d-56f36bd1960d ">
**After**
<img width="968" alt="Screenshot 2024-02-05 at 8 26 39 AM"
src="https://github.com/go-gitea/gitea/assets/6152817/428d691d-0a42-4a67-a646-05527f2a7b41 ">
---------
Co-authored-by: rafh <rafaelheard@gmail.com>
9 months ago
Lunny Xiao
61ff91f960
Fix the wrong oauth2 name ( #27993 )
...
Fix #27989
Regression #27798
1 year ago
Lunny Xiao
1bf5527eac
Refactor Find Sources and fix bug when view a user who belongs to an unactive auth source ( #27798 )
...
The steps to reproduce it.
First, create a new oauth2 source.
Then, a user login with this oauth2 source.
Disable the oauth2 source.
Visit users -> settings -> security, 500 will be displayed.
This is because this page only load active Oauth2 sources but not all
Oauth2 sources.
1 year ago
delvh
7960ba7e2b
Always use `ctx.Locale.Tr` inside templates ( #27231 )
1 year ago
silverwind
1b1c55f73f
Increase auth provider icon size on login page ( #27122 )
...
Before, 20px:
<img width="474" alt="Screenshot 2023-09-19 at 00 10 05"
src="https://github.com/go-gitea/gitea/assets/115237/4bed4edb-219d-4844-9d3c-0d747033b09f ">
After, 28px:
<img width="576" alt="Screenshot 2023-09-19 at 00 20 40"
src="https://github.com/go-gitea/gitea/assets/115237/f482ac09-38ae-4c84-80d9-0bd39b7f9772 ">
Dropdown in account settings is unchanged at 20px:
<img width="157" alt="Screenshot 2023-09-19 at 00 09 11"
src="https://github.com/go-gitea/gitea/assets/115237/9c998cdf-eeed-4118-9262-664faaa56092 ">
---------
Co-authored-by: Giteabot <teabot@gitea.io>
1 year ago
silverwind
8099238618
Change green buttons to primary color ( #27099 )
...
I think it's better if the primary actions have primary color instead of
green which fits better into the overall single-color UI design. This PR
currently replaces every green button with primary:
<img width="141" alt="Screenshot 2023-09-16 at 14 07 59"
src="https://github.com/go-gitea/gitea/assets/115237/843c1e50-4fb2-4ec6-84ba-0efb9472dcbe ">
<img width="161" alt="Screenshot 2023-09-16 at 14 07 51"
src="https://github.com/go-gitea/gitea/assets/115237/9442195a-a3b2-4a42-b262-8377d6f5c0d1 ">
Modal actions now use uncolored/primary instead of previous green/red
colors. I also removed the box-shadow on all basic buttons:
<img width="259" alt="Screenshot 2023-09-16 at 14 16 39"
src="https://github.com/go-gitea/gitea/assets/115237/5beea529-127a-44b0-8d4c-afa7b034a490 ">
<img width="261" alt="Screenshot 2023-09-16 at 14 17 42"
src="https://github.com/go-gitea/gitea/assets/115237/4757f7b2-4d46-49bc-a797-38bb28437b88 ">
The change currently includes the "Merge PR" button, for which we might
want to make an exception to match the icon color there:
<img width="442" alt="Screenshot 2023-09-16 at 14 33 53"
src="https://github.com/go-gitea/gitea/assets/115237/993ac1a5-c94d-4895-b76c-0d872181a70b ">
1 year ago
Dmitry Sharshakov
63b53af933
Show OpenID Connect and OAuth on signup page ( #20242 )
...
Fix #19809
---------
Signed-off-by: Dmitry Sharshakov <d3dx12.xx@gmail.com>
Co-authored-by: jackHay22 <jack@allspice.io>
1 year ago
Xinyu Zhou
68e934ab5d
Add option to enable CAPTCHA validation for login ( #21638 )
...
Enable this to require captcha validation for user login. You also must
enable `ENABLE_CAPTCHA`.
Summary:
- Consolidate CAPTCHA template
- add CAPTCHA handle and context
- add `REQUIRE_CAPTCHA_FOR_LOGIN` config and docs
- Consolidate CAPTCHA set-up and verification code
Partially resolved #6049
Signed-off-by: Xinyu Zhou <i@sourcehut.net>
Signed-off-by: Andrew Thornton <art27@cantab.net>
Co-authored-by: Andrew Thornton <art27@cantab.net>
2 years ago
silverwind
647b2649b1
Make sure fmt catches all templates ( #20979 )
...
* Make sure fmt catches all templates
Make's `wildcard` is not recursive so it missed many template files, fix
that by using `find`.
* Update Makefile
2 years ago
Gusted
fad0e7a497
Fix create repository page's help text ( #20810 )
2 years ago
Gusted
58de07e5fd
Add support mCaptcha as captcha provider ( #20458 )
...
https://mcaptcha.org/
Co-authored-by: Felipe Leopoldo Sologuren Gutiérrez <fsologureng@users.noreply.github.com>
2 years ago
Gusted
d55a0b7238
Refactor `i18n` to `locale` ( #20153 )
...
* Refactor `i18n` to `locale`
- Currently we're using the `i18n` variable naming for the `locale`
struct. This contains locale's specific information and cannot be used
for general i18n purpose, therefore refactoring it to `locale` makes
more sense.
- Ref: https://github.com/go-gitea/gitea/pull/20096#discussion_r906699200
* Update routers/install/install.go
2 years ago
Stanley Hu
08ef45b359
Add fluid to ui container class to remove margin ( #16396 )
3 years ago
Lunny Xiao
41c0776568
Fix captcha ( #14488 )
...
Co-authored-by: 6543 <6543@obermui.de>
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago
Norwin
e16b0e5a90
unify layout between auth pages ( #13547 )
...
Co-authored-by: techknowlogick <techknowlogick@gitea.io>
4 years ago
silverwind
1c523e2129
Set appropriate `autocomplete` attributes on password fields ( #13078 )
...
`new-password` prevents annoying autocompletion in some cases, thought
it's not semantically correct to use that for example on all three
fields on the user account page, so some annoyances remain.
Co-authored-by: Lauris BH <lauris@nix.lv>
4 years ago
John Olheiser
72636fd664
hCaptcha Support ( #12594 )
...
* Initial work on hCaptcha
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Use module
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Format
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* At least return and debug log a captcha error
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Pass context to hCaptcha
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Add context to recaptcha
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* fix lint
Signed-off-by: Andrew Thornton <art27@cantab.net>
* Finish hcaptcha
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Update example config
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Apply error fix for recaptcha
Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Change recaptcha ChallengeTS to string
Signed-off-by: jolheiser <john.olheiser@gmail.com>
Co-authored-by: Andrew Thornton <art27@cantab.net>
4 years ago
Tchoupinax
fd9e8951d8
fix: add type=text for user_name (password manager) ( #12250 )
...
* fix: add type=text for user_name (password manager)
* Update templates/user/auth/reset_passwd.tmpl
Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com>
Co-authored-by: jaqra <48099350+jaqra@users.noreply.github.com>
4 years ago
AJ ONeal
62d6127f1b
Make captcha and password optional for external accounts ( #6606 )
5 years ago
AJ ONeal
b8451190d8
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
6 years ago
Fluf
f035dcd4f2
Add Recaptcha functionality to Gitea ( #4044 )
6 years ago
Sandro Santilli
15f5d8e794
Reduce conditionals in signin/signup inner forms
...
by always using SignInLink and SignUpLink in the form action
8 years ago
Willem van Dreumel
01d957677f
Oauth2 consumer ( #679 )
...
* initial stuff for oauth2 login, fails on:
* login button on the signIn page to start the OAuth2 flow and a callback for each provider
Only GitHub is implemented for now
* show login button only when the OAuth2 consumer is configured (and activated)
* create macaron group for oauth2 urls
* prevent net/http in modules (other then oauth2)
* use a new data sessions oauth2 folder for storing the oauth2 session data
* add missing 2FA when this is enabled on the user
* add password option for OAuth2 user , for use with git over http and login to the GUI
* add tip for registering a GitHub OAuth application
* at startup of Gitea register all configured providers and also on adding/deleting of new providers
* custom handling of errors in oauth2 request init + show better tip
* add ExternalLoginUser model and migration script to add it to database
* link a external account to an existing account (still need to handle wrong login and signup) and remove if user is removed
* remove the linked external account from the user his settings
* if user is unknown we allow him to register a new account or link it to some existing account
* sign up with button on signin page (als change OAuth2Provider structure so we can store basic stuff about providers)
* from gorilla/sessions docs:
"Important Note: If you aren't using gorilla/mux, you need to wrap your handlers with context.ClearHandler as or else you will leak memory!"
(we're using gorilla/sessions for storing oauth2 sessions)
* use updated goth lib that now supports getting the OAuth2 user if the AccessToken is still valid instead of re-authenticating (prevent flooding the OAuth2 provider)
8 years ago
Sandro Santilli
ed096186a7
social_register_hepler_msg -> social_register_helper_msg ( #855 )
...
* social_register_hepler_msg -> social_register_helper_msg
* register_hepler_msg -> register_helper_msg
8 years ago
Bwko
1e9730a779
Fixes xss, clickjacking & password autocompletion
8 years ago
Adam Strzelecki
da2585c11e
Indent all templates with tabs
...
This commit improves templates readability, since all of them use consistent
indent with all template command blocks indented too.
1. Indents both HTML containers such as <div>, <p> and Go HTML template blocks
such as {{if}} {{with}}
2. Cleans all trailing white-space
3. Adds trailing last line-break to each file
9 years ago
Unknwon
9d36fc6986
finish new auth e-mails
9 years ago
Unknwon
e4ecbcdf4a
new sign in page
9 years ago
Unknwon
83e747bfda
#697 and #1606 and new admin edit user UI
9 years ago
Unknwon
8e0a69f86a
#697 disable captcha and new admin create user UI
9 years ago
Unknwon
7ba9257a7f
Add suburl support
10 years ago
Martin van Beurden
0055cbd365
Allow Gogs to run from a suburl behind a reverse proxy. e.g. http://mydomain.com/gogs/
...
Conflicts:
modules/setting/setting.go
Conflicts:
templates/repo/release/list.tmpl
templates/user/dashboard/dashboard.tmpl
Conflicts:
routers/repo/setting.go
10 years ago
Unknwon
8829174574
Finish new admin users pages
10 years ago
Unknwon
bba707de36
Finish team list, create new team, join/leave team page
10 years ago
Unknwon
7af7584d25
Finish new reset password, etc.
10 years ago
Unknwon
78defd238c
Page: Manage social accounts
10 years ago
Unknwon
7bbf644dd5
Convert captcha, cache, csrf as middlewares
10 years ago
Unknwon
9813161411
Reser repo owner to organization when error occurs in repo create page, dashboard news feed page, create organization page
10 years ago
Unknwon
8dd07c0ddd
New UI merge in progress
10 years ago
Unknown
bbdfe25769
User code clean and ui improve
11 years ago
Bryan Johnson
34d18a19a3
Minor grammatical fix for Disable Registration feature
11 years ago
twitchyliquid64
d304a23787
Corrected grammar and spelling mistakes in templates. Normalizing to American English.
11 years ago
Unknown
4b9b8024ba
Clean oauth code
11 years ago