summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* [skip ci] Updated translations via CrowdinGiteaBot2024-03-062-2/+34
| | | | | | | | | (cherry picked from commit a6eb298098983b7aae028fff4d80d15d5510f10b) Conflicts: options/locale/locale_zh-CN.ini branding Gitea/Forgejo conflict new transations in [graphs]
* migrate some more "OptionalBool" to "Option[bool]" (#29479)65432024-03-0623-174/+183
| | | | | | | | | | | | | | just some refactoring bits towards replacing **util.OptionalBool** with **optional.Option[bool]** --------- Co-authored-by: KN4CK3R <admin@oldschoolhack.me> (cherry picked from commit f6656181e4a07d6c415927220efa2077d509f7c6) Conflicts: models/repo/repo_list_test.go trivial shared fixture count conflicts
* Lighten text colors on dark theme for increased contrast (#29481)silverwind2024-03-062-16/+16
| | | | | | | | Improve contrast by lightening the text colors in dark theme by around 35%. Additionally, share some variables that had the same or similar color, which will ease future theme creation. (cherry picked from commit e94e2fb6c5484070d56977644213d735df9e0c10)
* Improve contrast on blame timestamp, fix double border (#29482)silverwind2024-03-061-1/+5
| | | | | | | | | | | | | | | | Before, double border on top, bad contrast on dark: <img width="155" alt="Screenshot 2024-02-29 at 02 06 17" src="https://github.com/go-gitea/gitea/assets/115237/fc0f1e08-a5ce-47ed-9eb6-135eed5a1abb"> <img width="126" alt="Screenshot 2024-02-29 at 02 07 28" src="https://github.com/go-gitea/gitea/assets/115237/38ae8483-8d9b-484c-8909-d4466131ea16"> After, no double border on top, good contrast: <img width="154" alt="Screenshot 2024-02-29 at 02 20 20" src="https://github.com/go-gitea/gitea/assets/115237/ad91282b-e9f5-4f41-8f5e-6ba28db3beac"> <img width="147" alt="Screenshot 2024-02-29 at 02 20 38" src="https://github.com/go-gitea/gitea/assets/115237/7ee2ec92-e72a-4981-aec3-98fc8e579bae"> (cherry picked from commit 6e1873288f86ca4de4d1943919343f342c7abcd9)
* Fix/Improve `processWindowErrorEvent` (#29407)silverwind2024-03-061-21/+36
| | | | | | | | | | | - `e.error` can be undefined in some cases which would raise an error inside this error handler, fixed that. - The displayed message mentions looking into the console, but in my case of error from `ResizeObserver` there was nothing there, so add this logging. I think this logging was once there but got lost during refactoring. (cherry picked from commit 6d9b7253a2de00b5dfc27550cf7e015e819d6fd2)
* Apply compact padding to small buttons with svg icons (#29471)silverwind2024-03-062-1/+8
| | | | | | | | | | | | | | | | | | | | | | | | | The buttons on the repo release tab were larger in height than on other tabs because one of them contained the RSS icon which stretched the button height by 3px. Workaround this problem by applying the "compact" padding to any such button. They are within 0.4px in height now to non-icon buttons. Before: <img width="406" alt="Screenshot 2024-02-28 at 15 30 23" src="https://github.com/go-gitea/gitea/assets/115237/805bb93a-6fe4-40a0-82d1-03001bee8ecf"> After: <img width="407" alt="Screenshot 2024-02-28 at 15 38 43" src="https://github.com/go-gitea/gitea/assets/115237/27707588-890f-4852-ab08-105a57eda880"> For comparison, button on issue tab: <img width="452" alt="Screenshot 2024-02-28 at 15 31 46" src="https://github.com/go-gitea/gitea/assets/115237/74ac13d5-d016-49ba-9dd9-40ed32a748e9"> (cherry picked from commit 850fc2516e67049ec195c72d861896b275bd09d1)
* Fix counter display number incorrectly displayed on the page (#29448)charles2024-03-061-0/+2
| | | | | | | | | | | | | | | | | issue : #28239 The counter number script uses the 'checkbox' attribute to determine whether an item is selected or not. However, the input event only increments the counter value, and when more items are displayed, it does not update all previously loaded items. As a result, the display becomes incorrect because it triggers the update counter script, but checkboxes that are selected without the 'checked' attribute are not counted (cherry picked from commit 252047ed2e09e3f1f1ab394cd62995cf4cabe506)
* Fix incorrect user location link on profile page (#29474)wxiaoguang2024-03-061-2/+3
| | | | | | Fix #29472. Regression of #29236, a "if" check was missing. (cherry picked from commit 10cfa0879a538a470598281d7093de3555c018be)
* Fix workflow trigger event bugs (#29467)Zettat1232024-03-062-1/+10
| | | | | | | | | 1. Fix incorrect `HookEventType` for issue-related events in `IssueChangeAssignee` 2. Add `case "types"` in the `switch` block in `matchPullRequestEvent` to avoid warning logs (cherry picked from commit 1ad4bb9eb7641a552c5b88a43eb91d59ec5c0edf)
* Fix URL calculation in clone input box (#29470)silverwind2024-03-062-9/+18
| | | | | | | | 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 (cherry picked from commit 82405f808d7b50c3580f26e5ca645e2ed6d284ab)
* Remove jQuery from the "find file" page (#29456)Yarden Shoham2024-03-061-31/+29
| | | | | | | | | | | | | | | - Switched to plain JavaScript - Tested the file searching functionality and it works as before # Demo using JavaScript without jQuery ![action](https://github.com/go-gitea/gitea/assets/20454870/8ceef0ed-ab87-448c-8b9b-9b5c0cd8bebd) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io> (cherry picked from commit 71e0f185f9773d1cc4909867a10c86f74d12ce8d)
* Move generate from module to service (#29465)Lunny Xiao2024-03-068-82/+97
| | | | (cherry picked from commit b5188cd55c535a588492fb4e153d646ec4f3232a)
* The job should always run when `if` is `always()` (#29464)Zettat1232024-03-062-1/+76
| | | | | | | | | | | | | | | | | Fix #27906 According to GitHub's [documentation](https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#jobsjob_idneeds), a job should always run when its `if` is `always()` > If you would like a job to run even if a job it is dependent on did not succeed, use the `always()` conditional expression in `jobs.<job_id>.if`. --------- Co-authored-by: Giteabot <teabot@gitea.io> (cherry picked from commit d0fe6ea4e101198911383058a2e121e384934a9c)
* Recolor dark theme to blue shade (#29283)silverwind2024-03-061-95/+95
| | | | | | | | | | | | | | | | | | | | Now uses the same primary color as light theme. The secondary colors are shifted towards a slightly blue shade. Could maybe desaturate a bit more, but overall I think I'm happy with it. Fixes: https://github.com/go-gitea/gitea/issues/27097 <img width="1343" alt="Screenshot 2024-02-27 at 22 21 46" src="https://github.com/go-gitea/gitea/assets/115237/4163c393-b469-4a53-8f4b-1c33aa04f3ac"> <img width="581" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/e621f7f8-5679-4605-bf42-3d5ff1071e1e"> <img width="581" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/20e66493-2457-482b-b8f1-e5710934e189"> --------- Co-authored-by: Giteabot <teabot@gitea.io> (cherry picked from commit d557fbc5a715a1920a2860cb04ae6c8fe2225182)
* Let ctx.FormOptionalBool() return optional.Option[bool] (#29461)65432024-03-065-19/+22
| | | | | | | just some refactoring bits towards replacing **util.OptionalBool** with **optional.Option[bool]** (cherry picked from commit 274c0aea2e88db9bc41690c90e13e8aedf6193d4)
* Fix missed return (#29450)Lunny Xiao2024-03-061-0/+1
| | | | (cherry picked from commit e9f4c2db8291c54044345aebd9381ac820ed9687)
* Use tailwind instead of `gt-[wh]-` helper classes (#29423)Lunny Xiao2024-03-067-16/+10
| | | | | | | | | | | | | Follow #29357 - Replace `gt-w-*` -> `tw-w-*` and remove `gt-w-*` - Replace `gt-h-*` -> `tw-h-*` and remove `gt-h-*` (cherry picked from commit 9a8c90ee18095d284192476834d5d23074d136f3) Conflicts: templates/base/head_navbar.tmpl templates/status/404.tmpl trivial context conflict
* Only use supported sort order for "explore/users" page (#29430)wxiaoguang2024-03-065-6/+79
| | | | | | | | | | | | | | | | | 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. ![image](https://github.com/go-gitea/gitea/assets/2114189/ce5c39c1-1e86-484a-80c3-33cac6419af8) (cherry picked from commit eedb8f41297c343d6073a7bab46e4df6ee297a90)
* Not trigger all jobs any more, when re-running the first job (#29439)sillyguodong2024-03-061-3/+8
| | | | | | | | Previously, it will be treated as "re-run all jobs" when `jobIndex == 0`. So when you click re-run button on the first job, it triggers all the jobs actually. (cherry picked from commit bad4ad70181c747599e206c0e7a87b57c997385d)
* Move context from modules to services (#29440)Lunny Xiao2024-03-06373-390/+384
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Since `modules/context` has to depend on `models` and many other packages, it should be moved from `modules/context` to `services/context` according to design principles. There is no logic code change on this PR, only move packages. - Move `code.gitea.io/gitea/modules/context` to `code.gitea.io/gitea/services/context` - Move `code.gitea.io/gitea/modules/contexttest` to `code.gitea.io/gitea/services/contexttest` because of depending on context - Move `code.gitea.io/gitea/modules/upload` to `code.gitea.io/gitea/services/context/upload` because of depending on context (cherry picked from commit 29f149bd9f517225a3c9f1ca3fb0a7b5325af696) Conflicts: routers/api/packages/alpine/alpine.go routers/api/v1/repo/issue_reaction.go routers/install/install.go routers/web/admin/config.go routers/web/passkey.go routers/web/repo/search.go routers/web/repo/setting/default_branch.go routers/web/user/home.go routers/web/user/profile.go tests/integration/editor_test.go tests/integration/integration_test.go tests/integration/mirror_push_test.go trivial context conflicts also modified all other occurrences in Forgejo specific files
* Apply tailwindcss rules with `!important` (#29437)silverwind2024-03-061-0/+1
| | | | | | | | | | | | As per discussion in https://github.com/go-gitea/gitea/pull/29423, I think this is the right way that does not burden developers having to think about CSS precedence which should be irrelevant with an atomic CSS framework. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> (cherry picked from commit e55926ebfe88d6ee079842967dc7dccc2a9cdbf2)
* Fix mail template error (#29410)wxiaoguang2024-03-062-3/+9
| | | | (cherry picked from commit eb2fc1818b00b7ca6f8c21bb490a8e8be1e62f9a)
* Fix htmx rendering the login page in frame on session logout (#29405)Yarden Shoham2024-03-061-0/+8
| | | | | | | | | | | | | | | | | | - Fix #29391 With this change, htmx will not follow the redirect in the AJAX request but instead redirect the whole browser. To reproduce the bug fixed by this change without waiting a long time for the token to expire, you can logout in another tab then look in the original tab. Just make sure to comment out both instances of `window.location.href = appSubUrl` in the codebase so you won't be redirected immediately on logout. This is what I did in the following gifs. Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: Giteabot <teabot@gitea.io> (cherry picked from commit 324626a11c041208b003ee64e33000b223994662)
* Ignore empty repo for CreateRepository in action notifier (#29416)yp053272024-03-061-0/+3
| | | | | | Fix #29415 (cherry picked from commit 403766cd81697288804fd218d68c458c6aa5b73d)
* Fix logic error from #28138 (#29417)yp053272024-03-061-1/+1
| | | | | | | | | | | | | | | There's a miss in #28138: ![image](https://github.com/go-gitea/gitea/assets/18380374/b1e0c5fc-0e6e-44ab-9f6e-34bc8ffbe1cc) https://github.com/go-gitea/gitea/pull/28138/files#diff-2556e62ad7204a230c91927a3f2115e25a2b688240d0ee1de6d34f0277f37dfeR162 @lunny Not sure about the impact of this, but it will only effect 1.22, and maybe we should fix it ASAP. Co-authored-by: KN4CK3R <admin@oldschoolhack.me> (cherry picked from commit f8c1efe944c539396402fb014bbfdb67ba199ef2)
* Include resource state events in Gitlab downloads (followup)Earl Warren2024-03-0622-414/+335
| | | | | | | | See also: [GITEA] Enable mocked HTTP responses for GitLab migration test make GITLAB_READ_TOKEN=XXXX GO_TEST_PACKAGES='code.gitea.io/gitea/services/migrations/... -test.v' FLAGS= 'test#TestGitlabDownloadRepo' to update the captured GitLab HTTP requests used for offline testing.
* Include resource state events in Gitlab downloads (#29382)Sebastian Brückner2024-03-064-40/+86
| | | | | | | | | | | | | Some specific events on Gitlab issues and merge requests are stored separately from comments as "resource state events". With this change, all relevant resource state events are downloaded during issue and merge request migration, and converted to comments. This PR also updates the template used to render comments to add support for migrated comments of these types. ref: https://docs.gitlab.com/ee/api/resource_state_events.html (cherry picked from commit 17f170ee3724d8bdf2ddaad4211b12433f78ff0e)
* [skip ci] Updated translations via CrowdinGiteaBot2024-03-062-2/+43
| | | | (cherry picked from commit f38888bc7834899777bda1a271e166d3836524cf)
* Merge pull request '[CI] pin go v1.21.8 version' (#2567) from ↵Earl Warren2024-03-067-14/+12
|\ | | | | | | | | | | earl-warren/forgejo:wip-ci-go-action into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2567
| * bump protobuf module (#29617)techknowlogick2024-03-062-3/+3
| | | | | | | | (cherry picked from commit 06039bf0b7ec4dffe74ae323b8bbbbedec69d0c8)
| * [CI] pin go v1.21.8 versionEarl Warren2024-03-065-11/+9
|/ | | | | | Because setup-go fails to pick it up. Refs: https://github.com/actions/setup-go/issues/462
* [CI] do not hardcode the Forgejo release in end-to-end testing (part 2)Earl Warren2024-03-061-1/+1
| | | | The absence of origin-ref must be the empty string '', not 'false'
* Merge pull request '[CI] do not hardcode the Forgejo release in end-to-end ↵Earl Warren2024-03-053-15/+75
|\ | | | | | | | | | | testing' (#2564) from earl-warren/forgejo:wip-ci-end-to-end into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2564
| * [CI] do not hardcode the Forgejo release in end-to-end testingEarl Warren2024-03-053-15/+75
| | | | | | | | | | | | | | | | Now that Forgejo has its own release number, use the Makefile as a reference. Also document and improve support for debugging this pull_request_target workflow by using a branch in the repository.
* | Merge pull request 'Add gitignore template for Janet projects' (#2557) from ↵Earl Warren2024-03-051-0/+4
|\ \ | |/ |/| | | | | | | | | firefly-cpp/forgejo:gitignore-for-janet into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2557 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
| * Add gitignore template for Janet projectsIztok Fister Jr.2024-03-041-0/+4
|/
* Merge pull request 'Move migration functions to services layer - port of ↵Earl Warren2024-03-045-271/+290
|\ | | | | | | | | | | | | gitea#29497' (#2546) from algernon/forgejo:gitea/port/29497 into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2546 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
| * Move migration functions to services layer (#29497)Lunny Xiao2024-03-045-271/+290
| |
* | Merge pull request 'Display tag name as title for a tag with no release ↵Earl Warren2024-03-043-1/+17
|\ \ | |/ |/| | | | | | | | | [gitea]' (#2547) from algernon/forgejo:gitea/port/tag-name-as-title-if-no-release into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2547 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
| * A release title should always be a linkGergely Nagy2024-03-042-2/+2
| | | | | | | | | | | | | | | | This partially reverts c41b2c73ef21d5c54c7f2658ceffaa163b135131: for the sake of consistency, the title of a release should always be a link, whether it's a tag-only release or not. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
| * Test that tags without a release display properlyGergely Nagy2024-03-041-0/+8
| | | | | | | | | | | | | | Update the `TestTagViewWithoutRelease` test case with another assert: one that checks that the release title is properly displayed. Signed-off-by: Gergely Nagy <forgejo@gergo.csillger.hu>
| * Display tag name as title for a tag with no releaseLunny Xiao2024-03-042-2/+10
|/
* [I18N] Translations update from Weblate (#2521)Codeberg Translate2024-03-048-326/+897
| | | | | | | | | | | | | | | | | | | | | | | Translations update from [Weblate](https://translate.codeberg.org) for [Forgejo/forgejo](https://translate.codeberg.org/projects/forgejo/forgejo/). Current translation status: ![Weblate translation status](https://translate.codeberg.org/widget/forgejo/forgejo/horizontal-auto.svg) Co-authored-by: 0ko <0ko@users.noreply.translate.codeberg.org> Co-authored-by: TheAwiteb <a@4rs.nl> Co-authored-by: mondstern <mondstern@monocles.de> Co-authored-by: flactwin <flac_twin@keemail.me> Co-authored-by: Gusted <postmaster@gusted.xyz> Co-authored-by: Salif Mehmed <mail@salif.eu> Co-authored-by: Fjuro <ifjuro@proton.me> Co-authored-by: Wuzzy <wuzzy@disroot.org> Co-authored-by: fnetX <otto@codeberg.org> Co-authored-by: zenobit <zen@osowoso.xyz> Co-authored-by: Dirk <dirk@0x7be.de> Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2521 Co-authored-by: Codeberg Translate <translate@noreply.codeberg.org> Co-committed-by: Codeberg Translate <translate@noreply.codeberg.org>
* Merge pull request '[TESTS] enable AddFixtures in unit tests' (#2541) from ↵Earl Warren2024-03-031-2/+2
|\ | | | | | | | | | | earl-warren/forgejo:wip-add-fixture into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2541
| * [TESTS] enable AddFixtures in unit testsEarl Warren2024-03-031-2/+2
|/ | | | | | | | | | Use setting.AppWorkPath instead of filepath.Dir(setting.AppPath). It is the common denominator between: * models/unittest/testdb.go:MainTest * tests/test_utils.go:InitTest which makes it usable in unit tests as well as integration tests.
* Merge pull request '[BUG] Fix header name in swagger response' (#2526) from ↵Earl Warren2024-03-022-2/+2
|\ | | | | | | | | | | | | gusted/forgejo-header into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2526 Reviewed-by: Earl Warren <earl-warren@noreply.codeberg.org>
| * [BUG] Fix header name in swagger responseGusted2024-02-292-2/+2
| | | | | | | | | | | | - This was incorrectly copied from the `swaggerCommitList` struct, which on the other hand does set `X-Total`, but the API handler that uses this response only sets `X-Total-Count`.
* | Merge pull request 'Accessibility: Focus styling and fix Watch/Unwatch ↵Gusted2024-03-026-40/+51
|\ \ | | | | | | | | | | | | | | | | | | buttons' (#2379) from fnetx/accessibility into forgejo Reviewed-on: https://codeberg.org/forgejo/forgejo/pulls/2379 Reviewed-by: Gusted <gusted@noreply.codeberg.org>
| * | Accessibility: Watch & Star on small screensOtto Richter2024-03-021-4/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The elements were hidden on small screens to preserve space and the icons still conveyed the meaning for users with intact eye vision. However, the names were no longer exposed to screen readers, and their users usually cannot obtain the meaning from the icons. Adding aria-labels to the affected templates results in certain complexity due to the DOM, so instead I decided to use some accessible CSS tricks to move the content off the screen instead of hiding it. It should remain accessible for most screen readers.
| * | Add focus styling to most button typesOtto Richter2024-03-022-33/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | While it might be favourable to have distinct focus and hover styling, having no focus styling at all makes keyboard navigation very difficult. Some people consider :focus to be equal to a keyboard-driven :hover, so I'm moving the focus pseudo-classes from being a no-op to adding the hover styling.