aboutsummaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* Fix i18n for Link Account button, re-format tmpl (#19835)wxiaoguang2022-05-291-14/+13
|
* Adding button to link accounts from user settings (#19792)Mai-Lapyst2022-05-291-0/+18
| | | | | * Adding button to link accounts from user settings * Only display button to link user accounts when at least one OAuth2 provider is active
* Fix follower display on user page (#19805)silverwind2022-05-261-1/+3
|
* Show source/target branches on PR's list (#19747)IT-AlexKor2022-05-251-0/+21
| | | | | | | Add ability to show source/target branches for Pull Request's list. It can be useful to see which branches are used in each PR right in the list. Co-authored-by: Alexey Korobkov <akorobkov@cian.ru> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Github style following followers (#19482)istiak1012022-05-251-12/+1
| | | Removed tabbed following and followers from user page and added Github style following followers.
* Add the possibility to allow the user to have a favicon which differs from ↵Jan-Eric Schober2022-05-231-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | the main logo (#18542) * Changed the filename of the favicon SVG This allows the user to have a favicon which differs from the logo. * Added favicon.svg This is needed to accommodate the changes for allowing the user to have a differing logo and favicon * Adjusted page to accommodate what icon is used as favicon * Added functionality to also generate the favicon.svg via generate-images.js * Adjusted the description for the new favicon compatibility Co-authored-by: silverwind <me@silverwind.io> * Updated generate-images.js to generate favicons from a separate favicons.svg file This belongs to PR #18542. * Added description on how custom favicons can be generated * Replaced space indents with tabs * Synced changes with current state of the file * Synced changes with current state of the file Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: Lauris BH <lauris@nix.lv>
* Remove fomantic progress module (#19760)silverwind2022-05-203-10/+17
| | | | Replace it with HTML `<progress>` element. The bar won't go green at 100% anymore but I think it's not something that fits stylistically anyways.
* Make Ctrl+Enter (quick submit) work for issue comment and wiki editor (#19729)wxiaoguang2022-05-203-4/+4
| | | | | | | * Make Ctrl+Enter (quick submit) work for issue comment and wiki editor * Remove the required `SubmitReviewForm.Type`, empty type (triggered by quick submit) means "comment" * Merge duplicate code
* Replace blue button and label classes with primary (#19763)silverwind2022-05-2057-93/+93
| | | | | | | | | | | | | | | * make blue really blue * replace blue button and label classes with primary * add --color-blue-dark * add light color variants, tweak a few colors * fix colors * add comment Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve commit list/view on mobile (#19712)Gusted2022-05-162-15/+14
| | | | | - This is a continuation on [the work](https://github.com/go-gitea/gitea/pull/19546) I've done for improving mobile experience on Gitea. - The current behavior of going trough the commits list is horrible, each individual item gets it's own row and thereby isn't quite compact as it should be on mobile. The commit view's header is in a bit better state, it's quite only that content is overlapping each other. - This patch fixes those problems. Each row in the commit list table will actually take a row in the UI. The commit view's header has now a better organized way of placing the information.
* Use Vue to refactor pull merge UI (#19650)wxiaoguang2022-05-121-168/+61
| | | | | | | | | | | | | | | | | * Use Vue to refactor pull merge UI * add comments * fix comments * small fine tune * fix tests * adopt new pull default messages * clean up Co-authored-by: 6543 <6543@obermui.de>
* Tidy up `<head>` template (#19678)silverwind2022-05-101-24/+22
| | | | Neiter `<meta>` nor `<link>` require a closing slash at the end in HTML, remove it.
* Add tooltip to pending PR comments (#19662)Jack Hay2022-05-091-1/+1
|
* Calculate filename hash only once (#19654)KN4CK3R2022-05-094-20/+19
| | | | | | | * Calculate hash only once. * remove unused Sha1 template helper function, use ctx.Data["FileNameHash"] * fix unit tests
* Restore reviewed-on message (#19657)Lunny Xiao2022-05-081-0/+3
| | | Regression from #18177
* Repository level enable package or disable (#19323)Lunny Xiao2022-05-082-3/+18
|
* Allow custom default merge message with ↵Lunny Xiao2022-05-081-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | .gitea/default_merge_message/<merge_style>_TEMPLATE.md (#18177) * Allow custom default merge message with .gitea/MERGE_MESSAGE_<merge_style>_TEMPLATE.md * Some improvements * Follow some advices * Fix bug * Fix bug * Fix lint * Fix close comment * Fix test * Fix and docs * Improve codes * Update docs and remove unnecessary variables * return error for GetDefaultMergeMessage * Fix test * improve code * ignore unknow unit type * return error for GetDefaultMergeMessage * Update services/pull/merge.go * Some improvements * Follow some advices * Fix bug * Fix lint * Improve codes * Update docs and remove unnecessary variables * return error for GetDefaultMergeMessage * improve code * Handle deleted HeadRepo in GetDefaultMergeMessage Signed-off-by: Andrew Thornton <art27@cantab.net> * Fix test * Fix test Co-authored-by: zeripath <art27@cantab.net>
* Allow to mark files in a PR as viewed (#19007)delvh2022-05-071-3/+18
| | | Users can now mark files in PRs as viewed, resulting in them not being shown again by default when they reopen the PR again.
* Auto merge pull requests when all checks succeeded via API (#9307)kolaente2022-05-082-1/+60
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * Fix indention Signed-off-by: kolaente <k@knt.li> * Add option to merge a pr right now without waiting for the checks to succeed Signed-off-by: kolaente <k@knt.li> * Fix lint Signed-off-by: kolaente <k@knt.li> * Add scheduled pr merge to tables used for testing Signed-off-by: kolaente <k@knt.li> * Add status param to make GetPullRequestByHeadBranch reusable Signed-off-by: kolaente <k@knt.li> * Move "Merge now" to a seperate button to make the ui clearer Signed-off-by: kolaente <k@knt.li> * Update models/scheduled_pull_request_merge.go Co-authored-by: 赵智超 <1012112796@qq.com> * Update web_src/js/index.js Co-authored-by: 赵智超 <1012112796@qq.com> * Update web_src/js/index.js Co-authored-by: 赵智超 <1012112796@qq.com> * Re-add migration after merge * Fix frontend lint * Fix version compare * Add vendored dependencies * Add basic tets * Make sure the api route is capable of scheduling PRs for merging * Fix comparing version * make vendor * adopt refactor * apply suggestion: User -> Doer * init var once * Fix Test * Update templates/repo/issue/view_content/comments.tmpl * adopt * nits * next * code format * lint * use same name schema; rm CreateUnScheduledPRToAutoMergeComment * API: can not create schedule twice * Add TestGetBranchNamesForSha * nits * new go routine for each pull to merge * Update models/pull.go Co-authored-by: a1012112796 <1012112796@qq.com> * Update models/scheduled_pull_request_merge.go Co-authored-by: a1012112796 <1012112796@qq.com> * fix & add renaming sugestions * Update services/automerge/pull_auto_merge.go Co-authored-by: a1012112796 <1012112796@qq.com> * fix conflict relicts * apply latest refactors * fix: migration after merge * Update models/error.go Co-authored-by: delvh <dev.lh@web.de> * Update options/locale/locale_en-US.ini Co-authored-by: delvh <dev.lh@web.de> * Update options/locale/locale_en-US.ini Co-authored-by: delvh <dev.lh@web.de> * adapt latest refactors * fix test * use more context * skip potential edgecases * document func usage * GetBranchNamesForSha() -> GetRefsBySha() * start refactoring * ajust to new changes * nit * docu nit * the great check move * move checks for branchprotection into own package * resolve todo now ... * move & rename * unexport if posible * fix * check if merge is allowed before merge on scheduled pull * debugg * wording * improve SetDefaults & nits * NotAllowedToMerge -> DisallowedToMerge * fix test * merge files * use package "errors" * merge files * add string names * other implementation for gogit * adapt refactor * more context for models/pull.go * GetUserRepoPermission use context * more ctx * use context for loading pull head/base-repo * more ctx * more ctx * models.LoadIssueCtx() * models.LoadIssueCtx() * Handle pull_service.Merge in one DB transaction * add TODOs * next * next * next * more ctx * more ctx * Start refactoring structure of old pull code ... * move code into new packages * shorter names ... and finish **restructure** * Update models/branches.go Co-authored-by: zeripath <art27@cantab.net> * finish UpdateProtectBranch * more and fix * update datum * template: use "svg" helper * rename prQueue 2 prPatchCheckerQueue * handle automerge in queue * lock pull on git&db actions ... * lock pull on git&db actions ... * add TODO notes * the regex * transaction in tests * GetRepositoryByIDCtx * shorter table name and lint fix * close transaction bevore notify * Update models/pull.go * next * CheckPullMergable check all branch protections! * Update routers/web/repo/pull.go * CheckPullMergable check all branch protections! * Revert "PullService lock via pullID (#19520)" (for now...) This reverts commit 6cde7c9159a5ea75a10356feb7b8c7ad4c434a9a. * Update services/pull/check.go * Use for a repo action one database transaction * Apply suggestions from code review * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> * Update services/issue/status.go Co-authored-by: delvh <dev.lh@web.de> * Update services/issue/status.go Co-authored-by: delvh <dev.lh@web.de> * use db.WithTx() * gofmt * make pr.GetDefaultMergeMessage() context aware * make MergePullRequestForm.SetDefaults context aware * use db.WithTx() * pull.SetMerged only with context * fix deadlock in `test-sqlite\#TestAPIBranchProtection` * dont forget templates * db.WithTx allow to set the parentCtx * handle db transaction in service packages but not router * issue_service.ChangeStatus just had caused another deadlock :/ it has to do something with how notification package is handled * if we merge a pull in one database transaktion, we get a lock, because merge infoce internal api that cant handle open db sessions to the same repo * ajust to current master * Apply suggestions from code review Co-authored-by: delvh <dev.lh@web.de> * dont open db transaction in router * make generate-swagger * one _success less * wording nit * rm * adapt * remove not needed test files * rm less diff & use attr in JS * ... * Update services/repository/files/commit.go Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> * ajust db schema for PullAutoMerge * skip broken pull refs * more context in error messages * remove webUI part for another pull * remove more WebUI only parts * API: add CancleAutoMergePR * Apply suggestions from code review Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> * fix lint * Apply suggestions from code review * cancle -> cancel Co-authored-by: delvh <dev.lh@web.de> * change queue identifyer * fix swagger * prevent nil issue * fix and dont drop error * as per @zeripath * Update integrations/git_test.go Co-authored-by: delvh <dev.lh@web.de> * Update integrations/git_test.go Co-authored-by: delvh <dev.lh@web.de> * more declarative integration tests (dedup code) * use assert.False/True helper Co-authored-by: 赵智超 <1012112796@qq.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Hide private repositories in packages (#19584)KN4CK3R2022-05-072-4/+8
|
* Only show accessible teams in dashboard dropdown list (#19642)Jimmy Praet2022-05-071-1/+1
| | | Fixes #19637
* prevent double click new issue/pull/comment button (#16157)a10121127962022-05-072-3/+3
| | | | | | | | | | * prevent double click new issue/pull/comment button when network is not good, these button maybe double clicked, then more than one same issues pulls or comments will be created. this pull request will fix this bug. Signed-off-by: a1012112796 <1012112796@qq.com>
* Improve reviewing PR UX (#19612)Gusted2022-05-072-1/+2
|
* Add "Reference" section to Issue view sidebar (#19609)neon2022-05-051-0/+9
| | | | | | | | | | | | | | | * Add "Reference" section to Issue view sidebar * Removed unneeded tailored CSS, added Fomantic UI classes * Removed tailored CSS in favour of HTML-only approach Kindly provided by @Gusted * Added i18 translation key for reference link string * Corrected spelling of "References:" to "Reference:" for reference link text * Removed `Issue.ReferenceLink` in favour of a local template variable
* Fix broken TR on cherrypick page (#19599)Gusted2022-05-041-1/+1
| | | | - `repo.filter_branch` isn't a translation key so use `repo.pulls.filter_branch` which has the correct translation.
* Use for a repo action one database transaction (#19576)65432022-05-031-3/+3
| | | | | ... more context (part of #9307)
* Improve UI on mobile (#19546)Gusted2022-05-0113-13/+21
| | | | | | | | | | | | Start making the mobile experience not painful and be actually usable. This contains a few smaller changes to enhance this experience. - Submit buttons on the review forms aren't columns anymore and are now allowed to be displayed on one row. - The label/milestone & New Issue buttons were given each own row even tough, there's enough place to do it one the same row. This commit fixes that. - The issues+Pull tab on repo's has a third item besides the label/milestone & New Issue buttons, the search bar. On desktop there's enough place to do this on one row, for mobile it isn't, currently it was using for each item a new row. This commits fixes that by only giving the searchbar a new row and have the other two buttons on the same row. - The notification table will now be show a scrollbar instead of overflow. - The repo buttons(Watch, Star, Fork) on mobile were showing quite big and the SVG wasn't even displayed on the same line, if the count of those numbers were too high it would even overflow. This commit removes the SVG, as there isn't any place to show them on the same row and allows them to have a new row if the counts of those buttons are high. - The admin page can show you a lot of interesting information, on mobile the System Status + Configuration weren't properly displayed as the margin's were too high. This commit fixes that by reducing the margin to a number that makes sense on mobile. - Fixes to not overflow the tables but instead force them to be scrollable. - When viewing a issue or pull request, the comments aren't full-width but instead 80% and aligned to right, on mobile this is a annoyance as there isn't much width to begin with. This commits fixes that by forcing full-width and removing the avatars on the left side and instead including them inline in the comment header.
* Add API to check if team has repo access (#19540)qwerty2872022-05-011-0/+42
| | | | | * Add API to check if team has repo access * Add test case
* Respect DefaultUserIsRestricted system default when creating new user (#19310)Jimmy Praet2022-04-291-0/+4
| | | | | | | | | | | | | | | | | | | * Apply DefaultUserIsRestricted in CreateUser * Enforce system defaults in CreateUser Allow for overwrites with CreateUserOverwriteOptions * Fix compilation errors * Add "restricted" option to create user command * Add "restricted" option to create user admin api * Respect default setting.Service.RegisterEmailConfirm and setting.Service.RegisterManualConfirm where needed * Revert "Respect default setting.Service.RegisterEmailConfirm and setting.Service.RegisterManualConfirm where needed" This reverts commit ee95d3e8dc9e9fff4fa66a5111e4d3930280e033.
* Mute link in diff header (#19556)silverwind2022-04-291-1/+1
| | | | Followup to https://github.com/go-gitea/gitea/pull/19534. Make the link render in color only on hover.
* Add API to query collaborators permission for a repository (#18761)Florin Hillebrand2022-04-291-0/+70
| | | | | | | | | | | | | | | | | | | | | Targeting #14936, #15332 Adds a collaborator permissions API endpoint according to GitHub API: https://docs.github.com/en/rest/collaborators/collaborators#get-repository-permissions-for-a-user to retrieve a collaborators permissions for a specific repository. ### Checks the repository permissions of a collaborator. `GET` `/repos/{owner}/{repo}/collaborators/{collaborator}/permission` Possible `permission` values are `admin`, `write`, `read`, `owner`, `none`. ```json { "permission": "admin", "role_name": "admin", "user": {} } ``` Where `permission` and `role_name` hold the same `permission` value and `user` is filled with the user API object. Only admins are allowed to use this API endpoint.
* Permalink files In PR diff (#19534)KN4CK3R2022-04-291-3/+4
|
* Fix Pull Request comment filename word breaks (#19535)parnic2022-04-291-2/+2
| | | | | | | | | | | | | | | | | | | | | * Fix word breaks in Chrome This fixes word wrapping on the filename for a comment on a PR. A previous commit fixed this problem in Firefox, but not Chrome. Fixes #16248 * Don't break Outdated badge This prevents the Outdated badge on a PR from wrapping in the middle of the word for a comment on a long filename. * Move word break to recommended element * Add overflow-wrap per PR review * Update web_src/less/helpers.less Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add "Allow edits from maintainer" feature (#18002)qwerty2872022-04-283-0/+33
| | | | | | | | | | | | | | | | | Adds a feature [like GitHub has](https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) (step 7). If you create a new PR from a forked repo, you can select (and change later, but only if you are the PR creator/poster) the "Allow edits from maintainers" option. Then users with write access to the base branch get more permissions on this branch: * use the update pull request button * push directly from the command line (`git push`) * edit/delete/upload files via web UI * use related API endpoints You can't merge PRs to this branch with this enabled, you'll need "full" code write permissions. This feature has a pretty big impact on the permission system. I might forgot changing some things or didn't find security vulnerabilities. In this case, please leave a review or comment on this PR. Closes #17728 Co-authored-by: 6543 <6543@obermui.de>
* Better describe what `/repos/{owner}/{repo}/raw/{filepath}` returns on 200 ↵Gusted2022-04-281-1/+1
| | | | | | (#19542) - Set on the description that it returns the raw file content. - Resolves #19514
* Update image URL for Discord webhook (#19536)John Olheiser2022-04-271-1/+1
| | | Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Don't let repo clone URL overflow (#19517)Gusted2022-04-261-1/+1
| | | | | | - Apparently `<input>` elements differ from other elements have a size attribute that act as a `min-width` CSS property, this causes a overflow on mobile. By setting this size to `1` it doesn't try to force a min-width and nicely shrink down.
* Add commit status popup to issuelist (#19375)parnic2022-04-261-2/+2
| | | | | | | | | | This gets the necessary data to the issuelist for it to support a clickable commit status icon which pops up the full list of commit statuses related to the commit. It accomplishes this without any additional queries or fetching as the existing codepath was already doing the necessary work but only returning the "last" status. All methods were wrapped to call the least-filtered version of each function in order to maximize code reuse. Note that I originally left `getLastCommitStatus()` in `pull.go` which called to the new function, but `make lint` complained that it was unused, so I removed it. I would have preferred to keep it, but alas. The only thing I'd still like to do here is force these popups to happen to the right by default instead of the left. I see that the only other place this is popping up right is on view_list.tmpl, but I can't figure out how/why right now. Fixes #18810
* Disable unnecessary GitHooks elementsPawel Boguslawski2022-04-261-1/+1
| | | | | | | This mod fixes disabling unnecessary GitHooks elements. Related: https://github.com/go-gitea/gitea/pull/13129 Author-Change-Id: IB#1115251
* By default force vertical tabs on mobile (#19486)Gusted2022-04-264-4/+4
| | | | | | | | | | | | | | | | | | | * By default force vertical tabs on mobile - While experimenting with using vertical tabs instead of horizontal tabs on gitea for a better mobile experience, I made a recent PR(https://github.com/go-gitea/gitea/pull/19468) in order to see if there was any objections to this new behavior for the repo headers(one of the most annoying horizontal tabs). This PR had no objections and even a user commenting that this change is brilliant. - This PR now improves upon the previous PR by making this the de-facto behavior for all menu's on mobile. The only exemption is the navbar which also uses the menu but caught some layout errors with the changes. * Fix organisation * Fix repo/wiki buttons Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add a new menu in file view to open blame view and fix blame view select ↵Lunny Xiao2022-04-261-0/+3
| | | | range bug (#19500)
* Fix two UI bugs: JS error in imagediff.js, 500 error in diff/compare.tmplwxiaoguang2022-04-261-1/+1
| | | Co-authored-by: 6543 <6543@obermui.de>
* Add RSS Feed buttons to Repo, User and Org pages (#19370)ktprograms2022-04-243-0/+3
|
* Use horizontal tabs for repo header on mobile (#19468)Gusted2022-04-231-1/+1
| | | | | | | | | | | | | | * Use horizontal tabs for repo header on mobile - The current behavior of the repo header on mobile is to display them vertically column-by-column. I've only experience annoyance due to this while trying to visit gitea instanced on mobile. This commit changes this behavior to use horizontal tabs, it uses less tabs and doesn't bloat 60% of your mobile screen with the repo headers. - A small fix added in this commit is to give some space around the repo buttons, current behavior is that they are too "close" to the repo title. * Fix lint
* RepoAssignment ensure to close before overwrite (#19449)65432022-04-211-0/+12
| | | | | | | * check if GitRepo already open and close if * only run RepoAssignment once * refactor context helper for api to open GitRepo
* When updating mirror repo intervals by API reschedule next update too (#19429)zeripath2022-04-201-0/+5
| | | | | | | | | When a mirror repo interval is updated by the UI it is rescheduled with that interval however the API does not do this. The API also lacks the enable_prune option. This PR adds this functionality in to the API Edit Repo endpoint. Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix nil error when some pages are rendered outside request context (#19427)wxiaoguang2022-04-191-1/+1
|
* Add Helm Chart registry (#19406)KN4CK3R2022-04-197-5/+72
|
* Fix double blob-hunk (#19404)Gusted2022-04-151-3/+1
| | | - Don't show the blob-hunk twice.
* Document 409 error returned by repos/migrate api (#19376)Chongyi Zheng2022-04-121-0/+3
| | | | | | | * Document 409 error returned by repos/migrate api * Generate swagger spec Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>