summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* fetch emails of currently displayed user on admin page (#26918)techknowlogick2023-09-051-1/+1
| | | | Currently, this fetches the emails from the user viewing the page. This PR changes it to show the emails from the user whose page it is.
* Improve LDAP group config documentation, fixes #21159 (#21227)Sven Seeberg2023-09-052-8/+10
| | | | Improve the wording of the LDAP group attributes documentation and expand the examples.
* update footer link to new landing page (#26916)techknowlogick2023-09-051-1/+1
| | | | | as title Co-authored-by: Giteabot <teabot@gitea.io>
* Remove `Named` interface (#26913)KN4CK3R2023-09-0512-21/+12
| | | | `Named` is implemented by every `Method` and future implementations should implement the method too.
* Refactor secrets modification logic (#26873)KN4CK3R2023-09-0510-204/+344
| | | | - Share code between web and api - Add some tests
* Add missing `reqToken()` to notifications endpoints (#26914)JakobDev2023-09-052-3/+9
| | | | | | | | They currently throw a Internal Server Error when you use them without a token. Now they correctly return a `token is required` error. This is no security issue. If you use this endpoints with a token that don't have the correct permission, you get the correct error. This is not affected by this PR.
* feat(API): add routes and functions for managing user's secrets (#26909)Bo-Yi Wu2023-09-053-0/+190
| | | | | | | | | | | | | - Add routes for creating or updating a user's actions secrets in `routers/api/v1/api.go` - Add a new file `routers/api/v1/user/action.go` with functions for creating or updating a user's secrets and deleting a user's secret - Modify the `templates/swagger/v1_json.tmpl` file to include the routes for creating or updating a user's secrets and deleting a user's secret --------- Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Move feed notification service layer (#26908)Lunny Xiao2023-09-055-13/+14
| | | Extract from #22266
* Extract common code to new template (#26903)Kerwin Bryant2023-09-054-68/+25
| | | | | | | | | I noticed that the code of several new webhook pages is highly repetitive, so I pulled out the common parts to a new template, unified reference, unified maintenance --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Move ui notification to service layer (#26907)Lunny Xiao2023-09-053-3/+10
| | | Extract from #22266
* Remove duplicated notify mail configuration on tests (#26912)Lunny Xiao2023-09-053-3/+0
| | | | | Extract from #22266 Co-authored-by: Giteabot <teabot@gitea.io>
* Move indexer notification to service layer (#26906)Lunny Xiao2023-09-054-8/+22
| | | Extract from #22266
* Move mail notification logic to service layer (#26905)Lunny Xiao2023-09-053-21/+20
| | | Extract from #22266
* Improve DeleteByID (#26904)Lunny Xiao2023-09-051-1/+1
|
* Update backup instructions to align with archive structure (#26902)JonRB2023-09-051-7/+7
| | | | Signed-off-by: JonRB <jon.roadleybattin@gmail.com> fixes https://github.com/go-gitea/gitea/issues/25878
* More fixes for the "commit-body" (#26898)wxiaoguang2023-09-043-4/+5
| | | | | | | | | | | The changes for "commit-body" in #26877 are not ideal. The reason is: the "commit-body" is usually a `<pre>`, it has default margins. In most cases, we do not need that large margin. So, this PR introduces a general but small margin for all "commit-body" elements. Then these `gt-m-0` could be removed. The `:not` selector is not needed, because the `.timeline-item` selector is already clear enough.
* Show queue's active worker number (#26896)wxiaoguang2023-09-043-8/+12
|
* Remove CSS `has` selector and improve various styles (#26891)wxiaoguang2023-09-045-39/+38
| | | | | | | | | | | | | | | | | | | | Replace #26850 Major changes: 1. Remove all `has` selectors, it is still not supported by firefox. Actually there could be some more general and clearer approaches 2. Remove `two-toggle-buttons`, the `.ui.buttons` just works well 3. Rewrite the `.ui.buttons` border styles, see the screenshots 4. Remove the "fine-tuning" paddings from the the flex children, they could layout themselves well. ![image](https://github.com/go-gitea/gitea/assets/2114189/a32ed6f3-60f7-43d5-9492-62c45d2397f6) ![image](https://github.com/go-gitea/gitea/assets/2114189/5cb173c5-c942-4237-8cb4-2697220b3f06) ![image](https://github.com/go-gitea/gitea/assets/2114189/8a1c12b3-a632-48ff-b1a7-a01a4417f821) ![image](https://github.com/go-gitea/gitea/assets/2114189/46bde1bd-9113-4231-965d-6ec9076f6a3b)
* [skip ci] Updated licenses and gitignoresGiteaBot2023-09-042-0/+32
|
* Update documents to fix some links (#26885)Lunny Xiao2023-09-0310-13/+13
|
* clarify aspects of the dump command (#26887)JonRB2023-09-032-3/+3
| | | | | | | | | clarify aspects of the dump command Possibly closes #26862 --------- Co-authored-by: delvh <dev.lh@web.de>
* Relocate the `RSS user feed` button (#26882)BeYonme2023-09-031-3/+3
| | | | | | | | | | | before: ![before](https://github.com/go-gitea/gitea/assets/38558065/e33e0809-91cd-451a-9c36-ab20b9296038) after: ![after](https://github.com/go-gitea/gitea/assets/38558065/9dbfb0ce-1d0e-4bc8-8502-6b4af0fba220) Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Use Go 1.21 and update dependencies (#26878)wxiaoguang2023-09-035-79/+81
| | | | | | To make sure Gitea's next release's lifecycle could have active Golang support. And min/max are builtin now.
* Update docs about attachment path (#26883)CaiCandong2023-09-033-4/+5
| | | | | | | | | | | | | | | | | | This change was caused by #26271, for configuration as below: ``` [attachment] ENABLE = true PATH = data/attachments MAX_SIZE = 100 MAX_FILES = 5 ``` Before #26271, the resolved path is ${AppWorkPath}/${attachments.PATH} (such as `/var/lib/gitea/data/attachments`) After #26271, the resolved path is ${AppDataPath}/${attachments.PATH} (such as `/var/lib/gitea/data/data/attachments`) Fix https://github.com/go-gitea/gitea/issues/26864 Follow https://github.com/go-gitea/gitea/pull/26271
* Refactor "shortsha" (#26877)wxiaoguang2023-09-036-93/+16
| | | | | | | | | | | | | | | | | | | | The old code used complex `if` blocks and strange HTML layouts. <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/7fbee2b8-d150-4e6b-b67e-83400fa290eb) </details> This PR refactors the template code and remove legacy CSS styles. The UI doesn't change much. ![image](https://github.com/go-gitea/gitea/assets/2114189/3e195df9-0ab5-4182-bcb2-bb20cad823f2) ![image](https://github.com/go-gitea/gitea/assets/2114189/f707a49f-be41-4dfe-871f-2869f2230380)
* Fix wrong review requested number (#26784)Nanguan Lin2023-09-031-6/+15
| | | | | | | | | | Fix the wrong review requested number mentioned by #18808 . Fix #18808 Before: ![ksnip_20230829-140750](https://github.com/go-gitea/gitea/assets/70063547/0af2055b-6f16-4699-a944-c7186831d7f9) After: ![ksnip_20230829-141817](https://github.com/go-gitea/gitea/assets/70063547/16633264-20ba-45e3-bfbb-a495ed76a45b)
* Refactor `og:description` to limit the max length (#26876)wxiaoguang2023-09-032-5/+15
| | | | | | | | 1. The `og:description` should be "a one to two sentence description of your object" * It shouldn't output all the user inputted content -- it would be pretty huge. * Maybe it only needs at most 300 bytes. 2. Do not render commit message as HTML
* Reorder blocks in vue SFCs (#26874)silverwind2023-09-0213-679/+661
| | | | | | | | | | | | | The [recommended order](https://vuejs.org/guide/scaling-up/sfc.html) for SFC blocks is script -> template -> style, which we were violating because template and script were swapped. I do find script first also easier to read because the imports are on top, letting me immideatly see a component's dependencies. This is a pure cut-paste refactor with some removal of some empty lines. --------- Co-authored-by: Lauris BH <lauris@nix.lv>
* Make it posible to customize nav text color via css var (#26807)65432023-09-022-0/+5
| | | | --- *Sponsored by Kithara Software GmbH*
* Enable djlint H008 and fix issues (#26869)silverwind2023-09-016-14/+14
| | | Enable `H008 | Attributes should be double quoted` and fix issues.
* Improve opengraph previews (#26851)Linus Groh2023-09-012-36/+43
| | | | | | | | | | | | Add more useful Open Graph metadata for commit and file URLs: - Set `og:title` to the page title, which is a concise summary in both cases (`<commit message> · <commit hash>` and `<filename> at <branch>`, respectively) - Set `og:description` to the commit message body, if available - Set `og:url` to the relevant URLs instead of the repo URL Also move the relevant meta tags into a separate template as they now take up the majority of the base head template.
* Add more descriptive error on forgot password page (#26848)Jack Hay2023-09-013-4/+6
| | | | | | | | ## Changes - Forces flashed error to render immediately when forgot password code is incorrect or has expired. - Adds a link back to the `forgot_password` page so that the user can restart the process (in the event that their link has expired)
* Allow users with write permissions for issues to add attachments with API ↵Zettat1232023-09-011-1/+1
| | | | | | | | | (#26837) Fixes #24944 Since a user with write permissions for issues can add attachments to an issue via the the web interface, the user should also be able to add attachments via the API
* Move licenses.txt to /assets directory (#26866)silverwind2023-09-013-4/+5
| | | | | | | | | Now that we have the `/assets` directory, we can put`licenses.txt` directly into it instead of incorrect `/js` path which was previously only done to avoid reserving a username. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Use case-insensitive regex for all webpack assets (#26867)silverwind2023-09-011-6/+6
| | | | | Previously, only some of these regex had the `i` flag and while we can likely ensure case for our files, these regexes are also used for third-party files, so it's better to always match insensitively.
* restrict certificate type for builtin SSH server (#26789)Earl Warren2023-09-011-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | - While doing some sanity checks over OpenSSH's code for how they handle certificates authentication. I stumbled on an condition that checks the certificate type is really an user certificate on the server-side authentication. This checks seems to be a formality and just for the sake of good domain seperation, because an user and host certificate don't differ in their generation, verification or flags that can be included. - Add this check to the builtin SSH server to stay close to the unwritten SSH specification. - This is an breaking change for setups where the builtin SSH server is being used and for some reason host certificates were being used for authentication. - (cherry picked from commit de35b141b79a3d6efe2127ed2c73fd481515e481) Refs: https://codeberg.org/forgejo/forgejo/pulls/1172 ## :warning: BREAKING :warning: Like OpenSSH, the built-in SSH server will now only accept SSH user certificates, not server certificates. Co-authored-by: Gusted <postmaster@gusted.xyz> Co-authored-by: Giteabot <teabot@gitea.io>
* feat(API): add secret deletion functionality for repository (#26808)Bo-Yi Wu2023-09-014-4/+107
| | | | | | | | | | | | | | | - Modify the `CreateOrUpdateSecret` function in `api.go` to include a `Delete` operation for the secret - Modify the `DeleteOrgSecret` function in `action.go` to include a `DeleteSecret` operation for the organization - Modify the `DeleteSecret` function in `action.go` to include a `DeleteSecret` operation for the repository - Modify the `v1_json.tmpl` template file to update the `operationId` and `summary` for the `deleteSecret` operation in both the organization and repository sections --------- Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
* Avoid double-unescaping of form value (#26853)wxiaoguang2023-09-014-24/+6
| | | | | | | 1. The old `prepareQueryArg` did double-unescaping of form value. 2. By the way, remove the unnecessary `ctx.Flash = ...` in `MockContext`. Co-authored-by: Giteabot <teabot@gitea.io>
* Move web/api context related testing function into a separate package (#26859)wxiaoguang2023-09-0121-244/+244
| | | | | | | | | Just like `models/unittest`, the testing helper functions should be in a separate package: `contexttest` And complete the TODO: > // TODO: move this function to other packages, because it depends on "models" package
* Remove some unused CSS styles (#26852)wxiaoguang2023-09-012-13/+1
| | | | 1. `icons`: globally searched, no use in templates. 2. toast's `display: inline-block;`: there is a `display: flex` below.
* [skip ci] Updated translations via CrowdinGiteaBot2023-09-011-0/+31
|
* Minor dashboard tweaks, fix flex-list margins (#26829)silverwind2023-08-3112-23/+39
| | | | | | | | | | | | | | | | | | | | Some small dashboard tweaks: - Remove margin-bottom from divider so first item does not appear to have un-equal margins - Restore previous icon color - Add slight margin-right to icon Before: <img width="783" alt="Screenshot 2023-08-31 at 00 10 28" src="https://github.com/go-gitea/gitea/assets/115237/b75f70d7-8704-4afb-866d-fea0484c52d4"> After: <img width="783" alt="Screenshot 2023-08-31 at 00 10 08" src="https://github.com/go-gitea/gitea/assets/115237/50ed0c47-6f7c-449e-a054-13091369d43f"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Update team invitation email link (#26550)Jack Hay2023-08-315-10/+346
| | | | | Co-authored-by: Kyle D <kdumontnu@gmail.com> Co-authored-by: Jonathan Tran <jonnytran@gmail.com>
* Redirect from `{repo}/issues/new` to `{repo}/issues/new/choose` when blank ↵JakobDev2023-08-311-1/+9
| | | | | | | | | | issues are disabled (#26813) You can currently visit `{repo}/issues/new` and create a blank issue, even if it's disabled. This PR fixes this, Fixes https://codeberg.org/forgejo/forgejo/issues/1356 Co-authored-by: Giteabot <teabot@gitea.io>
* Remove "TODO" tasks from CSS file (#26835)wxiaoguang2023-08-319-40/+20
| | | | | | | | 1. Use `gt-invisible` instead of `invisible`. 2. Use `gt-word-break` instead of `dont-break-out` (there is a slight different "hyphens", but I think it won't affect too much since it is only used for the "full name"). 3. Remove `.small.button:has(svg)` , now our buttons could layout SVG correctly, and actually I didn't see this CSS class is used in code.
* User details page (#26713)Denys Konovalov2023-08-3112-43/+242
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This PR implements a proposal to clean up the admin users table by moving some information out to a separate user details page (which also displays some additional information). Other changes: - move edit user page from `/admin/users/{id}` to `/admin/users/{id}/edit` -> `/admin/users/{id}` now shows the user details page - show if user is instance administrator as a label instead of a separate column - separate explore users template into a page- and a shared one, to make it possible to use it on the user details page - fix issue where there was no margin between alert message and following content on admin pages <details> <summary>Screenshots</summary> ![grafik](https://github.com/go-gitea/gitea/assets/47871822/1ad57ac9-f20a-45a4-8477-ffe572a41e9e) ![grafik](https://github.com/go-gitea/gitea/assets/47871822/25786ecd-cb9d-4c92-90f4-e7f4292c073b) </details> Partially resolves #25939 --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Render code blocks in repo description (#26830)silverwind2023-08-314-10/+5
| | | | | | | | | | Backtick syntax now works in repo description too. Also, I replaced the CSS for this was a new single class, making it more flexible and not dependent on a parent. Also, very slightly reduced font size from 16.8px to 16px. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove joinPaths function (#26833)silverwind2023-08-313-53/+2
| | | | | | Extract from https://github.com/go-gitea/gitea/pull/25940. `assetUrlPrefix` is guaranteed to not contain trailing slashes, making this function unneeded.
* Remove polluted `.ui.right` (#26825)wxiaoguang2023-08-3125-72/+51
| | | | | | | | | | | | | Each change is tested manually line by line. There are too many changes so I can't share dozens of screenshots. In short: 1. `ui right` could be still used in `ui top attached header`, because there is a special case. 2. A lot of `ui right` are just no-op, so they can be removed safely. 3. Some of the `ui right` should be replaced by `gt-float-right` (to avoid breaking, leave them to the future). 4. A few of the `ui right` could be rewritten by flex.
* Sync tags when adopting repos (#26816)Zettat1232023-08-311-0/+4
| | | | | | | | | | Fixes #26138 Sync the tags into database when adopting repos --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>