aboutsummaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* Show more settings for empty repositories (#29130) (#30635)Lunny Xiao2024-04-231-4/+6
| | | | | | | | Fix #30620 Manullay Backport #29130 Shows more settings for empty repositories (Fixes #29060) Co-authored-by: Tim-Nicas Oelschläger <72873130+zokkis@users.noreply.github.com>
* Avoid losing token when updating mirror settings (#30429) (#30466)Lunny Xiao2024-04-151-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix #30416. Backport #30429 Before (it shows as "Unset" while there's a token): <img width="980" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/d7148e3e-62c9-4d2e-942d-3d795b79515a"> After: <img width="977" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/24aaa1db-5baa-4204-9081-470b15ea72b5"> The username shows as "oauth2" because of https://github.com/go-gitea/gitea/blob/f9fdac9809335729b2ac3227b2a5f71a62fc64ad/services/migrations/dump.go#L99 I have checked that all usage of `MirrorRemoteAddress` has been updated. <img width="1806" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/2f042501-2824-4511-9203-c84a6731a02d"> However, it needs to be checked again when backporting. Co-authored-by: Jason Song <i@wolfogre.com>
* Fix incorrect SVGs (#30087)silverwind2024-03-262-3/+3
| | | | Just the SVG fixes from https://github.com/go-gitea/gitea/pull/30086 for v1.21 branch.
* Remove duplicate option in admin screen and now-unused translation keys ↵wxiaoguang2024-03-231-2/+0
| | | | | | | | (#28492) (#30024) Backport #28492 Fix #30019 Co-authored-by: The Magician <142242365+TheMagician23@users.noreply.github.com>
* Fix manual merge form and 404 page templates (#30000)wxiaoguang2024-03-222-7/+3
| | | | | | Partially backport #29985, fix some template errors. * fix the manual-merge form * fix the 404 page
* Performance improvements for pull request list page (#29900) (#29972)Lunny Xiao2024-03-221-8/+8
| | | | | | | | | This PR will avoid load pullrequest.Issue twice in pull request list page. It will reduce x times database queries for those WIP pull requests. Partially fix #29585 Backport #29900
* Fix template error when comment review doesn't exist (#29888) (#29889)wxiaoguang2024-03-194-191/+209
| | | Backport #29888
* Fix bug on template (#29887)Lunny Xiao2024-03-181-2/+2
| | | | Caused by #29807 Fix #29886
* Fix codeowner detected diff base branch to mergebase (#29783) (#29807)Lunny Xiao2024-03-171-2/+2
| | | | | | | | | | | | | | | Fix #29763 Backport #29783 This PR fixes 2 problems with CodeOwner in the pull request. - Don't use the pull request base branch but merge-base as a diff base to detect the code owner. - CodeOwner detection in fork repositories will be disabled because almost all the fork repositories will not change CODEOWNERS files but it should not be used on fork repositories' pull requests. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix `for` attribute not pointing to the ID of the color picker (#29813) (#29815)Giteabot2024-03-151-1/+1
| | | | | | | Backport #29813 by @yardenshoham It didn't include the word picker. Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Fix missing translation on milestons (#29785) (#29789)Giteabot2024-03-141-2/+2
| | | | | | | | Backport #29785 by @lunny Caused by #26569 Fix #29778 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix incorrect package link method calls in templates (#29580) (#29764)wxiaoguang2024-03-135-5/+5
| | | | | | Backport #29580 Fix #29562 Fix #29762 Follow #29531
* Fix date rendering by adding `<gitea-absolute-date>` (#29725) (#29747)Giteabot2024-03-131-0/+10
| | | | | | | | | | | | | | | | | Backport #29725 by @silverwind Alternative to: https://github.com/go-gitea/gitea/pull/29698 Fixes: https://github.com/go-gitea/gitea/issues/29034 <img width="278" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/12ecd967-2723-410d-8a28-a1b0f41b7bba"> It also fixes a secondary issue that we were showing timestamp tooltips over date, which makes no sense, so these are now gone as well: <img width="284" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/a70432f3-97b6-41e6-b202-b53b76924a66"> Co-authored-by: silverwind <me@silverwind.io>
* Fix wrong line number in code search result (#29260) (#29623)Giteabot2024-03-063-28/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | Backport #29260 by @yp05327 Fix #29136 Before: The result is a table and all line numbers are all in one row. ![image](https://github.com/go-gitea/gitea/assets/18380374/7a18b354-e257-4f57-a5ca-f6d37378edf6) ![image](https://github.com/go-gitea/gitea/assets/18380374/98416e11-89b5-4b4f-920b-91bcf041a87f) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/f189e436-9046-4431-926a-cd0deb58e8f1) ![image](https://github.com/go-gitea/gitea/assets/18380374/07d213ed-2401-4b7f-b951-5df7dc776af4) ~~Updated:~~ ~~added `active` class to the target line.~~ ![image](https://github.com/go-gitea/gitea/assets/18380374/0b274e48-048a-4c66-ba95-df515212ec08) Co-authored-by: yp05327 <576951401@qq.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add a trailing slash to dashboard links (#29555) (#29573)wxiaoguang2024-03-041-6/+8
| | | Backport #29555
* Only use supported sort order for "explore/users" page (#29430) (#29443)wxiaoguang2024-03-031-2/+0
| | | | | | | | | | | | | | Backport #29430 Thanks to inferenceus : some sort orders on the "explore/users" page could list users by their lastlogintime/updatetime. It leaks user's activity unintentionally. This PR makes that page only use "supported" sort orders. Removing the "sort orders" could also be a good solution, while IMO at the moment keeping the "create time" and "name" orders is also fine, in case some users would like to find a target user in the search result, the "sort order" might help.
* Fix incorrect redirection when creating a PR fails (#29537) (#29543)Giteabot2024-03-023-21/+3
| | | | | | | Backport #29537 by wxiaoguang This is only a quick fix to make it easier to backport. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix incorrect subpath in links (#29535) (#29541)Giteabot2024-03-022-2/+2
| | | | | | | | | | Backport #29535 by wxiaoguang * `$referenceUrl`: it is constructed by "Issue.Link", which already has the "AppSubURL" * `window.location.href`: AppSubURL could be empty string, so it needs the trailing slash Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix URL calculation in clone input box (#29470) (#29473)Giteabot2024-02-281-7/+15
| | | | | | | | | | Backport #29470 by @silverwind Ported the function as-is and added comments so we don't forget about this in the future. Fixes: https://github.com/go-gitea/gitea/issues/29462 Co-authored-by: silverwind <me@silverwind.io>
* Fix template bug (#27581) (#29446)Lunny Xiao2024-02-271-1/+2
| | | | Fix #29152 Backport #27581
* Fix incorrect tree path value for patch editor (#29377) (#29421)Giteabot2024-02-261-2/+2
| | | | | | | | | | Backport #29377 by wxiaoguang Regression of #18718. When submitting the form, EditRepoFileForm.TreePath is marked as "Required", so the value can't be empty. The value is not used by backend, so use a meaningful dummy value for it. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add missing space (#29393) (#29399)Giteabot2024-02-261-1/+1
| | | | | Backport #29393 by @KN4CK3R Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* enforce maxlength in frontend (#29389) (#29396)Giteabot2024-02-254-5/+5
| | | | | | | | | | | | | | Backport #29389 by @zokkis Set maxlength attribute in frontend to long file-name ![image](https://github.com/go-gitea/gitea/assets/72873130/15111614-55ab-4583-acb2-15c25997601d) ![image](https://github.com/go-gitea/gitea/assets/72873130/4105ddd8-4973-4da8-b3ab-4cfae1b45554) (same for branch-name and commit-summary) Co-authored-by: Tim-Niclas Oelschläger <72873130+zokkis@users.noreply.github.com>
* Fix project counter in organization/individual profile (#28068) (#29361)Lunny Xiao2024-02-242-0/+6
| | | | | | | | | | | | | | | | | Fix #28052 Backport #28068 Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/5f299983-4b38-4d68-ac0e-4be3c62c0558) ![image](https://github.com/go-gitea/gitea/assets/18380374/f0e12afd-483b-4882-80e9-0261beb3fe0c) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/47cccb7b-bb35-4a7d-9c5b-83133be0323a) ![image](https://github.com/go-gitea/gitea/assets/18380374/77825c0c-4bf2-4762-83a2-1a5a173cc22d) Co-authored-by: yp05327 <576951401@qq.com>
* Fix XSS vulnerabilities (#29336)65432024-02-225-8/+8
| | | | | | | | | | | - The Wiki page did not sanitize author name - the reviewer name on a "dismiss review" comment is also affected - the migration page has some spots --------- Signed-off-by: jolheiser <john.olheiser@gmail.com> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-authored-by: jolheiser <john.olheiser@gmail.com>
* Do not show delete button when time tracker is disabled (#29257) (#29279)Zettat1232024-02-201-1/+1
| | | | | | | | | | | | Backport #29257 Fix #29233 The delete button of time logs won't be shown when the time tracker is disabled. ![image](https://github.com/go-gitea/gitea/assets/15528715/5cc4e0c9-d2f9-4b8f-a2f5-fe202b94c191) Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Disallow merge when required checked are missing (#29143) (#29268)Markus Amshove2024-02-191-2/+13
| | | | | | backport #29143 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Convert visibility to number (#29226) (#29244)Tim-Nicas Oelschläger2024-02-181-1/+1
| | | | | | | | | | | | Backport #29226 Don't throw error while creating user (Fixes #29218) --- The backport info from Giteabot https://github.com/go-gitea/gitea/pull/29226#issuecomment-1951341322 needs to specify the version, because the default is v1.18
* Rework spellchecking, add lint-spell (#29112)silverwind2024-02-162-2/+2
| | | | | | | | | | | | | | | | | Backport clean cherry-picks of https://github.com/go-gitea/gitea/commit/9c39f8515fa88d644736c6773d7a05d070a02e82 and https://github.com/go-gitea/gitea/commit/c7a21cbb0c5f8302495fa24baf218dc3462de2c5 onto 1.21. - Use maintained fork https://github.com/golangci/misspell - Rename `mispell-check` to `lint-spell`, add `lint-spell-fix` - Run `lint-spell` in separate actions step - Lint more files, fix discovered issues - Remove inaccurate and outdated info in docs (we do not need GOPATH for tools anymore) Maybe later we can add more spellchecking tools, but I have not found any good ones yet.
* Improve user experience for outdated comments (#29050) (#29086)Giteabot2024-02-081-0/+3
| | | | | | | | | | | | | | Backport #29050 by wxiaoguang Try to improve #28949 1. Make `ctx.Data["ShowOutdatedComments"] = true` by default: it brings consistent user experience, and sometimes the "outdated (source changed)" comments are still valuable. 2. Show a friendly message if the comment won't show, then the end users won't fell that "the comment disappears" (it is the special case when `ShowOutdatedComments = false`) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Hide code links on release page if user cannot read code (#29064) (#29066)Giteabot2024-02-061-24/+5
| | | | | | | | | | | | | | | | | | | | | Backport #29064 by @wolfogre On the release list page, if the user doesn't have the permission to read code, the code links will lead to 404 pages or api errors: <img width="1297" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/a74fbc63-6dd6-43c6-853c-28acdbfdcb4e"> After this PR: <img width="1297" alt="image" src="https://github.com/go-gitea/gitea/assets/9418365/a626373d-c2df-40a9-8fed-1b12ff6bc56f"> And this PR also removed some dead code. After #23465, the tag list page has an independent template, and all `IsTag` in the release list template are always false. Co-authored-by: Jason Song <i@wolfogre.com>
* Wrap contained tags and branches again (#29021) (#29026)Giteabot2024-02-021-2/+2
| | | | | | | | | | | | Backport #29021 by @delvh Fixes #29016 ## After ![grafik](https://github.com/go-gitea/gitea/assets/51889757/2c72ee8f-439e-4328-85df-77772e0f4aef) Co-authored-by: delvh <dev.lh@web.de>
* Fix incorrect button CSS usages (#29015) (#29023)Giteabot2024-02-023-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #29015 by @wxiaoguang Fix 2 problems: 1. Remove the legacy (non-existing) CSS: `class="btn btn-gray btn-radius"` 2. Remove the button styles inside the `ui message`, according to: https://fomantic-ui.com/collections/message.html , the button shouldn't have any border/padding. ### Before ![image](https://github.com/go-gitea/gitea/assets/2114189/4c7e98e2-4e8a-493f-9b7e-446a365066a1) ![image](https://github.com/go-gitea/gitea/assets/2114189/05221251-7a79-4c96-8973-fb4588275672) ### After ![image](https://github.com/go-gitea/gitea/assets/2114189/8bc3edbc-42a6-40bd-85fd-de40e94841d4) ![image](https://github.com/go-gitea/gitea/assets/2114189/93f69143-d835-437c-b5eb-0f6dddde97a1) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Preserve BOM in web editor (#28935) (#28959)Giteabot2024-01-271-2/+1
| | | | | | | | | | | | | | | | | | | | | | | Backport #28935 by @silverwind The `ToUTF8*` functions were stripping BOM, while BOM is actually valid in UTF8, so the stripping must be optional depending on use case. This does: - Add a options struct to all `ToUTF8*` functions, that by default will strip BOM to preserve existing behaviour - Remove `ToUTF8` function, it was dead code - Rename `ToUTF8WithErr` to `ToUTF8` - Preserve BOM in Monaco Editor - Remove a unnecessary newline in the textarea value. Browsers did ignore it, it seems but it's better not to rely on this behaviour. Fixes: https://github.com/go-gitea/gitea/issues/28743 Related: https://github.com/go-gitea/gitea/issues/6716 which seems to have once introduced a mechanism that strips and re-adds the BOM, but from what I can tell, this mechanism was removed at some point after that PR. Co-authored-by: silverwind <me@silverwind.io>
* Don't reload timeline page when (un)resolving or replying conversation ↵Jimmy Praet2024-01-242-133/+134
| | | | | | (#28654) (#28917) Backport #28654 Fixes #15981
* Render code block in activity tab (#28816) (#28818)Giteabot2024-01-171-7/+7
| | | | | | | | | | | | | | | Backport #28816 by @JakobDev This is a little bugfix. Inline code is usually rendered in issue titles, but it is missing in the activity tab. Before: ![Screenshot 2024-01-16 at 14-20-51 Test](https://github.com/go-gitea/gitea/assets/15185051/383370f3-0fb2-49de-81cc-014e5cf86727) After: ![grafik](https://github.com/go-gitea/gitea/assets/15185051/83eaf973-ce9a-44ce-beea-2db49fc8bd73) Co-authored-by: JakobDev <jakobdev@gmx.de>
* Rework markup link rendering (#26745) (#28803)KN4CK3R2024-01-169-17/+17
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #26745 Fixes #26548 This PR refactors the rendering of markup links. The old code uses `strings.Replace` to change some urls while the new code uses more context to decide which link should be generated. The added tests should ensure the same output for the old and new behaviour (besides the bug). We may need to refactor the rendering a bit more to make it clear how the different helper methods render the input string. There are lots of options (resolve links / images / mentions / git hashes / emojis / ...) but you don't really know what helper uses which options. For example, we currently support images in the user description which should not be allowed I think: <details> <summary>Profile</summary> https://try.gitea.io/KN4CK3R ![grafik](https://github.com/go-gitea/gitea/assets/1666336/109ae422-496d-4200-b52e-b3a528f553e5) </details>
* Forbid removing the last admin user (#28337) (#28793)Giteabot2024-01-161-0/+3
| | | | | | Backport #28337 by @yp05327 Co-authored-by: yp05327 <576951401@qq.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix links in issue card (#28806) (#28807)Giteabot2024-01-161-3/+3
| | | | | | | | Backport #28806 by @denyskon Fixes_ https://github.com/go-gitea/gitea/issues/23318#issuecomment-1611086747 Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
* Fix button size in "attached header right" (#28770) (#28774)Giteabot2024-01-123-5/+5
| | | | | Backport #28770 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Hide code related setting options in repository when code unit is disabled ↵Giteabot2024-01-112-19/+19
| | | | | | | | | | | | | | (#28631) (#28749) Backport #28631 by @lunny Since #20805, code can be hidden. However, the related settings are still shown even though they don't have any meaning then. https://github.com/go-gitea/gitea/assets/81045/5fdee54d-ac81-418a-82f7-eadff048cedd Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add download attribute to release attachments (#28739) (#28740)Giteabot2024-01-091-1/+1
| | | | | | | Backport #28739 by @JakobDev Fixes #28736 Co-authored-by: JakobDev <jakobdev@gmx.de>
* Avoid unnecessary 500 panic when a commit doesn't exist (#28719) (#28721)Giteabot2024-01-071-1/+1
| | | | | | | | | | | | | Backport #28719 by wxiaoguang In #26851, it assumed that `Commit` always exists when `PageIsDiff==true`. But for a 404 page, the `Commit` doesn't exist, so the following code would cause panic because nil value can't be passed as string parameter to `IsMultilineCommitMessage(string)` (or the StringUtils.Cut in later PRs) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Make template `DateTime` show proper tooltip (#28677) (#28683)wxiaoguang2024-01-031-1/+3
| | | Backport #28677
* switch destination directory for apt signing keys (#28639) (#28642)Giteabot2023-12-291-2/+2
| | | | | | | | | | | | | | | | | | | Backport #28639 by @denyskon According to [Debian docs](https://wiki.debian.org/DebianRepository/UseThirdParty): > The certificate MUST NOT be placed in /etc/apt/trusted.gpg.d or loaded by apt-key add. > ... > If future updates to the certificate will be managed by an apt/dpkg package as recommended below, then it SHOULD be downloaded into /usr/share/keyrings using the same filename that will be provided by the package. If it will be managed locally , it SHOULD be downloaded into /etc/apt/keyrings instead. > ... > A sources.list entry SHOULD have the signed-by option set. Co-authored-by: Denys Konovalov <kontakt@denyskon.de>
* Fix wrong due date rendering in issue list page (#28588) (#28591)Giteabot2023-12-221-1/+1
| | | | | | | | | Backport #28588 by @yardenshoham It included the hours, minutes, and seconds. By removing these, the date renders correctly. Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Yarden Shoham <git@yardenshoham.com>
* Fix 500 error of searching commits (#28576) (#28579)Giteabot2023-12-222-2/+2
| | | | | | | | | | Backport #28576 by wxiaoguang Regression of #28454 . Now the string is escaped HTML, so it doesn't need `| Safe`. Fix #28575 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix duplicate ID when deleting repo (#28520) (#28528)Giteabot2023-12-192-4/+4
| | | | | | | | | | | | | | | | | | | Backport #28520 by @framitdavid There is an accessibility issue in the interface when attempting to delete a repository. When I click on "Delete repository," a dialog box appears, requiring confirmation to proceed with the repository deletion. However, when I press the "Repo name" label, the wrong input field gains focus. The focused field is located behind the dialog and is intended for renaming the repository. I am submitting these pull requests to ensure that the correct input field is focused when the user clicks on the label. This change will also facilitate the writing of tests using Playwright or Testing Library to retrieve elements based on roles. This PR will also improve acessibility of this area. Co-authored-by: David Øvrelid <46874830+framitdavid@users.noreply.github.com>
* chore(api): support ignore password if login source type is LDAP for ↵Giteabot2023-12-191-2/+1
| | | | | | | | | | | | | creating user API (#28491) (#28525) Backport #28491 by @appleboy - Modify the `Password` field in `CreateUserOption` struct to remove the `Required` tag - Update the `v1_json.tmpl` template to include the `email` field and remove the `password` field Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-authored-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Improve the prompt for "ssh-keygen sign" (#28509) (#28510)Giteabot2023-12-181-1/+1
| | | | | | | Backport #28509 by wxiaoguang Close #28505 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>