aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Refactor DeleteInactiveUsers, fix bug and add tests (#30206) (#30222)Giteabot2024-04-013-33/+45
| | | | | | | | | | | | | Backport #30206 by wxiaoguang 1. check `IsActive` before calling `IsLastAdminUser`. 2. Fix some comments and error messages. 3. Don't `return err` if "removing file" fails in `DeleteUser`. 4. Remove incorrect `DeleteInactiveEmailAddresses`. Active users could also have inactive emails, and inactive emails do not support "olderThan" 5. Add tests Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix home topic edit form layout (#30213)wxiaoguang2024-03-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The UI has been refactored by #30191 , so here are 2 choices: 1. Backport #30191 2. Apply this quick fix Before: <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/0db583cf-8ce8-4fdb-9e4d-8c93fe6766c7) </details> After: <details> ![image](https://github.com/go-gitea/gitea/assets/2114189/0e732c4c-d28d-4c04-b328-72b9efd7daa9) </details> Co-authored-by: Giteabot <teabot@gitea.io>
* Fix markdown color code detection (#30208) (#30211)Giteabot2024-03-312-3/+26
| | | | | | | | | Backport #30208 by wxiaoguang When reviewing PRs, some color names might be mentioned, the `transformCodeSpan` (which calls `css.ColorHandler`) considered it as a valid color, but actually it shouldn't be rendered as a color codespan. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove `modifies/frontend` from labeler (#30198) (#30212)Giteabot2024-03-311-7/+0
| | | | | | | | | Backport #30198 by @silverwind Remove this label, I find it barely useful and we already have more useful labels like `modifies/js`. Backport so that we can eventually delete that label. Co-authored-by: silverwind <me@silverwind.io>
* Fix GPG subkey verify (#30193) (#30203)Giteabot2024-03-311-0/+4
| | | | | | | | | Backport #30193 by @KN4CK3R Fixes #30189 Can't verify subkeys if they are not loaded. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Do not allow different storage configurations to point to the same directory ↵Giteabot2024-03-3112-47/+75
| | | | | | | | | (#30169) (#30204) Backport #30169 by wxiaoguang Replace #29171 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix unclickable checkboxes (#30195) (#30199)Giteabot2024-03-312-5/+14
| | | | | | | | | | | | | | | | | | Backport #30195 by @silverwind Fix https://github.com/go-gitea/gitea/issues/30185, regression from https://github.com/go-gitea/gitea/pull/30162. The checkboxes were unclickable because the label was positioned over the checkbox with `padding`. Now it uses `margin` so the checkbox itself will be clickable in all cases. Secondly, I changed the for/id linking to also add missing `for` attributes when `id` is present. The other way around (only `for` present) is currently not handled and I think there are likey no occurences in the code and introducing new non-generated `id`s might cause problems elsewhere if we do, so I skipped on that. Co-authored-by: silverwind <me@silverwind.io>
* Include encoding in signature payload (#30174) (#30182)Giteabot2024-03-303-0/+75
| | | | | | | | | | | | | | | | | Backport #30174 by @KN4CK3R Fixes #30119 Include the encoding in the signature payload. before ![grafik](https://github.com/go-gitea/gitea/assets/1666336/01ab94a3-8af5-4d6f-be73-a10b65a15421) after ![grafik](https://github.com/go-gitea/gitea/assets/1666336/3a37d438-c70d-4d69-b178-d170e74aa683) Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Remove fomantic checkbox module (#30162) (#30168)Giteabot2024-03-2918-1730/+181
| | | | | | | | | | | | | | | | | | | | Backport #30162 by @silverwind CSS is pretty slim already and the `.ui.toggle.checkbox` sliders on admin page also still work. The only necessary JS is the one that links `input` and `label` so that it can be toggled via label. All checkboxes except the markdown ones render at `--checkbox-size: 16px` now. <img width="174" alt="Screenshot 2024-03-28 at 22 15 10" src="https://github.com/go-gitea/gitea/assets/115237/3455c1bb-166b-47e4-9847-2d20dd1f04db"> <img width="499" alt="Screenshot 2024-03-28 at 21 00 07" src="https://github.com/go-gitea/gitea/assets/115237/412be2b3-d5a0-478a-b17b-43e6bc12e8ce"> <img width="83" alt="Screenshot 2024-03-28 at 22 14 34" src="https://github.com/go-gitea/gitea/assets/115237/d8c89838-a420-4723-8c49-89405bb39474"> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de>
* Fix:the rounded corners of the folded file are not displayed correctly ↵Giteabot2024-03-291-1/+2
| | | | | | | | | | | | | | | | | | (#29953) (#30177) Backport #29953 by @HEREYUA Fix: [#29933](https://github.com/go-gitea/gitea/issues/29933) **Before** ![image](https://github.com/go-gitea/gitea/assets/37935145/71ec80f6-5896-4e4a-b686-4d792c11ebe2) **After** ![image](https://github.com/go-gitea/gitea/assets/37935145/81348a61-946a-4562-881d-8d873e50228f) Co-authored-by: HEREYUA <37935145+HEREYUA@users.noreply.github.com> Co-authored-by: silverwind <me@silverwind.io>
* Refactor topic Find functions and add more tests for pagination (#30127) ↵Giteabot2024-03-297-32/+70
| | | | | | | | | (#30167) Backport #30127 by @lunny This also fixed #22238 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Fix migration v292 (#30153)v1.22.0-rc0Lunny Xiao2024-03-286-134/+162
| | | | | | | | | | | | | Fix https://github.com/go-gitea/gitea/pull/29874#discussion_r1542227686 - The migration of v292 will miss many projects. These projects will have no default board. This PR introduced a new migration number and removed v292 migration. - This PR also added the missed transactions on project-related operations. - Only `SetDefaultBoard` will remove duplicated defaults but not in `GetDefaultBoard`
* Adjust VS Code debug filename match in .gitignore (#30158)Paweł Bogusławski2024-03-281-1/+1
|
* Prevent re-review and dismiss review actions on closed and merged PRs (#30065)Kemal Zebari2024-03-289-11/+170
| | | | | | | | | | | | | | | | | | | Resolves #29965. --- Manually tested this by: - Following the [installation](https://docs.gitea.com/next/installation/install-with-docker#basics) guide (but built a local Docker image instead) - Creating 2 users, one who is the `Owner` of a newly-created repository and the other a `Collaborator` - Had the `Collaborator` create a PR that the `Owner` reviews - `Collaborator` resolves conversation and `Owner` merges PR And with this change we see that we can no longer see re-request review button for the `Owner`: <img width="1351" alt="Screenshot 2024-03-25 at 12 39 18 AM" src="https://github.com/go-gitea/gitea/assets/60799661/bcd9c579-3cf7-474f-a51e-b436fe1a39a4">
* Render code tags in commit messages (#30146)silverwind2024-03-282-4/+4
| | | | | | | | | | | | | | | | | | Extend https://github.com/go-gitea/gitea/pull/21432 to commit messages. Color is changed because the markup code block bg does not offer enough contrast on varying backgrounds. <img width="568" alt="Screenshot 2024-03-27 at 19 52 55" src="https://github.com/go-gitea/gitea/assets/115237/ddc9307e-f32f-4e97-8b88-91f88ced2a36"> <img width="573" alt="Screenshot 2024-03-27 at 19 53 33" src="https://github.com/go-gitea/gitea/assets/115237/14b30fd2-bf28-46b8-9e82-eb60a28f6bf2"> <img width="422" alt="Screenshot 2024-03-27 at 19 53 01" src="https://github.com/go-gitea/gitea/assets/115237/a12136b5-c02b-460c-9830-f830542987ae"> <img width="397" alt="Screenshot 2024-03-27 at 19 53 27" src="https://github.com/go-gitea/gitea/assets/115237/c9f05d81-c73e-468e-98e9-e5929bc0da3e"> <img width="333" alt="Screenshot 2024-03-27 at 19 53 07" src="https://github.com/go-gitea/gitea/assets/115237/06b5a9f9-f95d-46b6-8c57-df0b02555652"> <img width="279" alt="Screenshot 2024-03-27 at 19 53 21" src="https://github.com/go-gitea/gitea/assets/115237/b06a0afc-ddd8-48ae-b557-a6dc47802e68">
* Bump `@github/relative-time-element` to v4.4.0 (#30154)Yarden Shoham2024-03-282-5/+5
| | | | | I tested and all timestamps work as before. Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Migrate font-family to tailwind (#30118)silverwind2024-03-2819-31/+37
| | | | | | | | | | | Enable us to use tailwind's [`font-family`](https://tailwindcss.com/docs/font-family) classes as well as remove `gt-mono` in favor of `tw-font-mono`. I also merged the "compensation" to one selector, previously this was two different values 0.9em and 0.95em. I did not declare a `serif` font because I don't think there will ever be a use case for those. Command ran: ```sh perl -p -i -e 's#gt-mono#tw-font-mono#g' web_src/js/**/* templates/**/*
* Move from `max( id )` to `max( index )` for latest commit statuses (#30076)YR Chen2024-03-281-47/+73
| | | | | | | | | | | | | | | | This PR replaces the use of `max( id )`, and instead using ``max( `index` )`` for determining the latest commit status. Building business logic over an `auto_increment` primary key like `id` is risky and there’re already plenty of discussions on the Internet. There‘s no guarantee for `auto_increment` values to be monotonic, especially upon failures or with a cluster. In the specific case, we met the problem of commit statuses being outdated when using TiDB as the database. As [being documented](https://docs.pingcap.com/tidb/stable/auto-increment), `auto_increment` values assigned to an `insert` statement will only be monotonic on a per server (node) basis. Closes #30074.
* Remember login for a month by default (#30150)delvh2024-03-284-4/+4
| | | | | | | | | | | | | | | Previously, the default was a week. As most instances don't set the setting, this leads to a bad user experience by default. ## :warning: Breaking If your instance requires a high level of security, you may want to set `[security].LOGIN_REMEMBER_DAYS` so that logins are not valid as long. --------- Co-authored-by: Jason Song <i@wolfogre.com>
* Apply to become a maintainer (#30151)HEREYUA2024-03-281-0/+1
| | | | | PRs:https://github.com/go-gitea/gitea/pulls?q=is%3Apr+author%3AHEREYUA+is%3Aclosed Discord: hereyua
* Refactor markdown render (#30139)wxiaoguang2024-03-288-257/+364
| | | | Only split the file into small ones (and rename AttentionTypes to attentionTypes)
* Drag-and-drop improvements for projects and issue pins (#29875)silverwind2024-03-286-10/+27
| | | | | | | | | | | | | | | 1. Add "grabbing" cursor while dragging items: ![](https://github.com/go-gitea/gitea/assets/115237/c60845ff-7544-4215-aeaa-408e8c4ef03a) 2. Make project board only drag via their header, not via their whole body. ![](https://github.com/go-gitea/gitea/assets/115237/62c27f3d-993a-481d-9cc3-b6226b4c5d61) 3. Fix some cursor problems in projects 4. Move shared options into `createSortable`.
* Fix table alignment classes (#30144)silverwind2024-03-271-0/+25
| | | | | Fixes https://github.com/go-gitea/gitea/issues/30142, regression from https://github.com/go-gitea/gitea/pull/30047. I searched the codebase and only `bottom aligned` was definitely not in use so I removed it.
* Add default board to new projects, remove uncategorized pseudo-board (#29874)Denys Konovalov2024-03-2717-195/+399
| | | | | | | | | | | | | | | | | | On creation of an empty project (no template) a default board will be created instead of falling back to the uneditable pseudo-board. Every project now has to have exactly one default boards. As a consequence, you cannot unset a board as default, instead you have to set another board as default. Existing projects will be modified using a cron job, additionally this check will run every midnight by default. Deleting the default board is not allowed, you have to set another board as default to do it. Fixes #29873 Fixes #14679 along the way Fixes #29853 Co-authored-by: delvh <dev.lh@web.de>
* Fix loading spinner on ContextPopup (#30145)silverwind2024-03-271-1/+1
| | | | | | | Fix regression from https://github.com/go-gitea/gitea/pull/26670. Here with simulated delay: ![](https://github.com/go-gitea/gitea/assets/115237/9de5a136-c8a6-4d69-adc7-07e1184e3311)
* Fix download buttons on branches page (#30147)silverwind2024-03-272-1/+2
| | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/30143, regression from https://github.com/go-gitea/gitea/pull/29920. We have `.button` on the repo page, but on the branch page it's a `.btn`. Eventually we should find a solution to have a single button class but until then this solution should be acceptable.
* Relax generic package filename restrictions (#30135)wxiaoguang2024-03-273-7/+91
| | | | | | | | Now, the chars `=:;()[]{}~!@#$%^ &` are possible as well Fixes #30134 --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Remove jQuery class from the common admin functions (#30137)Yarden Shoham2024-03-271-7/+6
| | | | | | | | - Switched from jQuery class functions to plain JavaScript `classList` - Tested the new authentication source form and the deletion of system notices. They work as before Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery class from the reaction selector (#30138)Yarden Shoham2024-03-271-1/+1
| | | | | | | - Switched from jQuery class functions to plain JavaScript `classList` - Tested the reaction selector and it works as before Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Forbid jQuery `.attr` (#30116)Yarden Shoham2024-03-271-2/+2
| | | | | Use `.getAttribute`, `.setAttribute`, or `.removeAttribute` instead Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Refactor render (#30136)wxiaoguang2024-03-271-8/+7
|
* Fix: Organization Interface Display Issue (#30133)HEREYUA2024-03-272-2/+2
| | | | | | | | | **Before** ![image](https://github.com/go-gitea/gitea/assets/37935145/88d04a4b-6dc5-4399-9813-2c339eae3722) **After** ![image](https://github.com/go-gitea/gitea/assets/37935145/e97a64b8-ea24-4de7-992d-5928888872d0)
* Remove jQuery `.attr` from the Fomantic dropdowns (#30114)Yarden Shoham2024-03-271-56/+64
| | | | | | | | - Switched from jQuery `attr` to plain javascript `getAttribute` and `setAttribute` - Tested the dropdowns and they work as before Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery `.attr` from the common admin functions (#30115)Yarden Shoham2024-03-271-62/+91
| | | | | | | | | | - Switched from jQuery `attr` to plain javascript `getAttribute` and `setAttribute` - Tested most of the functions and they work as before --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery from the create/rename branch modals (except Fomantic) (#30109)Yarden Shoham2024-03-271-25/+25
| | | | | | | | | | | | | | | | - Switched to plain JavaScript - Tested the create/rename branch modals' functionality and they work as before # Demo using JavaScript without jQuery ![demo](https://github.com/go-gitea/gitea/assets/20454870/ca53155e-856e-44ca-9852-12ff60065735) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove fomantic label module (#30081)silverwind2024-03-276-1331/+296
| | | | | | | | | | | Of note is the CSS has references to "floating label" and "transparent label" but I could not find those anywhere in the code. They are related to https://github.com/go-gitea/gitea/pull/3939, but I think these have long been removed. --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Fix bug for markdown rendering of blockquote (#30130)Lunny Xiao2024-03-271-4/+10
| | | | | | | Caused by #29984 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix: The interface is broken when modifying code comments under mobile ↵HEREYUA2024-03-271-3/+0
| | | | | | | | | | | | | | devices (#30125) **Fix**: [#30123](https://github.com/go-gitea/gitea/issues/30123) **Before** ![image](https://github.com/go-gitea/gitea/assets/37935145/2a186399-85b0-480a-b2f9-f4feffd9a8e2) **After** ![image](https://github.com/go-gitea/gitea/assets/37935145/ce1ce3e4-3bbb-4a4b-b0e7-e7943a0774f2)
* When the title in the issue has a value, set the text cursor at the end of ↵HEREYUA2024-03-273-1/+9
| | | | | | | | | | | | | | | the text. (#30090) Fix: [#25055](https://github.com/go-gitea/gitea/issues/25055) Before ![image](https://github.com/go-gitea/gitea/assets/37935145/1b89cd7b-4fa3-49aa-9b5e-a8413add436e) After ![image](https://github.com/go-gitea/gitea/assets/37935145/fa808f8d-d3ce-4245-a4fe-dd0282ba3fdf) ps: I've noticed that we are gradually replacing jQuery, so I didn't use jQuery here.
* Load attachments for code comments (#30124)yp053272024-03-271-0/+4
| | | | | | Fix #30103 ps: comments has `LoadAttributes`, but maybe considering performance problem, we don't call it.
* Upgrade fabric to 6.0.0-beta20 (#30121)silverwind2024-03-271-1/+1
| | | | Fixes https://github.com/go-gitea/gitea/issues/29326 because it includes https://github.com/fabricjs/fabric.js/pull/9707.
* Fix click handler in job-step-summary (#30122)silverwind2024-03-271-1/+1
| | | | | Fix mistake from https://github.com/go-gitea/gitea/pull/29977 where the click handler wasn't updated for the change with the `isExpandable` function.
* Put an edit file button on pull request files to allow a quick operation ↵Lunny Xiao2024-03-278-24/+91
| | | | | | | | | | | | | | | | | | | | (#29697) Resolve #23848 This PR put an edit file button on pull request files to allow a quick edit for a file. After the edit finished, it will return back to the viewed file position on pull request files tab. It also use a branch view file link instead of commit link when it's a non-commit pull request files view. <img width="1532" alt="image" src="https://github.com/go-gitea/gitea/assets/81045/3637ca4c-89d5-4621-847b-79702a44f617"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Remove jQuery `.attr` from the Fomantic modal cancel buttons (#30113)Yarden Shoham2024-03-261-1/+3
| | | | | | | | - Switched from jQuery `attr` to plain javascript `setAttribute` - Tested the modals and they work as before --------- Co-authored-by: silverwind <me@silverwind.io>
* Remove jQuery `.attr` from the code comments (#30112)Yarden Shoham2024-03-261-60/+71
| | | | | | | | | | - Switched from jQuery `attr` to plain javascript `getAttribute` - Tested the code comments and they work as before --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery calls that have no effect on `showElem` and `hideElem` (#30110)Yarden Shoham2024-03-263-22/+22
| | | | | | There's no need to initialize a jQuery object with a CSS selector when we can pass the CSS selector directly. Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Remove jQuery `.attr` from the common issue page functions (#30083)Yarden Shoham2024-03-261-73/+83
| | | | | | | | | | | - Switched from jQuery `attr` to plain javascript `getAttribute` and `setAttribute` - Tested most of the functions and they work as before --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de>
* Restore aligned grid column CSS (#30106)silverwind2024-03-261-0/+18
| | | Fixes #30097, regression from #29894.
* Fix possible data race on tests (#30093)Lunny Xiao2024-03-261-1/+0
|
* Add svg linter and fix incorrect svgs (#30086)silverwind2024-03-266-4/+36
| | | | | | | | | | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/30082. Adds a new linter that searches for non-existant SVG images in templates. Output before the fix was: ``` $ make lint-templates SVG "octicon-warning" not found, used in templates/devtest/flex-list.tmpl SVG "octicon-warning" not found, used in templates/devtest/flex-list.tmpl SVG "octicon-markup" not found, used in templates/repo/diff/comment_form.tmpl make: *** [Makefile:438: lint-templates] Error 1 ``` <img width="306" alt="Screenshot 2024-03-25 at 23 31 05" src="https://github.com/go-gitea/gitea/assets/115237/1052d1a9-bfec-4d5a-9cae-f895f78f7c93">