summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Improve install code to avoid low-level mistakes. (#17779)wxiaoguang2021-12-0136-177/+472
| | | | | | | | | | | | | | * Improve install code to avoid low-level mistakes. If a user tries to do a re-install in a Gitea database, they gets a warning and double check. When Gitea runs, it never create empty app.ini automatically. Also some small (related) refactoring: * Refactor db.InitEngine related logic make it more clean (especially for the install code) * Move some i18n strings out from setting.go to make the setting.go can be easily maintained. * Show errors in CLI code if an incorrect app.ini is used. * APP_DATA_PATH is created when installing, and checked when starting (no empty directory is created any more).
* [skip ci] Updated translations via CrowdinGiteaBot2021-12-012-1/+824
|
* Rework commit page header (#17849)silverwind2021-12-015-230/+145
| | | | | | | | | | | - Remove blue background and use regular header styling - Use flexbox on author and signature segments - Add shield-type icons besides gpg key, replacing icon font icons - Ensure author and signature line are same height - Remove erronous green background on arc-green signature line - Turn signing colors into CSS variables - Consolidate the two warning states into one Co-authored-by: zeripath <art27@cantab.net>
* Make Requests Processes and create process hierarchy. Associate ↵zeripath2021-11-3066-306/+591
| | | | | | | | | OpenRepository with context. (#17125) This PR registers requests with the process manager and manages hierarchy within the processes. Git repos are then associated with a context, (usually the request's context) - with sub commands using this context as their base context. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix position of label color picker colors (#17866)silverwind2021-11-301-4/+4
|
* docs: modules do not rely on models, services do (#17861)singuliere2021-11-301-1/+1
| | | | | | | | services: provide some services for users, usually use database (models) modules: provide some basic functions without database, eg: code parser, etc The major difference is services use database, while modules don’t. Signed-off-by: singuliere <singuliere@autistici.org>
* Refactor commit graph styling to use css variables (#17860)silverwind2021-11-302-53/+15
| | | | - Use common variables for colors and font - Alter graph color 5 to provide enough contrast on both themes
* [skip ci] Updated translations via CrowdinGiteaBot2021-11-301-0/+1
|
* Remove whitespace inside rendered code `<td>` (#17859)silverwind2021-11-301-6/+2
| | | | | | This extra whitespace caused isses in Firefox where it would copy a extra space character at the start and the end. Additionally, in Chrome, the text selection indicated a spaced on the end of the selection where there was none. Both issues are fixed with the removal of whitespace.
* Switch archive URL code back to href attributes (#17796)fnetX (aka fralix)2021-11-294-14/+14
| | | | | | * Add fallback href link * Switch async archive generation to use href links * Edit all templates to use href instead of data-url for archives * Add consistent rel="nofollow" as per wxiaoguang
* Make Co-committed-by and co-authored-by trailers optional (#17848)zeripath2021-11-294-1/+8
| | | | | | | | This PR adds another option to app.ini make co-committed-by and co-authored-by trailers optional on a per server basis. Fix #17194 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix various typos in docs (#17844)qwerty2872021-11-284-5/+5
|
* Move more model into models/user (#17826)Lunny Xiao2021-11-2823-603/+547
| | | | | | | | * Move more model into models/user * Remove unnecessary comment Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Docs: replace `gitea` with `Gitea` (#17838)qwerty2872021-11-2814-48/+48
| | | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Move accessmode into models/perm (#17828)Lunny Xiao2021-11-2859-295/+359
|
* Disable ref selection dropdown if you don't have permissions to use it (#17837)qwerty2872021-11-282-4/+2
| | | | Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix value of User.IsRestricted to default setting when oauth2 user auto ↵Galen Suen2021-11-281-7/+8
| | | | registration; (#17839)
* Handle relative unix socket paths (#17836)zeripath2021-11-272-4/+11
| | | | | | | | | | | | Make relative unix sockets absolute by making them absolute against the AppWorkPath Fix #17833 ## :warning: BREAKING :warning: Prior to this PR relative unix sockets would have been asserted to be relative to the current working directory that gitea, gitea serv, hook and manager etc were running in. Hooks and Serv would have failed to work properly under this situation so we expect that although this is a technically breaking change the previous situation was already broken. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix code formating (#17830)mscherer2021-11-272-4/+4
| | | * fix formatter, format imports first, then go fmt
* Replace regex usage for MIME parsing (#17831)Gabriel Vasile2021-11-271-2/+6
| | | | | | | MIME types can have multiple optional parameters, eg: video/webm; codecs="w/e codec"; charset="binary" This commit replaces the usage of regex for getting the "type/subtype" with mime.ParseMediaType.
* [skip ci] Updated translations via CrowdinGiteaBot2021-11-271-0/+39
|
* Implement Well-Known URL for password change (#17777)mscherer2021-11-261-4/+10
| | | | | * Implement Well-Known URL for password change Fixes #11804
* Add archived label for code search results in archived repo's (#17817)Jimmy Praet2021-11-261-1/+7
| | | | | | | * Add archived label for code search results in archived repo's * Remove trailing whitespace Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix database inconsistent when admin change user email (#17549)Lunny Xiao2021-11-256-15/+62
|
* [skip ci] Updated translations via CrowdinGiteaBot2021-11-261-0/+3
|
* org settings -> webhook/labels/deletion should also active the menu (#17809)Lunny Xiao2021-11-253-1/+7
|
* Fixed org styles. (#17807)KN4CK3R2021-11-253-97/+97
| | | Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix org webchatwork webhook (#17810)wxiaoguang2021-11-251-0/+2
|
* Detect dark theme via css variable (#17800)ThetaDev2021-11-253-7/+6
| | | | | | | * detect dark theme via css variable * minor refactor, add documentation If your custom theme is considered a dark theme, set the global css variable `--is-dark-theme` to `true`. This allows gitea to adjust the Monaco code editor's theme accordingly.
* Allow forks to org if you can create repos (#17783)qwerty2872021-11-252-7/+7
|
* Use correct user on releases (#17806)Gusted2021-11-251-2/+2
| | | | | | | - Use the provided `doer` instead of `rel.Publisher`. The code will also run on edited releases and deleted ones, which isn't necessary done by `rel.Publisher`. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [skip ci] Updated translations via CrowdinGiteaBot2021-11-253-149/+228
|
* Create menus for organization pages (#17802)Lunny Xiao2021-11-255-24/+39
| | | | | | | * Create menus for organization pages * Fix frontend lint * Fix frontend lint
* Preserve color when inverting emojis (#17797)silverwind2021-11-241-1/+1
| | | Fixes: https://github.com/go-gitea/gitea/issues/17795
* Move user related model into models/user (#17781)Lunny Xiao2021-11-24345-3812/+4229
| | | | | | | | | | | | | * Move user related model into models/user * Fix lint for windows * Fix windows lint * Fix windows lint * Move some tests in models * Merge
* Use `*PushUpdateOptions` as receiver (#17724)Gusted2021-11-242-17/+17
|
* Move repofiles from modules/repofiles to services/repository/files (#17774)Lunny Xiao2021-11-2437-353/+277
| | | | | | | | | * Move repofiles from modules to services * rename services/repository/repofiles -> services/repository/files * Fix test Co-authored-by: 6543 <6543@obermui.de>
* Fix visibility of org avatars (#17789)qwerty2872021-11-241-7/+13
| | | | | | | * Fix visibility of org avatar * more clear syntax Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Use correct Sender on webhook change title (#17791)Gusted2021-11-241-1/+1
| | | As title, thanks to @mscherer for pointing out the incorrect code.
* [skip ci] Updated translations via CrowdinGiteaBot2021-11-244-18/+96
|
* Use new OneDev /milestones endpoint (#17782)KN4CK3R2021-11-231-2/+18
| | | OneDev changed the API which fails every build at the moment.
* Fix keys test (#17776)techknowlogick2021-11-231-1/+1
|
* Add `PULL_LIMIT` and `PUSH_LIMIT` to cron.update_mirror task (#17568)zeripath2021-11-226-17/+70
|
* Improve ellipsis buttons (#17773)silverwind2021-11-226-7/+18
| | | | | | | | | | | | * Improve ellipsis buttons - Remove icon font usage - Add aria-expanded attribute * rename function to match Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Harden authorized keys a bit more (#17772)mscherer2021-11-221-1/+1
| | | | | | | | | | | | sshd(8) list restrict as a future-proof way to restrict feature enabled in ssh. It is supported since OpenSSH 7.2, out since 2016-02-29. OpenSSH will ignore unknown options (see sshauthopt_parse in auth-options.c), so it should be safe to add the option and no-user-rc. Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Add copy Commit ID button in commits list (#17759)velengel2021-11-223-2/+10
| | | | | | | | | | | | | | | | | | | * fix: implement commit id copy to clipboard * fix: remove abundant attributes / consider edge-case * fix: locale_en fixed * fix: use ui button * tune copy button * fix: button size * Fix merge Co-authored-by: Ysmr-Ry <ryo.yossy@live.jp> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add documentation for backend development (#17512)Lunny Xiao2021-11-232-0/+128
| | | | | | | | | | | | | | | * Add documentation for backend development * Update backend guidline * More sections * Add modules/setting and modules/git * Uniform gitea as Gitea * some improvements * some improvements
* [skip ci] Updated translations via CrowdinGiteaBot2021-11-2314-28/+2
|
* More pleasantly handle broken or missing git repositories (#17747)zeripath2021-11-226-4/+63
| | | | | | | | | | | | | | | | | | | | | | * More pleasantly handle broken or missing git repositories In #17742 it was noted that there a completely invalid git repository underlying a repo on gitea.com. This happened due to a problem during a migration however, it is not beyond the realms of possibility that a corruption could occur to another user. This PR adds a check to RepoAssignment that will detect if a repository loading has failed due to an absent git repository. It will then show a page suggesting the user contacts the administrator or deletes the repository. Fix #17742 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update options/locale/locale_en-US.ini Co-authored-by: techknowlogick <techknowlogick@gitea.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Remove unnecessary attributes of User struct (#17745)Lunny Xiao2021-11-2242-451/+279
| | | | | | | | | | | | | | | * Remove unnecessary functions of User struct * Move more database methods out of user struct * Move more database methods out of user struct * Fix template failure * Fix bug * Remove finished FIXME * remove unnecessary code