aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Some NuGet package enhancements (#30280)KN4CK3R2024-04-073-32/+73
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Fixes #30265 1. Read second type of dependencies 2. Render `Description` and `ReleaseNotes` old: ![grafik](https://github.com/go-gitea/gitea/assets/1666336/abac057c-11cd-4d25-b196-01ff899d948e) new: ![grafik](https://github.com/go-gitea/gitea/assets/1666336/35302273-740c-481a-a031-1f80d2d7d336) The NuGet spec does not specify what kind of text can be stored in the description but we can best guess markdown. The official NuGet registry just [converts the newlines to html lines](https://www.nuget.org/packages/rb.Firefox#readme-body-tab). 3. Extract and render the readme. This is the new and better place to store larger text than in the description. The content is markdown. ![grafik](https://github.com/go-gitea/gitea/assets/1666336/f442264e-3735-4b55-92c4-3b89a8ebafb0) --------- Co-authored-by: Benjamin Heemann <benjamin.heemann@raith.de>
* Fix and rewrite contrast color calculation, fix project-related bugs (#30237)silverwind2024-04-0714-191/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1. The previous color contrast calculation function was incorrect at least for the `#84b6eb` where it output low-contrast white instead of black. I've rewritten these functions now to accept hex colors and to match GitHub's calculation and to output pure white/black for maximum contrast. Before and after: <img width="94" alt="Screenshot 2024-04-02 at 01 53 46" src="https://github.com/go-gitea/gitea/assets/115237/00b39e15-a377-4458-95cf-ceec74b78228"><img width="90" alt="Screenshot 2024-04-02 at 01 51 30" src="https://github.com/go-gitea/gitea/assets/115237/1677067a-8d8f-47eb-82c0-76330deeb775"> 2. Fix project-related issues: - Expose the new `ContrastColor` function as template helper and use it for project cards, replacing the previous JS solution which eliminates a flash of wrong color on page load. - Fix a bug where if editing a project title, the counter would get lost. - Move `rgbToHex` function to color utils. @HesterG fyi --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Add `--page-spacing` variable, fix admin dashboard notice (#30302)silverwind2024-04-073-6/+11
| | | | | | | | | | | | | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/30293 and introduce the `--page-spacing` variable which holds the spacing between the elements on the page. This is working vertically for all pages, including ones that have fomantic grid, and horizontally for all that use `flex-container`. The `.page-content > :first-child:not(.secondary-nav)` selector uses margin which in some cases enables to adjacent margins to overlap, which is nice. <img width="1320" alt="Screenshot 2024-04-06 at 01 35 19" src="https://github.com/go-gitea/gitea/assets/115237/3e81e707-e9ff-4b7f-a211-3d98f4f85353"> --- <img width="1327" alt="Screenshot 2024-04-06 at 01 35 45" src="https://github.com/go-gitea/gitea/assets/115237/aad196c0-9e21-4c06-ae59-7e33a76c61e1"> --- <img width="1321" alt="Screenshot 2024-04-06 at 01 35 31" src="https://github.com/go-gitea/gitea/assets/115237/785f6c5d-08b6-4e66-aa16-aeca7cfed3ad">
* Action view mobile improvements and fixes (#30309)silverwind2024-04-074-14/+30
| | | | | | | | | | | | | | | Fix the action issue in https://github.com/go-gitea/gitea/issues/30303, specifically: - Use opaque step header hover background to avoid transparency issue - Un-sticky the `action-view-left` on mobile, it would otherwise overlap into right view - Improve commit summary, let it wrap - Fix and comment z-indexes - Tweak width for run-list-item-right so it wastes less space on desktop - Synced latest changes to console colors from dark to light theme <img width="467" alt="Screenshot 2024-04-06 at 18 58 15" src="https://github.com/go-gitea/gitea/assets/115237/8ad26b72-6cd9-4522-8ad1-6fd86b2d0d53">
* Fix checkboxes on mobile view, remove some dead css (#30308)silverwind2024-04-071-26/+4
| | | | | | | | | | | | | | | | Fix the checkbox issues in https://github.com/go-gitea/gitea/issues/30303 which were existing problems with these selectors, but made visible with https://github.com/go-gitea/gitea/pull/30162. There is a lot of dead/useless CSS in `form.css`, I only fixed the two problems and remove CSS that was definitely not in use or needed. <img width="369" alt="Screenshot 2024-04-06 at 18 00 08" src="https://github.com/go-gitea/gitea/assets/115237/720f178b-1b22-48d4-8704-becb8ce66129"> <img width="405" alt="Screenshot 2024-04-06 at 18 00 28" src="https://github.com/go-gitea/gitea/assets/115237/61c0f8ec-34af-46c5-a3fa-7c5c4d30c7d2"> Co-authored-by: Giteabot <teabot@gitea.io>
* Clean up log messages (#30313)wxiaoguang2024-04-0717-47/+31
| | | | | | `log.Xxx("%v")` is not ideal, this PR adds necessary context messages. Remove some unnecessary logs. Co-authored-by: Giteabot <teabot@gitea.io>
* Fix right-aligned input icons (#30301)silverwind2024-04-071-3/+8
| | | | | | | | | | | | | | | | | | | Fix regression from https://github.com/go-gitea/gitea/pull/30194 where right-aligned items would not display correctly. Before and After: <img width="285" alt="Screenshot 2024-04-06 at 01 12 11" src="https://github.com/go-gitea/gitea/assets/115237/f9168db5-0f69-4b5d-ba17-b60145ac4a09"> <img width="285" alt="Screenshot 2024-04-06 at 01 11 49" src="https://github.com/go-gitea/gitea/assets/115237/639ab6ed-d018-4e3a-9980-1f079e4ebe9d"> Frontpage search tweaked to accommodate (which was the reason for the changes that broken above): <img width="445" alt="Screenshot 2024-04-06 at 01 11 34" src="https://github.com/go-gitea/gitea/assets/115237/1919220b-390e-463a-8e3d-33a3556bf111"> <img width="438" alt="Screenshot 2024-04-06 at 01 11 39" src="https://github.com/go-gitea/gitea/assets/115237/fd94f8e4-1d56-4b04-99e3-1cd240bd7ab4">
* Refactor startup deprecation messages (#30305)wxiaoguang2024-04-0711-28/+30
| | | | | | | It doesn't change logic, it only does: 1. Rename the variable and function names 2. Use more consistent format when mentioning config section&key 3. Improve some messages
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-071-10/+10
|
* Remove fomantic list module (#30281)silverwind2024-04-067-1009/+192
| | | | | | | | Likely still some unnecessary CSS but any combinations with the `ui list` classes are covered. There was only on instance of `horizontal list` which I removed. It was this part of the commit page: <img width="396" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/c49ec4f5-93c3-41d6-a907-cdbedf8abc44">
* Markup color and font size fixes (#30282)silverwind2024-04-063-6/+8
| | | | | | | | | | 1. Distinguish inline an block code with new CSS variable `--color-markup-code-inline` 2. Various color tweaks, better contrast from background <img width="447" alt="Screenshot 2024-04-05 at 00 51 00" src="https://github.com/go-gitea/gitea/assets/115237/93e069f4-6807-4f2c-9331-2d69730919d4"> <img width="456" alt="Screenshot 2024-04-05 at 00 50 44" src="https://github.com/go-gitea/gitea/assets/115237/0dc9c745-c531-40fa-94ec-b0ba10bd7ccf">
* Fix code block style for code preview (#30298)wxiaoguang2024-04-064-6/+6
| | | | | Fix #30292 To avoid unnecessary style overriding, use "div" instead of "code"
* Always use `octicon-eye` on watch button (#30288)silverwind2024-04-061-1/+1
| | | | | | | | | | | | | | | | | | | | | | This might appear odd but I think it's the right thing to do: On Github, the "Watch" button always has the open eye icon: <img width="177" alt="Screenshot 2024-04-05 at 08 26 48" src="https://github.com/go-gitea/gitea/assets/115237/0c1188d1-145b-4c6d-909f-2e1460499941"> <img width="179" alt="Screenshot 2024-04-05 at 08 26 40" src="https://github.com/go-gitea/gitea/assets/115237/e29d91fa-f122-4e10-9589-f79c1d612cf9"> On Gitea, while watching, the icon is this and this sometimes confuses me slightly, being used to above: <img width="158" alt="Screenshot 2024-04-05 at 08 29 08" src="https://github.com/go-gitea/gitea/assets/115237/3301021b-744e-409f-a9d8-887ec2772fdc"> After this PR, both states will use the same icon: <img width="145" alt="Screenshot 2024-04-05 at 08 26 27" src="https://github.com/go-gitea/gitea/assets/115237/8addfa5b-c009-4bdb-bfa1-4f3dfaffa4cd"> <img width="161" alt="Screenshot 2024-04-05 at 08 26 33" src="https://github.com/go-gitea/gitea/assets/115237/cef383e6-2cc0-460f-a4d3-83ebb321debe">
* Fix view commit link (#30297)wxiaoguang2024-04-061-85/+84
| | | Fix #30098
* Add gap to commit status details (#30284)silverwind2024-04-051-0/+1
| | | | | | | | | Before: <img width="162" alt="Screenshot 2024-04-05 at 02 25 27" src="https://github.com/go-gitea/gitea/assets/115237/9f786811-3e45-4b3c-aaf9-e1d2cad284d2"> After: <img width="172" alt="Screenshot 2024-04-05 at 02 27 25" src="https://github.com/go-gitea/gitea/assets/115237/f5254877-9e0d-44cb-9605-ba15c75872bb">
* Update JS dependencies and add new eslint rules (#30279)silverwind2024-04-053-266/+396
| | | | | - Run `make update-js` - Added new eslint rules - Tested webpack build and swagger ui
* Upgrade `golang.org/x/net` to v0.24.0 (#30283)silverwind2024-04-052-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | Result of `go get -u golang.org/x/net; make tidy`. This is related to the following vulncheck warning: ``` There are 2 vulnerabilities in modules that you require that are neither imported nor called. You may not need to take any action. See https://pkg.go.dev/golang.org/x/vuln/cmd/govulncheck for details. Vulnerability #1: GO-2024-2687 HTTP/2 CONTINUATION flood in net/http More info: https://pkg.go.dev/vuln/GO-2024-2687 Module: golang.org/x/net Found in: golang.org/x/net@v0.22.0 Fixed in: golang.org/x/net@v0.23.0 Vulnerability #2: GO-2022-0470 No access control in github.com/blevesearch/bleve and bleve/v2 More info: https://pkg.go.dev/vuln/GO-2022-0470 Module: github.com/blevesearch/bleve/v2 Found in: github.com/blevesearch/bleve/v2@v2.3.10 Fixed in: N/A ```
* Commit-Dropdown: Show Author of commit if available (#30272)sebastian-sauer2024-04-051-4/+4
| | | | | | | | | | | | | | | As in commits page we show the author of the commit in the commits dropdown and not the committer. Commits Page: ![Screenshot from 2024-04-03 22-34-41](https://github.com/go-gitea/gitea/assets/1135157/1c7c5c19-6d0a-4176-8a87-7bca6a0c6dc8) and the same contents in our dropdown: ![image](https://github.com/go-gitea/gitea/assets/1135157/aa094af2-c369-47ac-9c27-ca208d1d03f0) fixes #29588
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-052-2/+116
|
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-041-0/+2
|
* update mailer example config, remove deprecated HOST (#30267)Knud Hollander2024-04-031-1/+2
|
* Add `[other].SHOW_FOOTER_POWERED_BY` setting to hide `Powered by` (#30253)Yakov2024-04-036-1/+12
| | | | | | | | This allows you to hide the "Powered by" text in footer via `SHOW_FOOTER_POWERED_BY` flag in configuration. --------- Co-authored-by: silverwind <me@silverwind.io>
* fix: close file in the Upload func (#30262)guangwu2024-04-031-2/+2
|
* Replace coloris with vanilla-colorful (#30201)silverwind2024-04-036-162/+92
| | | | | | | | | | | | | | Found [a better color picker](https://github.com/web-padawan/vanilla-colorful) that [does not rely](https://github.com/mdbassit/Coloris/issues/139) on `querySelectorAll` or a global shared instance, and is also around a third of the size of the previous one. The popover is handled by tippy.js for which I introduced a new "bare" theme and it uses a new sibling-based mechanism which should prove useful later to create tippy popovers via HTML only. <img width="846" alt="Screenshot 2024-03-31 at 04 03 38" src="https://github.com/go-gitea/gitea/assets/115237/7639b911-a2d7-4f5c-bffd-a9d84561e747">
* Refactor "dump" sub-command (#30240)wxiaoguang2024-04-036-224/+369
| | | | | | | | | | Major changes: * Move some functions like "addReader" / "isSubDir" / "addRecursiveExclude" to a separate package, and add tests * Clarify the filename&dump type logic and add tests * Clarify the logger behavior and remove FIXME comments Co-authored-by: Giteabot <teabot@gitea.io>
* Add -u git to docs when using docker exec with root installation (#29314)scribblemaniac2024-04-021-2/+2
| | | | | | | | | | | | This fixes a minor issue in the documentation for SSH Container Passthrough for non-rootless installs. The non-rootless Dockerfile and docker-compose do not set `USER`/`user` instructions so `docker exec` will run as root by default. While running as root, gitea commands will refuse to execute, breaking these approaches. For containers built with the rootless instructions, `docker exec` will run as git by default so this is not necessary in that case. This issue was already discussed in #19065, but it does not appear this part of the issue was ever added to the documentation.
* Show 12 lines in markup code preview (#30255)silverwind2024-04-021-1/+1
| | | Show up to 12 lines instead of previous 5.
* Fixes #27605: inline math blocks can't be preceeded/followed by ↵João Tiago2024-04-022-7/+31
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | alphanumerical characters (#30175) - Inline math blocks couldn't be preceeded or succeeded by alphanumerical characters due to changes introduced in PR #21171. Removed the condition that caused this (precedingCharacter condition) and added a new exit condition of the for-loop that checks if a specific '$' was escaped using '\' so that the math expression can be rendered as intended. - Additionally this PR fixes another bug where math blocks of the type '$xyz$abc$' where the dollar sign was not escaped by the user, generated an error (shown in the screenshots below) - Altered the tests to accomodate for the changes Former behaviour (from try.gitea.io): ![image](https://github.com/go-gitea/gitea/assets/114936010/8f0cbb21-321d-451c-b871-c67a8e1e9235) Fixed behaviour (from my local build): ![image](https://github.com/go-gitea/gitea/assets/114936010/5c22687c-6f11-4407-b5e7-c14b838bc20d) (Edit) Source code for the README.md file: ``` $x$ -$x$ $x$- a$xa$ $xa$a 1$xb$ $xb$1 $a a$b b$ a$b $a a$b b$ $a a\$b b$ ``` --------- Signed-off-by: João Tiago <joao.leal.tintas@tecnico.ulisboa.pt> Co-authored-by: Giteabot <teabot@gitea.io>
* Render embedded code preview by permlink in markdown (#30234)wxiaoguang2024-04-0222-21/+450
| | | | | The permlink in markdown will be rendered as a code preview block, like GitHub Co-authored-by: silverwind <me@silverwind.io>
* Fix missing 0 prefix of GPG key id (#30245)KN4CK3R2024-04-023-7/+23
| | | | | | | | | | Fixes #30235 If the key id "front" byte has a single digit, `%X` is missing the 0 prefix. ` 38D1A3EADDBEA9C` instead of `038D1A3EADDBEA9C` When using the `IssuerFingerprint` slice `%X` is enough but I changed it to `%016X` too to be consistent.
* Fix spacing in issue navbar (#30238)silverwind2024-04-024-3/+8
| | | | | | | Create a new `issue-navbar` class specifically for this bar, previous class used in many places and I thought I had them all removed, but not this one. Fixes: https://github.com/go-gitea/gitea/issues/30226
* Add unique index for project_issue to prevent duplicate data (#30190)Lunny Xiao2024-04-025-0/+133
| | | Fix #27639
* [skip ci] Updated translations via CrowdinGiteaBot2024-04-0222-22/+3
|
* Refactor commit signature parser (#30228)wxiaoguang2024-04-017-98/+134
| | | | | | | To make it more flexible and support SSH signature. The existing tests are not changed, there are also tests covering `parseTagRef` which also calls `parsePayloadSignature` now. Add some new tests to `Test_parseTagData`
* Refactor dropzone (#30232)wxiaoguang2024-04-021-29/+21
| | | Simplify code and use `.files` elements
* Remove scheduled action tasks if the repo is archived (#30224)Zettat1232024-04-014-2/+29
| | | Fix #30220
* Refactor file view & render (#30227)wxiaoguang2024-04-017-33/+40
| | | The old code is inconsistent and fragile, and the UI isn't right.
* Refactor DeleteInactiveUsers, fix bug and add tests (#30206)wxiaoguang2024-04-013-33/+45
| | | | | | | | | 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
* [skip ci] Updated licenses and gitignoresGiteaBot2024-04-013-0/+35
|
* Add `/options/license` and `/options/gitignore` to `.ignore` (#30219)silverwind2024-03-311-1/+3
| | | | Ignore this folder in tools like `rg` or `ag`. Also sorted the entries alphabetically.
* Remove fomantic input module (#30194)silverwind2024-03-3111-812/+207
| | | | Another pure CSS module. Some styling is part of the `form` module which will likely follow next.
* Remove most jQuery function calls from the repository topic box (#30191)Yarden Shoham2024-03-315-75/+54
| | | | | | | | | Remove most jQuery function calls --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Prevent flash of dropdown menu on labels list (#30215)silverwind2024-03-312-1/+7
| | | | | | | | | | | | On the labels list, This `left` class caused the dropdown content to flash on page load until JS had hidden it. Remove it as I see no purpose to it. <img width="215" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/9e1de97f-dd89-41e0-9229-5c4a786ba762"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove jQuery class from the `repo-issue.js` file (#30192)Yarden Shoham2024-03-311-70/+85
| | | | | | | | | | | | | | | | | | Switched from jQuery class functions to plain JavaScript `classList`. Tested the following functionalities and they work as before: - delete issue comment - cancel code comment - update (merge or rebase) pull request - re-request review - reply to code comment - show/hide outdated comments - add code comment - edit issue title --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
* Ignore fomantic folder in linters (#30200)silverwind2024-03-312-0/+2
| | | | We are not linting these files but editor integrations will still try to lint, disable that.
* Remove `modifies/frontend` from labeler (#30198)silverwind2024-03-311-7/+0
| | | | | | | 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: Giteabot <teabot@gitea.io>
* Make a distinction between `active` and `selected` in the issue author ↵Yarden Shoham2024-03-311-1/+3
| | | | | dropdown (#30207) Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Move and simplify tab-size helpers (#30196)silverwind2024-03-312-80/+17
| | | | | Tailwind does not support. Dropped the vendor-prefix. Co-authored-by: Giteabot <teabot@gitea.io>
* Fix markdown color code detection (#30208)wxiaoguang2024-03-312-3/+26
| | | | | 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.
* Do not allow different storage configurations to point to the same directory ↵wxiaoguang2024-03-3112-47/+75
| | | | | (#30169) Replace #29171