Commit Graph

476 Commits

Author SHA1 Message Date
nubenum 756eafaaf6 Fix some issues with special chars in branch names (#3767)
Signed-off-by: Robin Durner <github@nubenum.de>
2018-09-17 01:28:23 +03:00
Lanre Adelowo 126ba796dc Force user to change password (#4489)
* redirect to login page after successfully activating account

* force users to change password if account was created by an admin

* force users to change password if account was created by an admin

* fixed build

* fixed build

* fix pending issues with translation and wrong routes

* make sure path check is safe

* remove unneccessary newline

* make sure users that don't have to view the form get redirected

* move route to use /settings prefix so as to make sure unauthenticated users can't view the page

* update as per @lafriks review

* add necessary comment

* remove unrelated changes

* support redirecting to location the user actually want to go to before being forced to change his/her password

* run make fmt

* added tests

* improve assertions

* add assertion

* fix copyright year

Signed-off-by: Lanre Adelowo <yo@lanre.wtf>
2018-09-13 15:04:25 +03:00
Lauris BH fa4663e61e Add push webhook support for mirrored repositories (#4127) 2018-09-06 22:06:09 -04:00
SagePtr a4fa6bbc89 Hide org/create menu item in Dashboard if user has no rights (#4678) (#4680) 2018-08-12 20:16:10 +03:00
Guido Diepen 7c943b1cad Implemented hover text showing user FullName (#4261)
For each action that is displayed in either the public activity overview
of a user, or in the dashboard overview, the link to the username is now
extended with a title attribute to show the FullName as hover text

Signed-off-by: Guido Diepen <site-github@guidodiepen.nl>
2018-07-05 19:48:18 +02:00
Fluf f035dcd4f2 Add Recaptcha functionality to Gitea (#4044) 2018-07-05 00:13:05 -04:00
cezar97 51ba3df5ff Add `noreferrer` to rel='noopener` for <a> tags (#4328) 2018-07-03 19:52:36 -04:00
Alexey Terentyev b908ac9fab Added repository search ordered by stars or forks. Forks column in admin repo list. (#3969)
* Added repository search order by stars or forks.
Added Forks column to admin repository list.

Signed-off-by: Alexey Terentyev <axifnx@gmail.com>

* Renamed search repo template

Signed-off-by: Alexey Terentyev <axifnx@gmail.com>
2018-05-24 09:03:42 +08:00
Jonas Franz 951309f76a Add support for FIDO U2F (#3971)
* Add support for U2F

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add vendor library
Add missing translations

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Minor improvements

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add U2F support for Firefox, Chrome (Android) by introducing a custom JS library
Add U2F error handling

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add U2F login page to OAuth

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Move U2F user settings to a separate file

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add unit tests for u2f model
Renamed u2f table name

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix problems caused by refactoring

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add U2F documentation

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Remove not needed console.log-s

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add default values to app.ini.sample
Add FIDO U2F to comparison

Signed-off-by: Jonas Franz <info@jonasfranz.software>
2018-05-19 17:12:37 +03:00
David Schneiderbauer 0857e289d5 fix links to prevent 404 after e.g. submitting a faulty form (#3982) 2018-05-18 21:02:04 -04:00
David Schneiderbauer 80d1998981 add missing token validation and fix missing alert on application settings page (#3976) 2018-05-16 22:18:13 +08:00
David Schneiderbauer e45331d6d2 add user language value to hidden input to enable saving of profile without changing language (#3967) 2018-05-15 17:14:40 +03:00
David Schneiderbauer 099372d76c Refactor User Settings (#3900)
* moved avatar to profile page

* combined password change, email and account deletion into account settings page

* combined totp, access tokens, linked accounts and openid into security settings page

* move access tokens to applications settings page

* small change to restart drone build

* fix change avatar url on profile page

* redirect old settings urls to new ones

* enforce only one autofocus attribute on settings pages

* set correct redirect status code

* fmt fix
2018-05-15 13:07:32 +03:00
kolaente 1fdf560678 Added user language setting (#3875)
* Added user language setting

* Added translation string for setting

* Fixed import order + typo

* improved checking if the user has a language saved in the db

* The current saved language is now set a default inside the dropdown

* fmt

* When a user signs in and doesn't have a language saved, the current browser language is saved

* updated gitea-sdk

* Merge branch 'master' of https://github.com/go-gitea/gitea into save-user-language

# Conflicts:
#	models/migrations/migrations.go
#	models/migrations/v62.go

* Made tests work again

* trigger CI

* trigger CI

* fmt

* re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO

* re-trigger that FUCKING CI SO IT REALLY PICKS UP THE LATEST COMMIT ISTEAD OF PREDENDING TO DO SO

* When loggin in, only the language col gets updated instead of everything
2018-05-05 08:28:30 +08:00
Morgan Bazalgette fb8535e305 Make Generate New Token panel shown by default (#3832)
This is mostly a 'feel' change. The behaviour that is currently on the
access tokens pages is, as far as I know, not present in any other parts
of the frontend, and there's no real good reason to keep the 'Generate
New Token' panel hidden by default in my opinion.
2018-04-29 22:34:59 +03:00
Jonas Franz 8d5f58d834 Shows total tracked time in issue and milestone list (#3341)
* Show total tracked time in issue and milestone list
Show total tracked time at issue page

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Optimizing TotalTimes by using SumInt

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fixing wrong total times for milestones caused by a missing JOIN
Adding unit tests for total times

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Logging error instead of ignoring it

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Correcting spelling mistakes

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Change error message to a short version

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add error handling to TotalTimes
Add variable for totalTimes

Signed-off-by: Jonas Franz <info@jonasfranz.de>

* Introduce TotalTrackedTimes as variable of issue
Load TotalTrackedTimes by loading attributes of IssueList
Load TotalTrackedTimes by loading attributes of single issue
Add Sec2Time as helper to use it in templates

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fixed test + gofmt

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Load TotalTrackedTimes via MilestoneList instead of single requests

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add documentation for MilestoneList

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Add documentation for MilestoneList

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix test

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Change comment from SQL query to description

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix unit test by using int64 instead of int

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix unit test by using int64 instead of int

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Check if timetracker is enabled

Signed-off-by: Jonas Franz <info@jonasfranz.software>

* Fix test by enabling timetracking

Signed-off-by: Jonas Franz <info@jonasfranz.de>
2018-04-29 13:58:47 +08:00
Rodrigo Villablanca Vásquez f6013d5098 Some small template fixes (#3820) 2018-04-20 08:25:15 +08:00
Gerben 2dc6f15eca Don't warn users about *every* dirty form (#3707)
The choice regarding which forms should or should not trigger a warning
is subjective. I tried to be consistent and not warn about forms that:
 - run an action, rather than edit data: search, send an email.
 - delete data: a warning about losing data would be confusing

Note that forms on sign-in pages were already ignored (using a selector,
rather than an explicit class on the form element).

Fixes #3698.
2018-03-23 22:10:42 +08:00
Lauris BH c0d41b1b77 Add label descriptions (#3662)
* Add label descriptions

* Add default descriptions to label template
2018-03-13 10:03:55 +08:00
Lunny Xiao 769ab1e424 fix gpg expired bug when time is zero (#3584) 2018-02-26 12:25:45 +02:00
modmew8 ffd0062438 Fix checklist padding (#3460)
* Changed style of checklist in issuelist.

* Adjusted padding for progressbar, updated index.css.

* Fixed another wrong tab to spaces.

Signed-off-by: modmew8 <modmew8@gmail.com>
2018-02-06 12:22:31 +02:00
Lauris BH f9a5cc4d8e
Use correct transaltion key for delete email button (#3422) 2018-01-31 00:31:06 +02:00
modmew8 d996da6bab Added progressbar for issues (#1146). (#3171)
* Added progressbar for issues (#1146).

* Updated the generated index.css.

Signed-off-by: modmew8 <modmew8@gmail.com>

* Removed stored progress percentage and changed it to css calc. Also added the issue task progress to the user/dashboard/issues.

Signed-off-by: modmew8 <modmew8@gmail.com>

* Removed unnecessary blanks.

Signed-off-by: modmew8 <modmew8@gmail.com>

* Formatted the files correctly, fmt-check terminates now without errors.

Signed-off-by: modmew8 <modmew8@gmail.com>

* Removed variables, made computing the tasks on demand with precompiled regexp.

Signed-off-by: modmew8 <modmew8@gmail.com>
2018-01-03 02:34:13 -06:00
Morgan Bazalgette 3d3faa2624 Responsive view (#2750)
* Viewport meta tag

* responsive: dashboard

* responsive: issues page

* responsive: Explore page

* responsive: navbar, and some navbar css refactoring

* responsive: button for collapsing navbar in mobile view

* Mark the hamburger button as active when pressed

* better homepage for responsive views

* Bring back jump class in navbar

The class was necessary, because this way the
dropdown doesn't assume the contents of the
selected item.

* make repository homes responsive

* Make file view page responsive

* Make forms look good on responsive views

* make commits and commit diff view responsive

* issues and PRs

* responsive wiki

* Don't place auto-init far off the page

* Minor changes to amend broken stuff

minor improvements

- make login/sign up in navbar stackable
- make navbar in explore and sign in not stackable

Change selected class in TestPullCompare

Fix typo that happened when rebasing

fix dashboard on org view

improve profile UI

Use clearing on file diff to fix broken UI caused by floating elements

remove unresolved merge conflict, and | Sanitize

Fix repo home not loading
2017-12-30 18:47:52 -06:00
Chris Woodward 5332052019 Fixed missing end tag for organization link (#3229) 2017-12-19 09:47:30 +02:00
Lunny Xiao 3b525d5696
fix gpg tmpl (#3153) 2017-12-11 22:07:25 +08:00
Lunny Xiao f2e20c81b6 Refactor struct's time to remove unnecessary memory usage (#3142)
* refactor struct's time to remove unnecessary memory usage

* use AsTimePtr simple code

* fix tests

* fix time compare

* fix template on gpg

* use AddDuration instead of Add
2017-12-11 06:37:04 +02:00
Sasha Varlamov 7ec6cddd27 Add 'mark all read' option to notifications (#3097)
* Add 'mark all read' option to notifications

Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com>

* Fix exported comment

Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com>

* Format method comments

Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com>

* Fix exported comment

Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com>

Format method comments

Signed-off-by: Sasha Varlamov <sasha@sashavarlamov.com>

Tests for reactions (#3083)

* Unit tests for reactions

* Fix import order

Signed-off-by: Lauris Bukšis-Haberkorns <lauris@nix.lv>

Fix reaction possition when there is attachments (#3099)

Refactor notifications swap function

* Accept change to drop beforeupdate call

* Update purge notifications error message for consistency

* Drop unnecessary check for mark all as read button

* Remove debugging comment
2017-12-07 13:52:57 +08:00
Ethan Koenig ab62da283a Fix avatar URLs (#3069)
* Fix avatar URLs

* import order
2017-12-03 19:55:13 +08:00
silverwind 4947cfb7b0 Remove box-shadow from UI, fix dashboard issue (#3065) 2017-12-03 01:16:35 +02:00
Ethan Koenig ea78a6db57 Spaces to tabs in templates (#2953) 2017-11-21 13:43:00 +08:00
Michael Kuhn 420fc8efc2 Disable add key button if SSH is disabled (#2873) 2017-11-21 11:49:33 +08:00
Shaun 4725f91543 Fix inconsistencies in user settings ui (#2901) 2017-11-13 09:21:41 +02:00
Morlinest 25acd6c822 Use custom search for each filter type in dashboard (#2343)
* Do custom search for each filter in repo-search

* Fix search url

* Simplify code

* Remove loader and reset counts when changing filter
2017-11-01 21:39:05 +02:00
Patrick G 30afce1523 Fix tabs according to semantic-ui docs (#2733) 2017-10-18 21:18:31 +03:00
Lunny Xiao 9e865cee67 Merge password and 2fa page on user settings (#2695)
* merge password and 2fa page on user settings
2017-10-16 11:14:12 +02:00
Kazuki Sawada fcca037576 hide navbar when only 1 sign-in method is available (#2648) 2017-10-04 19:57:00 +03:00
David Schneiderbauer 1eedd983ea Complete push webhooks (#2530)
* implemented missing 'delete' push webhooks

moreover created ActionDeleteBranch and ActionDeleteTag

* add CommitRepoAction tests for tag/branch creation/deletion

* fixed error where push webhook not called if is new branch or tag
removed unnecessary code

* moved prepare unit test environment into separate method to be used across unit tests

* add missing if clause in pushUpdate

Signed-off-by: David Schneiderbauer <dschneiderbauer@gmail.com>
2017-09-21 10:43:26 +03:00
Rémy Boulanouar e5d80b7090 Implementation of all repositories of a user from user->settings (#1740)
* Implementation of all repositories of a user from user->settings

* Update message when no repository found

* Update according to comments

* Change UI to have a better look

* improved user repositories UI
2017-09-14 14:46:14 +03:00
Lunny Xiao 9413b48a0b fix bug on create repo link on dashboard (#2359) 2017-08-23 12:08:20 +08:00
Morlinest 7455604f0c Remove (almost) server side data rendering from repo-search component (#2317)
* Rename some shorthands

* Remove (almost) server side data rendering from repo-search component template
2017-08-22 21:00:34 +08:00
Morlinest 53e6c947f1 Fix order of elements in dashboard html (#2344) 2017-08-20 22:48:41 +03:00
Morlinest 4c13a8458b Fix repo-search template errors for go1.7 (#2336) 2017-08-19 09:37:48 +08:00
Morlinest f3486360d2 Make use of Vue more universal (#2318) 2017-08-17 19:04:39 +03:00
Michael Kuhn 934dd41fa6 Make SHOW_USER_EMAIL also apply to profiles (#2258)
The e-mail address is currently only hidden from the explore page.
2017-08-17 17:08:03 +08:00
Morlinest 951fb572a7 Fix and improve dashboard repo UI (#2285)
* Fix and improve dashboard repo UI

* Change order of scripts loading

* Remove "mirror" tab

* Remove single tab panel for "org user"

* Add localization strings

* Create vue component and change event for search

* Add "mirrors" filter
2017-08-17 09:31:34 +08:00
Ethan Koenig 7e0654bd9e Fix counts on issues dashboard (#2215)
* Fix counts on issues dashboard

* setupSess -> setupSession

* Unit test

* Load repo owners for issues
2017-08-03 13:09:16 +08:00
Lauris BH 047a67a90b Refactor vue delimeters to use es6 template delimeters (#2171) 2017-07-15 22:22:26 +08:00
Jonas Franz 441986a473 Fix "Dashboard shows deleted comments" (#1995) 2017-06-25 20:20:29 +02:00
Patrick G bf187304dc Fix wording (#2024)
* Fix wording

* Update locale_en-US.ini

* Update keys_gpg.tmpl
2017-06-24 01:37:03 -05:00
Ethan Koenig cbdd5f787c Center-aligned login topbar (#1880)
* Center-aligned login topbar

* Center-align OpenID login
2017-06-06 15:05:06 +08:00
Rémy Boulanouar 62f600cf1c Display all organization from user settings (#1739)
* Display all organization from user settings

* fix Tab selection

* Update locale_en-US.ini

* Add a condition for display Create organization button

* Remove french translation

* Remove unnecessary admin flag
2017-06-02 03:43:44 -05:00
Jonas Östanbäck b93568cce4 xxx_active_code_live setting in printed in hours and minutes instead … (#1814)
* xxx_active_code_live setting in printed in hours and minutes instead of just hours

* Update app.ini description of xxx_code_lives settings
2017-05-29 02:35:47 -05:00
Andrey Nering e67ece26f0 Merge pull request #1750 from andreynering/dashboard-search-org-repos
More fixes for dashboard search
2017-05-27 17:40:09 -03:00
Ethan Koenig bafd778c25 Fix invalid reference in feeds template (#1820)
* Fix invalid reference in feeds template

* Comment for GetActAvatar

* Add integration test
2017-05-27 11:34:11 +08:00
Patrick G cc2071c3fd Make side nav on dashboard stackable (#1778) 2017-05-23 15:58:43 +08:00
Andrey Nering c746875fcf Remove colaborative repo panel 2017-05-18 11:16:04 -03:00
Patrick G 03d6bab643 Change two factor code entry box from text to number (#1733) 2017-05-16 15:30:20 +08:00
Jonas Östanbäck e214728725 Add new text for reset password flash (#1718)
* Forgot password should use ResetPwdCodeLives, not ActiveCodeLives
 * Improve documentation for different send mail functions related to password reset
 * Improve documentation in conf/app.ini regarding xxx_CODE_LIVE_MINUTES settings
2017-05-14 10:38:30 +08:00
Jun Hsieh ♞ 2cf80f4b18 Hide the create organization button (in dashboard/organization section) (#1705)
when the user has no such permission.
2017-05-12 15:10:25 +08:00
Andrey Nering ab79069dc7 Improve dashboard repo search (#1652)
* Add VueJS

* Improve dashboard search

* Fix tab switching

* Fix input autofocus
2017-05-09 08:31:30 +08:00
Willem van Dreumel 950f2e2074 Additional OAuth2 providers (#1010)
* add google+

* sort signin oauth2 providers based on the name so order is always the same

* update auth tip for google+

* add gitlab provider

* add bitbucket provider (and some go fmt)

* add twitter provider

* add facebook provider

* add dropbox provider

* add openid connect provider incl. new format of tips section in "Add New Source"

* lower the amount of disk storage for each session to prevent issues while building cross platform (and disk overflow)

* imports according to goimport and code style

* make it possible to set custom urls to gitlab and github provider (only these could have a different host)

* split up oauth2 into multiple files

* small typo in comment

* fix indention

* fix indentation

* fix new line before external import

* fix layout of signin part

* update "broken" dependency
2017-05-01 21:26:53 +08:00
Antoine GIRARD 431b26f6d7 Handle display of GPG key without end date (#1628) 2017-04-28 08:44:58 +08:00
Lunny Xiao 6853bf323a fix #1521 (#1621) 2017-04-27 20:15:56 +08:00
Antoine GIRARD 8371f94d06 Rework SSH key management UI to add GPG (#1293)
* Rework SSH key management UI to add GPG

* Add more detail to gpg key display

* Update CHANGELOG.md

* Implement deletion UI

* Implement adding gpg UI

* Various fixes

- Fix duplicate entry in locale
- Re-generate hash before verification since they are consumed

* Add missing translation

* Split template

* Catch not found/verified email error
2017-04-26 21:10:43 +08:00
Jonas e0df611cbc Autofocus on 2fa passcode fields (#1460)
* Autofocus on 2fa passcode field

* Autofocus on 2fa scratch code field
2017-04-07 06:07:37 -07:00
Antoine GIRARD 912b340d0d Simplify settings pages with item list (#1389)
* Remove point column on ssh key setting page

* Remove un-used css

* Some cleaning

* Use octicon-key
2017-03-30 09:02:37 +08:00
Jonas bbbd08edc1 Changed text when password reset disabled. (#1364)
Fixes #1340
2017-03-22 22:29:29 +08:00
Sandro Santilli 15f5d8e794 Reduce conditionals in signin/signup inner forms
by always using SignInLink and SignUpLink in the form action
2017-03-20 09:40:42 +01:00
Sandro Santilli 9182a35f18 Show user OpenID URIs in their profile (#1314) 2017-03-20 09:31:08 +01:00
Sandro Santilli 97ee88975a Add captcha support to OpenID based signup 2017-03-20 08:58:00 +01:00
Sandro Santilli 430cc4f42a Use readonly input form to show the validated OpenID URI (#1308) 2017-03-20 09:50:24 +08:00
Sandro Santilli 2aad4a5f97 Use font-awesome OpenID icon more (#1320) 2017-03-19 16:25:24 +08:00
Patrick G b57b0c6e40 Fix inconsistency in layout (#1316) 2017-03-18 19:00:09 +08:00
Sandro Santilli 71d16f69ff Login via OpenID-2.0 (#618) 2017-03-17 15:16:08 +01:00
Patrick G efbb895ebe Cleaner ui for admin, repo settings, and user settings page (#1269) (#1270) 2017-03-15 23:39:38 +01:00
Sandro Santilli 7d8f9d1c46 Rename /forget_password url to /forgot_password
Also renames `forgot_password` translation key to
`forgot_password_title` and `forget_password` to
`forgot_password`

Includes entry in CHANGELOG about the breaking change
(and some markdown fixes in there)
2017-03-14 22:54:07 +01:00
Sandro Santilli 8a98a25d8e Show a link to password reset from password change and delete account (#862)
It's helpful when you forgot your password thus cannot change it
(can happen if you log in via OAuth2 or OpenID)

Also make sure that both the delete-account and password-change
links to forgot-password will have the primary email pre-filled
2017-03-11 17:11:54 +08:00
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)
2017-02-22 08:14:37 +01:00
Lunny Xiao 847527fd6d Fix all the bugs in issues and pulls on dashboard (#943)
* fix all the bugs in issues and pulls on dashboard

* small fix and refactor

* add method getRepoIDs for IssueList
2017-02-17 08:58:19 +08:00
Lunny Xiao 7a9a5c8a69 Fix assigned issues dashboard (#920)
* Fix assigned/created issues in dashboard. (#3560)

* Fix assigned/created issues in dashboard.

* Use GetUserIssueStats for getting all Dashboard stats.

* Use gofmt to format the file properly.

* Replace &Issue{} with new(Issue).

* Check if user has access to given repository.

* Remove unnecessary filtering of issues.

* Return 404 error if invalid repository is given.

* Use correct number of issues in paginater.

* fix issues on dashboard
2017-02-14 22:15:18 +08:00
Bo-Yi Wu 23aba523b5 feat: support search bar on star tab of user profile. (#917)
* feat: support search bar on star tab of user profile.

* fix: update testing.

* fix: Using loadAttributes

* fix: remove empty line.

* remove LOWER

Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
2017-02-14 15:28:22 +08:00
Bo-Yi Wu 40f4377717 feat: fill in ssh key title automatically. (#863) 2017-02-09 17:58:04 +08:00
Sandro Santilli 23a7527e04 Allow rendering alerts in dashboard (#856)
NOTE: useful when logging in via OpenID and connecting to user
2017-02-08 09:37:23 +08:00
Lunny Xiao 02a881aa32 show tags on dashboard issues (#860) 2017-02-07 23:33:18 +08:00
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
2017-02-07 23:30:20 +08:00
Bo-Yi Wu b13232f524 feat: support paginater on star tab of user profile. (#845) 2017-02-07 19:54:16 +08:00
Bo-Yi Wu a90a215662 feat: Add search bar on user profile page. (#787) 2017-02-04 20:20:20 +08:00
Bo-Yi Wu d078aa30d6 feat: add search repository on dashboard. (#773) 2017-01-30 13:57:47 +08:00
Andrey Nering aa591317e7 Small UI fixes 2017-01-28 14:11:49 -02:00
Andrey Nering 5348e8b71a Fix color: closed PR was showing as purple instead of red 2017-01-28 14:01:07 -02:00
Kazuki Sawada 3c4d5e1ed5 Fix: Pagenation on dashboard->issues does not work well (#698) 2017-01-19 17:20:40 +08:00
Andrey Nering d2bb8ef503 Notifications: trying to get a better layout (#660)
* i18n button titles

* Improvements on notification page layout

* Notification count badge fixes

* Make table <tr> clickable

* Fix octicon aligment

* Fix use of AppSubUrl
2017-01-18 09:18:55 +08:00
Andrew 6dd096b7f0 Two factor authentication support (#630)
* Initial commit for 2FA support

Signed-off-by: Andrew <write@imaginarycode.com>

* Add vendored files

* Add missing depends

* A few clean ups

* Added improvements, proper encryption

* Better encryption key

* Simplify "key" generation

* Make 2FA enrollment page more robust

* Fix typo

* Rename twofa/2FA to TwoFactor

* UNIQUE INDEX -> UNIQUE
2017-01-16 10:14:29 +08:00
Andrey Nering 769e0a3ea6 Notifications: mark as read/unread and pin (#629)
* Use relative URLs

* Notifications - Mark as read/unread

* Feature of pinning a notification

* On view issue, do not mark as read a pinned notification
2017-01-12 12:27:09 +08:00
derSuessmann 51d578ff33 Add Keep email private (see issue #571). (#571)
- Add site-wide option DEFAULT_KEEP_EMAIL_PRIVATE.
- Add the new option to the install and admin/config pages.
- Add the new option to app.ini in the service section.
- Add the new option to the settings struct.
- Add English text strings to i18n.
- Add field KeepEmailPrivate to user struct.
- Add field KeepEmailPrivate to user form.
- Add option to UI.
- Add using noreply email address if user has "Keep Email Private".
An email address <LowerName>@<NO_REPLY_ADDRESS> is now used in commit
messages (and hopefully all other git log relevant places). The
change relies on the fact that git commands should use
user.NetGitSig().
- Add hiding of email address in UI, if user has set "Keep Email Private".
- Add condition to show email address only on explore/users and user
pages, if user has not set "Keep Email Private".
- Add noreply email in API if set "Keep Email Private".
- Add a new service setting NO_REPLY_ADDRESS. The value of this
setting is used as the domain part for the user's email address in
git log, iff he decides to keep his email address private.
If the user decides to keep his email address private and this
option is not set 'noreply.example.org' is used, which no MTA
should send email to.

Add NO_REPLY_ADDRESS to conf/app.ini.
2017-01-08 11:12:03 +08:00
Andrey Nering 79d527195d Merge pull request #539 from andreynering/notifications-step-2
Notifications - Step 2
2017-01-05 11:53:01 -02:00
Andrey Nering b354cf362e Add pagination for notifications 2017-01-03 17:09:36 -02:00
Andrey Nering 545ba2e2e6 Showing index in front of issue title 2017-01-02 16:43:23 -02:00
Thiago Avelino 787fda53ef UI config to toggle whether user email shows up in Explore Users (#336)
* UI config to toggle whether user email shows up in Explore Users

* Recommendation made by @tboerger
66a1c59fe7 (r94122732)

* fixed typo, rename ShowUserEmailInExplore to ShowUserEmail

* Fixed typo merged conflict

* Hide email in the user profile page

if you are active ShowUserEmail
ref https://github.com/go-gitea/gitea/pull/336#issuecomment-269843725

* Please replace MustBool() with MustBool(true)
2017-01-01 10:51:10 +08:00
Andrey Nering 6069abe5fd Notifications - Step 2 2016-12-30 16:51:24 -02:00
Andrey Nering b992858883 Tab on user profile to show starred repos (#519)
* Tab on user profile to show starred repos

* Make golint happy and use transactions on StarRepo function

* x -> sess

* Use sess.Close() instead of sess.Rollback()

* Add copyright

* Fix lint
2016-12-29 22:58:24 +08:00
Bwko 5ab85372da Added rel="noopener" to target="_blank" hrefs (#327)
* Added rel="noopener" to target="_blank" hrefs

* Replaced gogs.io/docs with docs.gitea.io
2016-12-02 09:12:16 +08:00
Bwko 1e9730a779 Fixes xss, clickjacking & password autocompletion 2016-11-29 22:49:06 +01:00
Matthias Loibl 7b6cc9244d Update link on user’s profile avatar to avatar settings (#287) 2016-11-28 21:29:39 +08:00
Kim "BKC" Carlbäcker 562f9b6eae Merge all pagination-templates into 'base/paginate'
to reduce code-duplicity
2016-11-07 12:44:29 +01:00
Unknwon 7e7613cdec Fix template nil error 2016-08-14 23:43:13 -07:00
Unknwon a5b88c4d0c Fix template error [CI SKIP] 2016-08-14 16:45:15 -07:00
Unknwon 99385db0c4 #3320 code cleanup 2016-08-07 11:01:47 -07:00
Sandro Santilli 90dd0657b5 Add support for federated avatars (#3320)
* Add support for federated avatars

Fixes #3105

Removes avatar fetching duplication code
Adds an "Enable Federated Avatar" checkbox in user settings
(defaults to unchecked)

Moves avatar settings all in the same form, making
local and remote avatars mutually exclusive

Renames UploadAvatarForm to AvatarForm
as it's not anymore only for uploading

* Run gofmt on all modified files

* Move Avatar form in its own page

* Add go-libravatar dependency to vendor/ dir

Hopefully helps with accepting the contribution.
See also #3214

* Revert "Add go-libravatar dependency to vendor/ dir"

This reverts commit a8cb93ae640bbb90f7d25012fc257bda9fae9b82.

* Make federated avatar setting a global configuration

Removes the per-user setting

* Move avatar handling back to base tool, disable federated avatar in offline mode

* Format, handle error

* Properly set fallback host

* Use unsupported github.com mirror for importing go-libravatar

* Remove comment showing life exists outside of github.com

... pity, but contribution would not be accepted otherwise

* Use Combo for Get and Post methods over /avatar

* FEDERATED_AVATAR -> ENABLE_FEDERATED_AVATAR

* Fix persistance of federated avatar lookup checkbox at install time

* Federated Avatars -> Enable Federated Avatars

* Use len(string) == 0 instead of string == ""

* Move import line where it belong

See
https://github.com/Unknwon/go-code-convention/blob/master/en-US/import_packages.md

Pity the import url is still the unofficial one, but oh well...

* Save a line (and waste much more expensive time)

* Remove redundant parens

* Remove an empty line

* Remove empty lines

* Reorder lines to make diff smaller

* Remove another newline

Unknwon review got me start a fight against newlines

* Move DISABLE_GRAVATAR and ENABLE_FEDERATED_AVATAR after OFFLINE_MODE

On re-reading the diff I figured what Unknwon meant here:
https://github.com/gogits/gogs/pull/3320/files#r73741106

* Remove newlines that weren't there before my intervention
2016-08-07 10:27:38 -07:00
Unknwon 50422f1fc2 #3348 always use relative avatar link in the template 2016-08-05 12:12:54 -07:00
Unknwon e74630ae3b #1384 add pagination for repositories 2016-07-24 14:32:46 +08:00
Unknwon 1f2e173a74 Refactor User.Id to User.ID 2016-07-24 01:08:22 +08:00
Unknwon 971e2c3bd6 Upgrade octicon to 4.3.0 2016-07-16 12:45:13 +08:00
Unknwon c083d76567 #2937 able to prohibit user login 2016-07-16 10:22:16 +08:00
Sandro Santilli 76a0e43e88 Do not assume avatar needs be changed from gravatar.com (#3209)
Always send user to settings screen to change avatar.
Drops "change_custom_avatar" localized message, keeps "change_avatar"
for the generic one.

NOTE: only changes the en-US locale, as per
https://github.com/gogits/gogs/wiki/Contributing-Code#those-we-do-not-accept

NOTE: requires rebuild of bindata.go to fully see effects
2016-06-27 01:51:09 +08:00
Unknwon 414eb22ef9 #1597 fix activitity feeds for pull requests 2016-03-05 12:58:51 -05:00
Unknwon a2f13eae55 #1157 some avatar setting changes
- Allow to delete current avatar
2016-03-05 00:51:51 -05:00
Andrey Nering 13e71acadf Render emojis in more places. 2016-03-02 21:54:05 -03:00
Unknwon 912f7b51e9 #1821 add actions for close and reopen issues 2016-02-22 12:40:00 -05:00
Unknwon aa5e837c65 fix #2454 2016-02-14 20:26:49 -05:00
Florian Kaiser 532f9fdd99 Use icon repo-forked instead of repo-lock for private, forked repos 2016-01-31 20:41:57 +00:00
Unknwon ee814bf8d6 #2491 minor fix for sr on dashboard 2016-01-29 15:28:24 -05:00
Unknwon 4deb876343 Minor fix for #2494
- Change tooltip size from mini to tiny in profile page
2016-01-28 06:07:16 -05:00
Unknwon c631a4a9b9 URL fix for #2287 2016-01-15 18:00:39 +08:00
Unknwon dccfadf7b8 hide section with user has no organizations 2016-01-14 21:29:25 +08:00
Unknwon 29b07693dd minor fix to #2383
- add tooltip for organization name in profile
2016-01-14 21:21:56 +08:00
ExMex 40413c5c6c Added improvement from Unknwon 2016-01-14 11:48:24 +01:00
ExMex 53a63de9dc Added links to org profile icons 2016-01-12 03:19:46 +01:00
ExMex f610bfa8a2 Added organization display on profile
Fixed "Follower" Icon too big
2016-01-12 03:09:59 +01:00
Unknwon f43cc90841 #2287 Truncate repository name if too long 2016-01-11 20:41:43 +08:00
Unknwon 21d7b5acaf fix #2367 2016-01-09 14:45:06 +08:00
Unknwon 13fe733037 #2264 use monospaced font for commit IDs in news feeds 2015-12-24 20:43:45 -05:00
Unknwon a49af93faf #1692 APIs: Users Followers
- User profile un/follow
- List user's followers/following
2015-12-21 04:24:11 -08:00
Unknwon cadf03db68 #2180 fix avatar link when disable gravatar 2015-12-19 22:21:00 -05:00
Unknwon 837155577a #2159 use icon+tooltip to replace text 2015-12-12 16:53:16 -05:00
Unknwon d0b0d24f22 #2154 disable change user for non-local users
- #2153 remove require for gravatar
2015-12-11 15:31:02 -05:00
Unknwon 2a8d71367d #2029 not show content of issue in activity timeline 2015-12-10 19:13:51 -05:00
Unknwon 3d5d61778a #1938 #1374 disable password change for non-local users 2015-12-10 19:02:57 -05:00
Unknwon b8d48bdb62 #2037 Add "New Mirror" button on Dashboard 2015-12-09 11:24:56 -05:00
Angus Gibson 06d293a84e Only show comparison link for >2 commits #1110
We can look at the PushCommits object to see how many commits were
included in a commit, and add some template logic to only show the
comparison link when there are at least 2 commits in a push. We also
correct the link to display the number of commits.
2015-12-09 14:36:39 +11:00
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
2015-12-08 00:57:46 +01:00
Unknwon 4795fa01d8 fix #2101 2015-12-04 17:30:32 -05:00
Gibheer 3d54f6c0a4 add new mirror button to dashboard
This adds the button to create a new mirror on the dashboard at the same
place where "new repository" and "new organization" already exist.
2015-12-01 21:10:36 +01:00
Unknwon 3ca544912f #1944 Drop /org/ URL path prefix in organization home page 2015-11-24 19:14:00 -05:00
Unknwon 52c8f69163 fix #650 2015-11-22 01:32:09 -05:00
Arthur Ouyang e04c97b9fa Fix #1965 - the hyperlink and the display name of the branch
The hyperlink and the display name of the branch if the branch is in a folder or the branch name has '#'
2015-11-19 07:31:55 +08:00
Unknwon ff5f14431e fix #1448 2015-11-17 02:18:05 -05:00
Unknwon cceb3364bb CSS fix 2015-11-16 11:33:46 -05:00
Unknwon 5dc3dd1704 fix #1960 2015-11-16 11:11:59 -05:00