aboutsummaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* Remove cancel button in repo creation page (#21381)Yarden Shoham2022-10-111-1/+0
|
* Add user/organization code search (#19977)Lauris BH2022-10-1110-69/+111
| | | | | | | Fixes #19925 Screenshots: ![attels](https://user-images.githubusercontent.com/165205/173864718-fe789429-55bc-4cad-808c-9f02f335cddf.png)
* Fix calls to i18n in templates (#21394)wxiaoguang2022-10-103-8/+8
| | | | | | | | | | | | Although the `.i18n` has been refactored to `.locale`, some PRs using `.i18n` were still merged. * #20219 * #21246 This PR fixes the calls to `.i18n`. At the moment, `{{.nosuch.nosuch "..."}}` won't cause template error so these mistakes don't cause 500 and haven't been found.
* Allow creation of OAuth2 applications for orgs (#18084)qwerty2872022-10-098-118/+140
| | | | | | | | | | Adds the settings pages to create OAuth2 apps also to the org settings and allows to create apps for orgs. Refactoring: the oauth2 related templates are shared for instance-wide/org/user, and the backend code uses `OAuth2CommonHandlers` to share code for instance-wide/org/user. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Removed one extra whitespace in footer after "Template" (#21364)Michael Horstmann2022-10-081-2/+1
|
* Make external issue tracker regexp configurable via API (#21338)Andrew Imeson2022-10-071-1/+6
| | | | | Fixes #21336 Signed-off-by: Andrew Imeson <andrew@andrewimeson.com>
* Fix default theme-auto selector when nologin (#21346)rock2dust2022-10-061-1/+1
| | | | | | | | | | the bug is theme selector is `theme-` when not login to Gitea ![theme-auto](https://user-images.githubusercontent.com/76462613/194099390-0ff6854a-1eb9-4dba-bb28-fd238f2225f8.png) Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add `stat` to `ToCommit` function for speed (#21337)Gennady Kovshenin2022-10-061-0/+6
| | | | | | | | | Calls to ToCommit are very slow due to fetching diffs, analyzing files. This patch lets us supply `stat` as false to speed fetching a commit when we don't need the diff. /v1/repo/commits has a default `stat` set as true now. Set to false to experience fetching thousands of commits per second instead of 2-5 per second.
* Fix typo in API comment document (#21347)wxiaoguang2022-10-051-3/+30
| | | | | | | Close #21307 After the fix: ![image](https://user-images.githubusercontent.com/2114189/194120843-52566b84-6e29-4f91-859a-eb5839c68c54.png)
* Remove extra space from title element (#21345)rock2dust2022-10-051-1/+1
| | | | | Removes a spurious additional space in the head template. ![](https://user-images.githubusercontent.com/76462613/194077336-1e757242-6f92-4238-8856-746b2e9a1a2c.png)
* Fix linked account translation (#21331)John Olheiser2022-10-041-1/+1
| | | fix key used for translation
* Tag list should include draft releases with existing tags (#21263)Jason Song2022-10-031-4/+2
| | | | | Before, a tag for a draft release disappeared in the tag list, fix #21262. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor from Vue2 to Vue3 (#20044)André Jaenisch2022-10-012-5/+7
| | | Close #19902
* Fix issue that `sync_on_commit` is not set (#21309)Chongyi Zheng2022-10-011-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | <!-- Please check the following: 1. Make sure you are targeting the `main` branch, pull requests on release branches are only allowed for bug fixes. 2. Read contributing guidelines: https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md 3. Describe what your pull request does and which issue you're targeting (if any) --> Fixes #21308. With the original frontend template `templates/repo/settings/options.tmpl`, the field `push_mirror_sync_on_commit` is always empty even when checkbox is checked. Removing `value` from the input tag seems to solve the issue, and will set `push_mirror_sync_on_commit: on` when the checkbox is checked. (I'm not familiar with the frontend logics Gitea is using, so I don't really understand the cause of it)
* Add pages to view watched repos and subscribed issues/PRs (#17156)qwerty2872022-09-292-0/+83
| | | | | | | | | | | | | | | | | Adds GitHub-like pages to view watched repos and subscribed issues/PRs This is my second try to fix this, but it is better than the first since it doesn't uses a filter option which could be slow when accessing `/issues` or `/pulls` and it shows both pulls and issues (the first try is #17053). Closes #16111 Replaces and closes #17053 ![Screenshot](https://user-images.githubusercontent.com/80460567/134782937-3112f7da-425a-45b6-9511-5c9695aee896.png) Co-authored-by: Lauris BH <lauris@nix.lv> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add name field for org api (#21270)KN4CK3R2022-09-291-0/+5
| | | | | | | | related #21205 The field `UserName` is not really usefull for an organization. This adds a second `Name` field. The [GitHub API](https://docs.github.com/en/rest/orgs/orgs#get-an-organization) uses `name` too. `UserName` should be deprecated then.
* Add API endpoint to get changed files of a PR (#21177)qwerty2872022-09-291-0/+155
| | | | | | | | | | This adds an api endpoint `/files` to PRs that allows to get a list of changed files. built upon #18228, reviews there are included closes https://github.com/go-gitea/gitea/issues/654 Co-authored-by: Anton Bracke <anton@ju60.de> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Better repo API unit checks (#21130)John Olheiser2022-09-281-9/+9
| | | | | | | | | | | | | | | | | | | | This PR would presumably Fix #20522 Fix #18773 Fix #19069 Fix #21077 Fix #13622 ----- 1. Check whether unit type is currently enabled 2. Check if it _will_ be enabled via opt 3. Allow modification as necessary Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 6543 <6543@obermui.de>
* Fix empty container layer history and UI (#21251)KN4CK3R2022-09-271-2/+2
| | | Fixes #21248
* Add filetree on left of diff view (#21012)sebastian-sauer2022-09-275-133/+144
| | | | | | | | | | | | | | This PR adds a filetree to the left side of the files/diff view. Initially the filetree will not be shown and may be shown via a new "Show file tree" button. Showing and hiding is using the same icon as github. Folders are collapsible. On small devices (max-width 991 PX) the file tree will be hidden. Close #18192 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add author search input (#21246)Tyrone Yeh2022-09-261-0/+4
| | | | | | New author filter in #20578 missing author search input #20623 lost author, so add this Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Use native inputs in whitespace dropdown (#20980)silverwind2022-09-251-8/+16
| | | | | | | | | | | | | | | Use native `<input type="radio">` instead of fake icon font. The `pointer-events: none` is necessary so the link click always takes effect. Tested in Firefox, Safari and Chrome. Before: <img width="305" alt="Screen Shot 2022-08-27 at 20 42 11" src="https://user-images.githubusercontent.com/115237/187044786-6655c766-c3fb-4672-9e3e-219b3ec4896c.png"> After: <img width="298" alt="Screen Shot 2022-08-27 at 21 10 05" src="https://user-images.githubusercontent.com/115237/187044790-33f87741-062e-4744-80b1-d3bd3fd725e3.png"> <img width="302" alt="image" src="https://user-images.githubusercontent.com/115237/187044872-6c133cea-65ee-4ebd-b18a-a8b38c791565.png">
* Added search input field to issue filter (#20623)Tyrone Yeh2022-09-232-0/+20
| | | | | Added search input field to issue filter for label and milestone and assignee Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Prevent invalid behavior for file reviewing when loading more files (#21230)delvh2022-09-221-9/+9
| | | | | | | | | | | | | | The problem was that many PR review components loaded by `Show more` received the same ID as previous batches, which confuses browsers (when clicked). All such occurrences should now be fixed. Additionally improved the background of the `viewed` checkbox. Lastly, the `go-licenses.json` was automatically updated. Fixes #21228. Fixes #20681. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Make Clone in VSCode link get updated correctly (#21225)wxiaoguang2022-09-211-1/+1
| | | | | | Follow #20557, fix #21224 The `clone_script` will update `.js-clone-url` and related elements, so it should be put after these elements.
* Fix template bug of admin monitor (#21208)Lunny Xiao2022-09-191-1/+1
| | | | | Fix #21207 Co-authored-by: Lauris BH <lauris@nix.lv>
* Fix CSV diff for added/deleted files (#21189)KN4CK3R2022-09-172-2/+2
| | | | | | | | Fixes #21184 Regression of #19552 Instead of using `GetBlobByPath` I use the already existing instances. We need more information from #19530 if that error is still present.
* Limit length of repo description and repo url input fields (#21119)JakobDev2022-09-161-2/+2
| | | | | | Both allow only limited characters. If you input more, you will get a error message. So it make sense to limit the characters of the input fields. Slightly relax the MaxSize of repo's Description and Website
* Keep path when creating a new branch (#21153)JakobDev2022-09-151-0/+3
| | | | | If you are create a new new branch while viewing file or directory, you get redirected to the root of the repo. With this PR, you keep your current path instead of getting redirected to the repo root.
* Display image digest for container packages (#21170)KN4CK3R2022-09-141-0/+4
| | | fixes #21160
* Skip dirty check for team forms (#21154)KN4CK3R2022-09-142-2/+2
| | | The dirty check is not usefull for these forms.
* Use form for admin purge user (#21070)John Olheiser2022-09-121-3/+11
| | | | | | | | | | | | | | | Fixes #20998 The basic modal actions were set up for basic confirmation-style modals, however this modal also has a special form input, which instead requires a form in the modal itself. The basic modal actions are indirectly controlled by JS and are simple `<div>` elements, whereas this requires a `<button>` to submit. This appears to be similar to how we do it in (for example) the repo deletion modal. Signed-off-by: jolheiser <john.olheiser@gmail.com>
* Make labels clickable in the comments section. (#21137)Blender Defender2022-09-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | This commit adds the possibility to click the labels in the message "User added/removed the X label", which will lead to the issues page, filtered by the clicked label. This pull requests aims to fix #19768 _I've tried to follow the contribution guidelines as carefully as possible, but in case I made a mistake: Please correct me._ <!-- Please check the following: 1. Make sure you are targeting the `main` branch, pull requests on release branches are only allowed for bug fixes. 2. Read contributing guidelines: https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md 3. Describe what your pull request does and which issue you're targeting (if any) --> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Remove fomantic image module (#21145)silverwind2022-09-126-10/+10
| | | | | | | | | Remove this small, but unnecessary [module](https://fomantic-ui.com/elements/image.html) and use `img` selector over previous `.image`. Did a few tests, could not notice any visual regression. Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>
* Show .editorconfig errors in frontend (#21088)JakobDev2022-09-121-0/+7
| | | | If the user views the .editorconfig of the Repo, an the the .editorconfig contains error, those errors are now shown above the file.
* Improve commit status icons (#21124)silverwind2022-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | - Show popover on hover/focus (tippy default) instead of click - If there is only one status, add href to trigger element - Increase tippy [interactiveBorder](https://atomiks.github.io/tippyjs/v6/all-props/#interactiveborder), making it easier to keep interactive tooltips open with sloppy mouse movement - Fix a overflow issue in the commit list Commit list before: <img width="459" alt="Screen Shot 2022-09-09 at 19 00 01" src="https://user-images.githubusercontent.com/115237/189405517-68de5a69-e312-4ea2-ab81-87629db6064b.png"> Commit List after: <img width="475" alt="Screen Shot 2022-09-09 at 19 01 43" src="https://user-images.githubusercontent.com/115237/189405574-13e84885-9073-4f86-9eeb-d008c1639647.png"> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Center-aligning content of WebAuthN page (#21127)neon2022-09-091-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | <!-- Please check the following: 1. Make sure you are targeting the `main` branch, pull requests on release branches are only allowed for bug fixes. 2. Read contributing guidelines: https://github.com/go-gitea/gitea/blob/main/CONTRIBUTING.md 3. Describe what your pull request does and which issue you're targeting (if any) --> This attempts to correct #21126 , where the content of the page is not center-aligned. (Note: I think this contains the right commits - but, those other commits seem superfluous. I'm not sure I've made the pull request correctly. I don't often use the pull request pattern when working, opting to use the merge-request pattern instead for my workplace. If there are any issues, please let me know and I will try to correct them.) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Make the vscode clone link respect transport protocol (#20557)Norwin2022-09-092-1/+6
|
* Fix various typos (#21103)luzpaz2022-09-072-2/+2
| | | | | | | Found via `codespell -q 3 -S ./options/locale,./options/license,./public/vendor,./web_src/fomantic -L actived,allways,attachements,ba,befores,commiter,pullrequest,pullrequests,readby,splitted,te,unknwon` Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Fix sub folder in repository missing add file dropdown (#21069)Tyrone Yeh2022-09-061-25/+26
| | | In repository sub folder missing add file dropdown menu, Probably broken since #20602
* Move go-licenses to generate and separate generate into a frontend and ↵zeripath2022-09-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | backend component (#21061) The `go-licenses` make task introduced in #21034 is being run on make vendor and occasionally causes an empty go-licenses file if the vendors need to change. This should be moved to the generate task as it is a generated file. Now because of this change we also need to split generation into two separate steps: 1. `generate-backend` 2. `generate-frontend` In the future it would probably be useful to make `generate-swagger` part of `generate-frontend` but it's not tolerated with our .drone.yml Ref #21034 Signed-off-by: Andrew Thornton <art27@cantab.net> Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: delvh <dev.lh@web.de>
* Webhook for Wiki changes (#20219)Aaron F2022-09-042-1/+12
| | | | | | | | | | | | | | | | | | | Add support for triggering webhook notifications on wiki changes. This PR contains frontend and backend for webhook notifications on wiki actions (create a new page, rename a page, edit a page and delete a page). The frontend got a new checkbox under the Custom Event -> Repository Events section. There is only one checkbox for create/edit/rename/delete actions, because it makes no sense to separate it and others like releases or packages follow the same schema. ![image](https://user-images.githubusercontent.com/121972/177018803-26851196-831f-4fde-9a4c-9e639b0e0d6b.png) The actions itself are separated, so that different notifications will be executed (with the "action" field). All the webhook receivers implement the new interface method (Wiki) and the corresponding tests. When implementing this, I encounter a little bug on editing a wiki page. Creating and editing a wiki page is technically the same action and will be handled by the ```updateWikiPage``` function. But the function need to know if it is a new wiki page or just a change. This distinction is done by the ```action``` parameter, but this will not be sent by the frontend (on form submit). This PR will fix this by adding the ```action``` parameter with the values ```_new``` or ```_edit```, which will be used by the ```updateWikiPage``` function. I've done integration tests with matrix and gitea (http). ![image](https://user-images.githubusercontent.com/121972/177018795-eb5cdc01-9ba3-483e-a6b7-ed0e313a71fb.png) Fix #16457 Signed-off-by: Aaron Fischer <mail@aaron-fischer.net>
* Fill the specified ref in webhook test payload (#20961)Jason Song2022-09-041-1/+1
| | | | | The webhook payload should use the right ref when it‘s specified in the testing request. The compare URL should not be empty, a URL like `compare/A...A` seems useless in most cases but is helpful when testing.
* Do not add links to Posters or Assignees with ID < 0 (#20577)zeripath2022-09-037-128/+76
| | | | | | | There are several places in templates/repo/issue/view_content/comments.tmpl where links are made to Posters or Assignees who are Ghosts or have IDs <0. Fix #20559 Signed-off-by: Andrew Thornton <art27@cantab.net>
* Show language name on hover (#20923)JakobDev2022-09-021-1/+1
| | | | Each repo has a bar which shows the used programming languages. If you want to know, what language is behind a color, you need to click the bar. With this PR, you just need to hover over the color the view the name.
* Fix the quick-submit for pending review comment (#20992)wxiaoguang2022-09-021-0/+2
| | | | | | If there is only one "Add comment" button (when there are pending review comments), the quick-submit should submit the form with is_review=true even if the "Add comment" button is not really clicked. Close #20990
* Support Issue forms and PR forms (#20987)Jason Song2022-09-0212-10/+130
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * feat: extend issue template for yaml * feat: support yaml template * feat: render form to markdown * feat: support yaml template for pr * chore: rename to Fields * feat: template unmarshal * feat: split template * feat: render to markdown * feat: use full name as template file name * chore: remove useless file * feat: use dropdown of fomantic ui * feat: update input style * docs: more comments * fix: render text without render * chore: fix lint error * fix: support use description as about in markdown * fix: add field class in form * chore: generate swagger * feat: validate template * feat: support is_nummber and regex * test: fix broken unit tests * fix: ignore empty body of md template * fix: make multiple easymde editors work in one page * feat: better UI * fix: js error in pr form * chore: generate swagger * feat: support regex validation * chore: generate swagger * fix: refresh each markdown editor * chore: give up required validation * fix: correct issue template candidates * fix: correct checkboxes style * chore: ignore .hugo_build.lock in docs * docs: separate out a new doc for merge templates * docs: introduce syntax of yaml template * feat: show a alert for invalid templates * test: add case for a valid template * fix: correct attributes of required checkbox * fix: add class not-under-easymde for dropzone * fix: use more back-quotes * chore: remove translation in zh-CN * fix EasyMDE statusbar margin * fix: remove repeated blocks * fix: reuse regex for quotes Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Make sure fmt catches all templates (#20979)silverwind2022-08-3161-250/+250
| | | | | | | | * 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
* Remove black labels and CSS cleanup (#21003)silverwind2022-08-312-2/+2
| | | | Co-authored-by: John Olheiser <john.olheiser@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Go 1.19 format (#20758)John Olheiser2022-08-301-2/+12
| | | | | | | | | | | | | | | | | | | | | | | | * 1.19 gofumpt Signed-off-by: jolheiser <john.olheiser@gmail.com> * Change CSV test Signed-off-by: jolheiser <john.olheiser@gmail.com> * Commit whitespace fixes from @zeripath Co-authored-by: zeripath <art27@cantab.net> * Update emoji Signed-off-by: jolheiser <john.olheiser@gmail.com> * bump swagger & fix generate-swagger Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: Lauris BH <lauris@nix.lv>