aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Refactor more code in templates (#29236)wxiaoguang2024-02-1811-42/+45
| | | | | | | | Follow #29165. * Introduce JSONTemplate to help to render JSON templates * Introduce JSEscapeSafe for templates. Now only use `{{ ... | JSEscape}}` instead of `{{ ... | JSEscape | Safe}}` * Simplify "UserLocationMapURL" useage
* Use "Safe" modifier for manually constructed safe HTML strings in templates ↵wxiaoguang2024-02-1812-15/+15
| | | | | | (#29227) Follow #29165. These HTML strings are safe to be rendered directly, to avoid double-escaping.
* Remove jQuery from the repo release form (#29225)Yarden Shoham2024-02-181-11/+11
| | | | | | | | | | | | | - Switched to plain JavaScript - Tested the repo release form functionality and it works as before # Demo using JavaScript without jQuery ![action](https://github.com/go-gitea/gitea/assets/20454870/ede2072a-823d-418f-9890-a5a7445a1cc6) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Make submit event code work with both jQuery event and native event (#29223)wxiaoguang2024-02-173-2/+3
| | | | | Partially related to #29200 and fix other potential bugs. Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery from repo migrate page (#29219)Yarden Shoham2024-02-171-9/+8
| | | | | | | | | | | | | - Switched to plain JavaScript - Tested the repo migrate functionality and it works as before # Demo using JavaScript without jQuery ![action](https://github.com/go-gitea/gitea/assets/20454870/44ad134b-832e-44b8-8e77-7cc8603d95fe) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
* Remove unneccesary `initUserAuthLinkAccountView` from "link account" page ↵Yarden Shoham2024-02-172-30/+1
| | | | | | (#29217) Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix labels referencing the wrong ID in the user profile settings (#29199)Yarden Shoham2024-02-172-7/+7
| | | | | | | | 2 instances of `for` with a wrong value and 1 `for` that had a reference to a `name` instead of `id`. --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Fix label `for` pointing to a `name` instead of `id` in webhook settings ↵Yarden Shoham2024-02-171-1/+1
| | | | | | | | (#29209) Here's the spec for the `for` attribute: https://html.spec.whatwg.org/multipage/forms.html#attr-label-for Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Load outdated comments when (un)resolving conversation on PR timeline (#29203)Jimmy Praet2024-02-172-3/+4
| | | | | | | | | Relates to #28654, #29039 and #29050. The "show outdated comments" flag should only apply to the file diff view. On the PR timeline, outdated comments are always shown. So they should also be loaded when (un)resolving a conversation on the timeline page.
* Fix missing template for follow button in organization (#29215)Yarden Shoham2024-02-173-8/+9
| | | | | | | | | | | | | | | Leftover from https://github.com/go-gitea/gitea/pull/29005 # Before ![before](https://github.com/go-gitea/gitea/assets/20454870/24c74278-ccac-4dc6-bf26-713e90c07239) # After ![after](https://github.com/go-gitea/gitea/assets/20454870/f91d503b-87d4-4c17-a56c-9c0a81fd9082) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Enable markdownlint `no-trailing-punctuation` and `no-blanks-blockquote` ↵silverwind2024-02-177-9/+7
| | | | | (#29214) Enable these two and fix issues.
* Remove jQuery from the webhook editor (#29211)Yarden Shoham2024-02-171-29/+27
| | | | | | | | | | | | | - Switched to plain JavaScript - Tested the webhook editing functionality and it works as before # Demo using JavaScript without jQuery ![action](https://github.com/go-gitea/gitea/assets/20454870/b24c264d-d5e5-4954-8789-e72564a99027) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove jQuery from issue reference context popup attach (#29216)Yarden Shoham2024-02-171-2/+1
| | | | | | | | | | - Switched to plain JavaScript - Tested the context popup functionality and it works as before # Demo using JavaScript without jQuery ![action](https://github.com/go-gitea/gitea/assets/20454870/1d2f173e-e626-4f7d-82c8-d1539d38d247) Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* fix typo (#29212)xkcdstickfigure2024-02-171-1/+1
|
* Fix debian InRelease Acquire-By-Hash newline (#29204)Robin Schoonover2024-02-171-1/+1
| | | | | | | | | | | | | | | | There is a missing newline when generating the debian apt repo InRelease file, which results in output like: ``` [...] Date: Wed, 14 Feb 2024 05:03:01 UTC Acquire-By-Hash: yesMD5Sum: 51a518dbddcd569ac3e0cebf330c800a 3018 main-dev/binary-amd64/Packages [...] ``` It appears this would probably result in apt ignoring the Acquire-By-Hash setting and not using the by-hash functionality, although I'm not sure how to confirm it.
* Fix broken following organization (#29005)yp053272024-02-172-9/+21
| | | | - following organization is broken from #28908 - add login check for the follow button in organization profile page
* [skip ci] Updated translations via CrowdinGiteaBot2024-02-172-0/+121
|
* Add `eslint-plugin-github` and fix issues (#29201)silverwind2024-02-169-38/+1026
| | | | | | | | This plugin has a few useful rules. The only thing I dislike about it is that it pulls in a rather big number of dependencies for react-related rules we don't use, but it can't really be avoided. Rule docs: https://github.com/github/eslint-plugin-github?tab=readme-ov-file#rules
* Remove jQuery from the "quick submit" handler (#29200)Yarden Shoham2024-02-161-8/+1
| | | | | | | | | | | | - Switched to plain JavaScript - Tested the quick submit functionality and it works as before # Demo using JavaScript without jQuery ![action](https://github.com/go-gitea/gitea/assets/20454870/abbd6c49-ad0f-4f95-b4ba-e969b85a46e8) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Fix `initCompLabelEdit` not being called (#29198)Yarden Shoham2024-02-161-3/+1
| | | | | Fix broken `if` from https://github.com/go-gitea/gitea/pull/29195 Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Remove jQuery from username change prompt and fix its detection (#29197)Yarden Shoham2024-02-161-14/+15
| | | | | | | | | | | | | | | | | | | - Switched to plain JavaScript - Tested the user rename prompt toggling functionality and it works as before - Fixed bug that allowed pasting with the mouse to avoid the prompt # Before ![before](https://github.com/go-gitea/gitea/assets/20454870/aa300ad7-612b-461e-bbb2-3f74b3b83ede) # After ![after](https://github.com/go-gitea/gitea/assets/20454870/f2b5a51b-7b39-43c7-8a4a-62f1f77acae4) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
* Remove jQuery from organization rename prompt toggle (#29195)Yarden Shoham2024-02-161-4/+5
| | | | | | | | | | | | | | - Switched to plain JavaScript - Tested the organization rename prompt toggling functionality and it works as before # Demo using JavaScript without jQuery ![action](https://github.com/go-gitea/gitea/assets/20454870/e6f641b0-aa46-4b85-9693-0d608cca855e) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
* Refactor JWT secret generating & decoding code (#29172)wxiaoguang2024-02-169-46/+57
| | | | | | | | Old code is not consistent for generating & decoding the JWT secrets. Now, the callers only need to use 2 consistent functions: NewJwtSecretWithBase64 and DecodeJwtSecretBase64 And remove a non-common function Base64FixedDecode from util.go
* Reference labels by IDs instead of names in `keys` settings (#29194)Yarden Shoham2024-02-164-7/+7
| | | | | | Here's the spec for the `for` attribute: https://html.spec.whatwg.org/multipage/forms.html#attr-label-for Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Remove jQuery from SSH key form parser (#29193)Yarden Shoham2024-02-161-8/+6
| | | | | | | | | | | | | - Switched to plain JavaScript - Tested the SSH key title functionality and it works as before # Demo using JavaScript without jQuery ![action](https://github.com/go-gitea/gitea/assets/20454870/4785c13d-8d30-448e-b74a-263935e2769f) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
* Refactor request function (#29187)silverwind2024-02-161-11/+9
| | | | - Remove and prevent use of `body` argument, it is not used anywhere - Remove uppercasing of method, we can require it to be uppercase
* Docker Tag Information in Docs (#29047)wienans2024-02-161-0/+10
| | | | | | | | Add more details for the docker tag when using container registry. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fix gitea-action user avatar broken on edited menu (#29190)yp053272024-02-161-1/+5
| | | Fix #29178
* Disable parallel Make execution (#29186)silverwind2024-02-162-2/+5
| | | | | | | | Ref: https://www.gnu.org/software/make/manual/html_node/Parallel-Disable.html > If the .NOTPARALLEL special target with no prerequisites is specified anywhere then the entire instance of make will be run serially, regardless of the parallel setting
* Auto-update the system status in admin dashboard (#29163)Yarden Shoham2024-02-169-74/+97
| | | | | | | | | | | | | | | | | | | | | | | - Refactor the system status list into its own template - Change the backend to return only the system status if htmx initiated the request - `hx-get="{{$.Link}}/system_status`: reuse the backend handler - `hx-swap="innerHTML"`: replace the `<div>`'s innerHTML (essentially the new template) - `hx-trigger="every 5s"`: call every 5 seconds - `hx-indicator=".divider"`: the `is-loading` class shouldn't be added to the div during the request, so set it on an element it has no effect on - Render "Since Last GC Time" with `<relative-time>`, so we send a timestamp # Auto-update in action GIF ![action](https://github.com/go-gitea/gitea/assets/20454870/c6e1f220-f0fb-4460-ac3b-59f315e30e29) --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
* Avoid vue warning in dev mode (#29188)silverwind2024-02-161-0/+1
| | | | | | | | `vue` currently outputs a warning for this undefined variable during development, which is apparently caused by a bug in `vue-cli`. Workaround by setting this variable. Ref: https://github.com/vuejs/vue-cli/pull/7443 Ref: https://stackoverflow.com/a/77765007/808699
* Update JS and PY dependencies (#29184)silverwind2024-02-164-357/+406
| | | | | - Update all excluding `@mcaptcha/vanilla-glue` and `eslint-plugin-array-func` - Tested pdf, chart.js, swagger
* [skip ci] Updated translations via CrowdinGiteaBot2024-02-161-24/+364
|
* Implement contributors graph (#27882)Şahin Akkaya2024-02-1518-230/+1330
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Continuation of https://github.com/go-gitea/gitea/pull/25439. Fixes #847 Before: <img width="1296" alt="image" src="https://github.com/go-gitea/gitea/assets/32161460/24571ac8-b254-43c9-b178-97340f0dc8a9"> ---- After: <img width="1296" alt="image" src="https://github.com/go-gitea/gitea/assets/32161460/c60b2459-9d10-4d42-8d83-d5ef0f45bf94"> --- #### Overview This is the implementation of a requested feature: Contributors graph (#847) It makes Activity page a multi-tab page and adds a new tab called Contributors. Contributors tab shows the contribution graphs over time since the repository existed. It also shows per user contribution graphs for top 100 contributors. Top 100 is calculated based on the selected contribution type (commits, additions or deletions). --- #### Demo (The demo is a bit old but still a good example to show off the main features) <video src="https://github.com/go-gitea/gitea/assets/32161460/9f68103f-8145-4cc2-94bc-5546daae7014" controls width="320" height="240"> <a href="https://github.com/go-gitea/gitea/assets/32161460/9f68103f-8145-4cc2-94bc-5546daae7014">Download</a> </video> #### Features: - Select contribution type (commits, additions or deletions) - See overall and per user contribution graphs for the selected contribution type - Zoom and pan on graphs to see them in detail - See top 100 contributors based on the selected contribution type and selected time range - Go directly to users' profile by clicking their name if they are registered gitea users - Cache the results so that when the same repository is visited again fetching data will be faster --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: hiifong <i@hiif.ong> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: yp05327 <576951401@qq.com>
* Add support for action artifact serve direct (#29120)KN4CK3R2024-02-151-1/+14
| | | Fixes #29093
* Advertise WebAuthn support (#29176)65432024-02-152-0/+25
| | | | | | | | | This well-known indicates for password manager, that passkeys are supported. source: https://android-developers.googleblog.com/2023/10/make-passkey-endpoints-well-known-url-part-of-your-passkey-implementation.html spec: https://github.com/ms-id-standards/MSIdentityStandardsExplainers/blob/main/PasskeyEndpointsWellKnownUrl/explainer.md
* Tweak repo header (#29134)silverwind2024-02-152-7/+7
| | | | | | | | | | | | | | | | | - Tweak colors, remove link color from repo name and make text use inherited color - Downsize repo icon from 32px to 24px Before: <img width="255" alt="Screenshot 2024-02-11 at 15 31 00" src="https://github.com/go-gitea/gitea/assets/115237/f65c1d02-d8a3-4171-ad3d-4c95871fb2ba"> After: <img width="260" alt="Screenshot 2024-02-11 at 15 30 48" src="https://github.com/go-gitea/gitea/assets/115237/a9b25b56-8d3f-4910-af60-2513d44f6d81"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Change webhook-type in create-view (#29114)Tim-Nicas Oelschläger2024-02-156-49/+67
| | | | | | | | | | | | | | | | It's now possible to change webhook-type in create-view. before: ![image](https://github.com/go-gitea/gitea/assets/72873130/9ee1b9fb-843b-4f28-b8d6-6361e5d184f1) after: ![image](https://github.com/go-gitea/gitea/assets/72873130/9dbf058f-5912-43af-9acd-487271212f2d) --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Giteabot <teabot@gitea.io>
* Remove jQuery from the comment task list (#29170)Yarden Shoham2024-02-151-7/+6
| | | | | | | | | | | - Switched to plain JavaScript - Tested the task list functionality and it works as before --------- Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: silverwind <me@silverwind.io>
* Fix can not select team reviewers when reviewers is empty (#29174)yp053272024-02-151-2/+4
| | | | | | | | | | | | Before: ![image](https://github.com/go-gitea/gitea/assets/18380374/b29e9c0c-f0fc-454f-b82d-ff9688d9e871) After: ![image](https://github.com/go-gitea/gitea/assets/18380374/a982f7c6-4911-4951-91a5-4bb347e866f9) Is this a bug? Maybe we don't need to fix this, as it only occurs when there's only one user in the organization. 🤔
* move sign in labels to be above inputs (#28753)Rafael Heard2024-02-155-21/+13
| | | | | | | | | | | | | | | | | | There are a few inconsistencies within Gitea and this PR addresses one of them. This PR updates the sign-in page layout, including the register and openID tabs, to match the layout of the settings pages (`/user/settings`) for more consistency. **Before** <img width="968" alt="Screenshot 2024-02-05 at 8 27 24 AM" src="https://github.com/go-gitea/gitea/assets/6152817/fb0cb517-57c0-4eed-be1d-56f36bd1960d"> **After** <img width="968" alt="Screenshot 2024-02-05 at 8 26 39 AM" src="https://github.com/go-gitea/gitea/assets/6152817/428d691d-0a42-4a67-a646-05527f2a7b41"> --------- Co-authored-by: rafh <rafaelheard@gmail.com>
* Refactor locale&string&template related code (#29165)wxiaoguang2024-02-1477-284/+356
| | | | | | Clarify when "string" should be used (and be escaped), and when "template.HTML" should be used (no need to escape) And help PRs like #29059 , to render the error messages correctly.
* Extract linguist code to method (#29168)KN4CK3R2024-02-143-48/+41
|
* bump to use go 1.22 (#29119)techknowlogick2024-02-1413-54/+54
|
* Remove unused `KeyID`. (#29167)KN4CK3R2024-02-144-17/+12
| | | `KeyID` is never set.
* Refactor git version functions and check compatibility (#29155)wxiaoguang2024-02-142-30/+70
| | | | | | | | | | | | Introduce a new function checkGitVersionCompatibility, when the git version can't be used by Gitea, tell the end users to downgrade or upgrade. The refactored functions are related to make the code easier to test. And simplify the comments for "safe.directory" --------- Co-authored-by: delvh <dev.lh@web.de>
* Use ghost user if user was not found (#29161)KN4CK3R2024-02-142-0/+12
| | | Fixes #29159
* Document how the TOC election process works (#29135)delvh2024-02-141-9/+27
| | | | | | This is supposed to prevent a power vacuum so that a problem similar to the 2024 election will not happen again Additionally, update current TOC members from 2023 to 2024.
* Runner tokens are multi use (#29153)Scott Yeager2024-02-142-2/+4
| | | | | Fixes https://github.com/go-gitea/gitea/issues/28911. Co-authored-by: Giteabot <teabot@gitea.io>
* Fix Gitpod logic of setting ROOT_URL (#29162)Yarden Shoham2024-02-131-3/+12
|