0
0
mirror of https://github.com/go-gitea/gitea.git synced 2025-11-07 05:09:30 -05:00

1322 Commits

Author SHA1 Message Date
silverwind
eef9406c6b Contribution heatmap improvements (#35876)
1. Set a fixed height on the element, preventing the content after the
element from shifting on page load. This uses CSS [container query
length
units](https://developer.mozilla.org/en-US/docs/Web/CSS/CSS_containment/Container_queries#container_query_length_units)
as I saw no other way because of the non-linear scaling of the element.
2. Move the "total-contributions" text into the existing vue slot,
eliminating the need for absolute positioning.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-06 09:23:48 +01:00
Lunny Xiao
206f4c88b1 Remove wrong code (#35846)
Follow #35821
Fix https://github.com/go-gitea/gitea/pull/35844#issuecomment-3483521045

The reviewed file numbers and progress have been set from backend so
that we don't need to update the numbers when clicking `load more`.
2025-11-04 17:46:17 +00:00
silverwind
37208fef7e Fix a number of strictNullChecks-related issues (#35795)
In preparation to work on enabling
https://www.typescriptlang.org/tsconfig/#strictNullChecks, I fixed all
the issues outside of `web_src` that came up when the option was
enabled. There was also one lint issue in web_src that apparently only
came up with the option enabled, so I fixed that as well.

`isTruthy` is introduced because Typescript has a bug regarding
`filter(Boolean)` which they are seemingly unwilling to fix.

---------

Signed-off-by: silverwind <me@silverwind.io>
2025-11-03 20:17:06 +00:00
鲁汀
f2d7931b70 Fix circular spin animation direction (#35785)
Wait for the status icon to rotate clockwise instead of counterclockwise

before:
![GIF 2025-10-30
10-50-07](https://github.com/user-attachments/assets/3771b0bf-44e4-45a0-bde5-1b2b3dd8ba2a)

after:
![GIF 2025-10-30
10-50-43](https://github.com/user-attachments/assets/c45307fe-39a4-4e60-b48e-9d922c407565)

---------

Signed-off-by: 鲁汀 <131967983+lutinglt@users.noreply.github.com>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: lutinglt <lutinglt@users.noreply.github.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-02 08:30:13 +00:00
bytedream
39c08ce4c1 Update tab title when navigating file tree (#35757)
Fix #35749.

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2025-10-29 13:38:09 +00:00
silverwind
fe25997157 Enable vue/require-typed-ref eslint rule (#35764)
Enable https://eslint.vuejs.org/rules/require-typed-ref 
and fix discovered issues.
2025-10-29 17:42:06 +08:00
wxiaoguang
6b5563c54a Support selecting theme on the footer (#35741)
Fixes: https://github.com/go-gitea/gitea/pull/27576
2025-10-28 18:25:00 +08:00
wxiaoguang
cddff73bbd Fix "ref-issue" handling in markup (#35739)
This is a follow up for #35662, and also fix #31181, help #30275, fix #31161
2025-10-27 22:45:07 +08:00
Zettat123
c9beb0b01f Support actions and reusable workflows from private repos (#32562)
Resolve https://gitea.com/gitea/act_runner/issues/102

This PR allows administrators of a private repository to specify some
collaborative owners. The repositories of collaborative owners will be
allowed to access this repository's actions and workflows.

Settings for private repos:


![image](https://github.com/user-attachments/assets/e591c877-f94d-48fb-82f3-3b051f21557e)

---

This PR also moves "Enable Actions" setting to `Actions > General` page

<img width="960" alt="image"
src="https://github.com/user-attachments/assets/49337ec2-afb1-4a67-8516-5c9ef0ce05d4"
/>

<img width="960" alt="image"
src="https://github.com/user-attachments/assets/f58ee6d5-17f9-4180-8760-a78e859f1c37"
/>

---------

Signed-off-by: Zettat123 <zettat123@gmail.com>
Co-authored-by: ChristopherHX <christopher.homberger@web.de>
2025-10-25 17:37:33 +00:00
wxiaoguang
522c466e24 Make external iframe render work (#35730)
Fix #35729, #17635, #21098
2025-10-23 08:01:38 +00:00
silverwind
8085c75356 Remove mermaid margin workaround (#35732)
https://github.com/mermaid-js/mermaid/issues/4907 was fixed with mermaid
v11, so we no longer need to ship this workaround. The test case works
as expected:

<img width="244" height="58" alt="image"
src="https://github.com/user-attachments/assets/439616e9-4883-47fb-bf18-21ca86cb5da6"
/>
2025-10-23 06:43:52 +02:00
wxiaoguang
a2eea2fb2e Fix various trivial problems (#35714) 2025-10-21 13:19:29 +08:00
Bryan Mutai
c30d74d0f9 feat(diff): Enable commenting on expanded lines in PR diffs (#35662)
Fixes #32257 
/claim #32257

Implemented commenting on unchanged lines in Pull Request diffs, lines
are accessed by expanding the diff preview. Comments also appear in the
"Files Changed" tab on the unchanged lines where they were placed.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-19 18:19:12 +08:00
wxiaoguang
9ae2e9e76f Always create Actions logs stepsContainer (#35654) 2025-10-15 04:07:58 +00:00
silverwind
49a0a11f55 Update JS deps, misc tweaks (#35643)
- Update all JS dependencies
- Enable eslint `no-useless-assignment` and fix 2 discovered issues
- Replace `gitea-vscode` svg with new `octicon-vscode`
- Remove now-unused `@ts-expect-error` comments
- Change Monaco wrapping behaviour to match the wrapping in code view:
no wrapping indent and break on any character.
2025-10-12 21:07:15 +00:00
鲁汀
327d0a7fdd The status icon of the Action step is consistent with GitHub (#35618)
Before:
running:
<img width="45" height="34" alt="image"
src="https://github.com/user-attachments/assets/e2508f98-2f1f-4b7e-a80c-30b406f42531"
/>
waiting:
<img width="44" height="33" alt="image"
src="https://github.com/user-attachments/assets/e7c8164e-fdc3-4546-b088-31166544edb0"
/>

---
After:
running:
<img width="49" height="43" alt="image"
src="https://github.com/user-attachments/assets/b5a9b245-a995-458a-af23-d1723daa3692"
/>
waiting:
<img width="42" height="44" alt="image"
src="https://github.com/user-attachments/assets/ff72551e-cfb5-4665-af52-938ef0cf8f1c"
/>

`gitea-running.svg` is not an icon from the @ primer/octicon library,
extracted from the Github page. Github did not assign a clear class name
to this icon

---------

Signed-off-by: 鲁汀 <131967983+lutinglt@users.noreply.github.com>
Co-authored-by: lutinglt <lutinglt@users.noreply.github.com>
2025-10-10 11:25:03 -07:00
Shafi Ahmed
0a0baeb3b0 fix: auto-expand and auto-scroll for actions logs (#35570) (#35583)
Implements reliable auto-expand and auto-scroll behavior for the Actions
logs view.

* Expands running or unfinished steps automatically.
* Smoothly scrolls to the latest log line during execution.
* Controlled via existing “Always auto-scroll” and “Expand running
steps” options.

Fixes #35570.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-10-05 10:31:06 +08:00
wxiaoguang
71360a94cb Address some CodeQL security concerns (#35572)
Although there is no real security problem
2025-10-04 01:21:26 +08:00
silverwind
b907b9fb1a Enable a few more tsconfig options (#35553)
Enable a few more useful options in tsconfig. `noImplicitReturns` had
two cases which I've fixed. Also, partially sort the file.
2025-09-30 21:43:41 -07:00
wxiaoguang
d83676c97a Fix markup init after issue comment editing (#35536)
Fix #35533
2025-09-25 09:29:32 -07:00
silverwind
6033c47f90 Enable more markdown paste features in textarea editor (#35494)
Enable the [same paste
features](https://github.com/github/paste-markdown#paste-markdown-objects)
that GitHub has, notably the ability to paste text containing HTML links
and have them automatically turn into Markdown links. As far as I can
tell, previous paste features all work as expected.

---------

Signed-off-by: silverwind <me@silverwind.io>
2025-09-16 23:55:57 +00:00
silverwind
8c8eb4b6f9 Clean up npm dependencies (#35484)
- `type-fest` is replaced by our own types
- `@stylistic/eslint-plugin-js` is no longer in use, it was replaced
with `@stylistic/eslint-plugin`
- `@types/license-checker-webpack-plugin` does not apply to our forked
version and has a type stub
2025-09-15 16:34:54 +02:00
silverwind
69e595cdd8 Update eslint to v9 (#35485)
Update eslint and all plugins. Many plugins still do not ship type
definitions so I had to add stubs. Also, I had to put a few typescript
error expectations because if some unknown error in the types.

`eslint-plugin-no-jquery` is disabled because it's not compatible with
eslint 9 flat config
(https://github.com/wikimedia/eslint-plugin-no-jquery/issues/311).
2025-09-14 19:15:06 +03:00
wxiaoguang
4fe1066a17 Replace gobwas/glob package (#35478)
https://github.com/gobwas/glob is unmaintained and has bugs.
2025-09-13 18:01:00 +00:00
wxiaoguang
325e059a50 Fix different behavior in status check pattern matching with double stars (#35474)
Drop the minimatch dependency, use our own glob compiler.

Fix #35473
2025-09-13 11:53:27 +08:00
Lunny Xiao
89d7929711 Fix package link setting can only list limited repositories (#35394)
Fix #24801

<img width="1123" height="503" alt="image"
src="https://github.com/user-attachments/assets/823f4214-e08a-4506-9018-057c50e7fc52"
/>

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2025-09-11 01:50:17 +02:00
Lunny Xiao
be2a6b4414 Fix bug when review pull request commits (#35192)
The commit range in the UI follows a half-open, half-closed convention:
(,]. When reviewing a range of commits, the beforeCommitID should be set
to the commit immediately preceding the first selected commit. For
single-commit reviews, we must identify and use the previous commit of
that specific commit.

The endpoint ViewPullFilesStartingFromCommit is currently unused and can
be safely removed.

Fix #35157 
Replace #35184 
Partially extract from #35077
2025-08-03 10:23:10 -07:00
silverwind
e7d6f74450 Update JS and PY deps (#35191)
- Updated all dependencies
- Fixed new CSS lint errors, specifically tested the
RepoActivityTopAuthors.vue change
- Regenerated SVGs
2025-08-01 07:24:26 +00:00
silverwind
f4d7701189 Change function description comments to tsdoc style (#35185)
1. change function comments to the minimal [tsdoc](https://tsdoc.org/)
style. This has the benefit of making editors show the doc string in
tooltips when the function is hovered:

<img width="521" height="110" alt="image"
src="https://github.com/user-attachments/assets/b966f4f1-8239-433a-a456-5bd5c05d69ef"
/>

2. disable eslint `multiline-comment-style` as it conflicts with tsdoc.

---------

Signed-off-by: silverwind <me@silverwind.io>
2025-07-31 15:59:34 -07:00
Lunny Xiao
5fd7fd3edb Fix migrate input box bug (#35166)
Fix #35162
2025-07-27 11:16:52 +03:00
Bart van der Braak
82c9589faa Only hide dropzone when no files have been uploaded (#35156)
Instead of always hiding the dropzone when it's not active:
- hide it when when there are no uploaded files and it becomes inactive 
- don't hide it when there are uploaded files

Fixes #35125

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-07-26 11:06:21 -07:00
wxiaoguang
692c90ea1d Fix form property assignment edge case (#35073)
"form" has an edge case: its `<input name=action>` element overwrites
the `action` property, we can only set attribute.

This PR makes `assignElementProperty` can handle such case, and add more
tests
2025-07-14 15:20:17 -07:00
wxiaoguang
a5a3d9b101 Refactor OpenIDConnect to support SSH/FullName sync (#34978)
* Fix #26585
* Fix #28327
* Fix #34932
2025-07-10 18:35:59 +00:00
silverwind
091b3e696d Tweak eslint config, fix new issues (#35019)
1. Enable
[`@typescript-eslint/no-unnecessary-type-conversion`](https://typescript-eslint.io/rules/no-unnecessary-type-conversion/),
I think the two cases that were hit are safe cases.
2. Disable `no-new-func`, `@typescript-eslint/no-implied-eval` does the
same but better.
2025-07-10 08:28:25 +00:00
Anbraten
ea809a5220 Partially refresh notifications list (#35010)
This PR prevents full reloads for the notifications list when changing a
notifications status (read, unread, pinned).

---------

Co-authored-by: Anton Bracke <anton.bracke@fastleansmart.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-07-10 04:15:14 +00:00
wxiaoguang
211135b4bb Fix various problems (#35012)
* Fix #35011
* Fix incorrect log message for "Protocol"
* Remove unnecessary styles, fix "comment-header" wrap, fix label height
2025-07-09 16:46:51 +00:00
silverwind
d3d357a4a4 Tweak placement of diff file menu (#34999)
Small tweak for better visual placement. Before:

<img width="175" alt="Screenshot 2025-07-08 at 18 16 51"
src="https://github.com/user-attachments/assets/766cfc82-1382-4aaa-8e99-c254665a0480"
/>

After:

<img width="134" alt="Screenshot 2025-07-08 at 18 16 34"
src="https://github.com/user-attachments/assets/2653dfcc-29be-4922-a4de-3257db7b66fd"
/>

Placement matches the "..." button above.
2025-07-09 00:44:14 +03:00
wxiaoguang
3763c2ae28 Refactor time tracker UI (#34983)
Although we decided to "reduce the button amount" on the side bar, not
only one user reported that the "time tracker dropdown" is not easy to
use.

So the best we can do at the moment is: move the buttons to the sidebar
again.

Fix #34979
2025-07-08 08:59:31 +00:00
wxiaoguang
9dafcc5c9e Improve project & label color picker and image scroll (#34971)
Fix #34609
Fix #34967
2025-07-06 23:37:26 +08:00
wxiaoguang
429efc8b4f Merge index.js (#34963)
Fix #34960
2025-07-06 04:55:16 +00:00
wxiaoguang
63ee6783b8 Refactor "delete-button" to "link-action" (#34962) 2025-07-06 00:01:53 +08:00
wxiaoguang
c05082669b Refactor frontend unique id & comment (#34958)
* there is no bug of the "unique element id", but duplicate code, this
PR just merges the duplicate "element id" logic and move the function
from "fomaintic" to "dom"
* improve comments
* make "git commit graph" page update pagination links correctly
2025-07-05 15:21:53 +00:00
wxiaoguang
70685a9489 Fix git graph page (#34948)
fix #34946
2025-07-04 15:41:19 +00:00
wxiaoguang
1d4ad5aa2b Improve html escape (#34911)
drop "escape-goat"
2025-07-01 21:44:05 +08:00
wxiaoguang
90f96c301e Fix PR toggle WIP (#34920)
Fix #34919

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
2025-07-01 16:32:39 +08:00
wxiaoguang
6596b92140 Fix modal + form abuse (#34921)
See the comment. And due to the abuse, there is a regression: when the
modal is hidden, the form will be reset and it can't submit.

This PR fixes all problems: keep the modal with form open, and add
"loading" indicator.
2025-07-01 15:19:03 +08:00
Kerwin Bryant
176962c03e Add support for 3D/CAD file formats preview (#34794)
Fix #34775 

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-06-30 16:12:25 +08:00
wxiaoguang
662db4a69c Improve tags list page (#34898) 2025-06-30 02:15:39 +00:00
wxiaoguang
8df59fa11c Fix project column edit (#34890)
Fix #34888
2025-06-28 16:15:51 +08:00
wxiaoguang
1839110ea6 Fix some log and UI problems (#34863)
Remove the misleading error log, fix #34738

Make the "search" input auto-focused, fix #34807
2025-06-26 00:32:50 +08:00