0
0
mirror of https://github.com/go-gitea/gitea.git synced 2026-02-25 23:16:21 +01:00

363 Commits

Author SHA1 Message Date
Lunny Xiao
a6eb361a23
Fix test 2025-12-29 18:34:16 -08:00
Lunny Xiao
b03ab12143 Merge branch 'main' into lunny/project_workflow 2025-12-25 17:16:23 -08:00
silverwind
42d294941c
Replace CSRF cookie with CrossOriginProtection (#36183)
Removes the CSRF cookie in favor of
[`CrossOriginProtection`](https://pkg.go.dev/net/http#CrossOriginProtection)
which relies purely on HTTP headers.

Fixes: https://github.com/go-gitea/gitea/issues/11188
Fixes: https://github.com/go-gitea/gitea/issues/30333
Helps: https://github.com/go-gitea/gitea/issues/35107

TODOs:

- [x] Fix tests
- [ ] Ideally add tests to validates the protection

---------

Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-25 12:33:34 +02:00
bytedream
05c3b84f84
Show edit page confirmation dialog on tree view file change (#36130)
Currently, when editing or deleting a file and the edit/commit form has
changes, navigating the file tree will discard all changes without any
warning. This PR prevents partial reloading when the edit form has
unsaved changes, which will trigger a browser native warning dialog.

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-20 02:29:39 +01:00
silverwind
ac8308b5cb
Refactor FileTreeItem type (#36137) 2025-12-13 13:03:51 +00:00
a1012112796
ee365f5100
fix some file icon ui (#36078)
fix #36071

looks that's because if an svg in hiden env, it's color added by
`fill="url(#a)"` will become not usefull. by ai helping, I think moving
it out of page by position is a good solution. fell free creat a new
pull request if you have a better soluton. Thanks.
<img width="2198" height="1120" alt="image"
src="https://github.com/user-attachments/assets/bbf7c171-0b7f-412a-a1bc-aea3f1629636"
/>

---------

Signed-off-by: a1012112796 <1012112796@qq.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-04 19:47:23 +01:00
silverwind
46d7adefe0
Enable TypeScript strictNullChecks (#35843)
A big step towards enabling strict mode in Typescript.

There was definitely a good share of potential bugs while refactoring
this. When in doubt, I opted to keep the potentially broken behaviour.
Notably, the `DOMEvent` type is gone, it was broken and we're better of
with type assertions on `e.target`.

---------

Signed-off-by: silverwind <me@silverwind.io>
Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-12-03 02:13:16 +00:00
Bryan Mutai
7d6861ac54
Add "Go to file", "Delete Directory" to repo file list page (#35911)
/claim #35898
Resolves #35898 

### Summary of key changes:

1. Add file name search/Go to file functionality to repo button row.
2. Add backend functionality to delete directory
3. Add context menu for directories with functionality to copy path & delete a directory
4. Move Add/Upload file dropdown to right for parity with Github UI
5. Add tree view to the edit/upload UI

---------

Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-30 11:58:15 +08:00
silverwind
1da1e644ed
Misc CSS fixes (#35888)
Fixes: https://github.com/go-gitea/gitea/issues/35913
Fixes: https://github.com/go-gitea/gitea/issues/35942

Contains a number of minor CSS fixes.

---------

Signed-off-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2025-11-19 03:02:41 +00:00
Lunny Xiao
08d28090a4 Merge branch 'main' into lunny/project_workflow 2025-11-11 11:00:13 -08:00
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
be143bdd6e
Delete unused code 2025-11-04 12:53:00 -08:00
Lunny Xiao
7db5b850ca
fix clone workflow 2025-11-04 12:36:00 -08:00
Lunny Xiao
c6bd967966
Merge branch 'main' into lunny/project_workflow 2025-11-03 12:23:08 -08: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
Lunny Xiao
4c4a16ccb5 Merge branch 'main' into lunny/project_workflow 2025-10-31 21:32:51 -07: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
Lunny Xiao
984d4b0a3b
Fix lint 2025-10-28 12:15:59 -07:00
Lunny Xiao
0b41bfa135
Add valid when saving project workflow event 2025-10-28 11:52:37 -07:00
Lunny Xiao
3f9f725bd1
revert label component change 2025-10-27 10:22:44 -07:00
Lunny Xiao
b840641fdc
revert label component change 2025-10-27 10:19:36 -07:00
Lunny Xiao
b04d42b00f Merge branch 'main' into lunny/project_workflow 2025-10-27 09:30:40 -07: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
Lunny Xiao
fdd3bf04cb
remove unused code 2025-10-25 20:28:16 -07:00
Lunny Xiao
045945d518
Fix label menu 2025-10-25 20:14:20 -07:00
Lunny Xiao
3d636fcbd4
fix bug and add label selector 2025-10-25 19:07:08 -07:00
Lunny Xiao
4efc69cbf3
Fix dark theme 2025-10-25 17:16:28 -07:00
Lunny Xiao
3aef130379
improvements 2025-10-25 16:59:28 -07:00
Lunny Xiao
37196261a6
improvements 2025-10-25 16:46:18 -07:00
Lunny Xiao
d6958c50d5
Fix lint 2025-10-25 14:37:46 -07:00
Lunny Xiao
e1d2cf47fd
Fix bug 2025-10-25 13:02:38 -07:00
Lunny Xiao
f68eee55a1
Fix translations 2025-10-25 11:55:28 -07:00
Lunny Xiao
635649d3bd
add translations 2025-10-24 23:59:13 -07:00
Lunny Xiao
3d081b300f
Fix bug 2025-10-24 21:35:11 -07:00
Lunny Xiao
903d605fe1
improvements 2025-10-24 10:55:10 -07:00
Lunny Xiao
c2419f8c5b
improvements 2025-10-23 22:24:52 -07:00
Lunny Xiao
7eb5673522
fix 2025-10-23 21:31:49 -07:00
Lunny Xiao
6c4160dba0
fix 2025-10-23 15:19:02 -07:00
Lunny Xiao
7240b2b144
fix 2025-10-23 14:44:03 -07:00
Lunny Xiao
829fa15816
fix 2025-10-23 11:39:22 -07:00
Lunny Xiao
cc4a85b226
fix 2025-10-23 11:29:36 -07:00
Lunny Xiao
ab5fa408ef
fix clone 2025-10-23 11:15:49 -07:00
Lunny Xiao
822387aa38
support labels filter 2025-10-23 11:06:44 -07:00
Lunny Xiao
74fc30ff71
Support add labels and remove labels for issue's project column changed event 2025-10-23 00:47:34 -07:00
Lunny Xiao
836bf98507
Remove clone support at the time 2025-10-22 23:34:09 -07:00
Lunny Xiao
81156845af
replace alert 2025-10-22 22:47:20 -07:00
Lunny Xiao
b191ded690
Fix 2025-10-22 22:40:49 -07:00
Lunny Xiao
f7b8f6ed99 Merge branch 'main' into lunny/project_workflow 2025-10-22 10:04:51 -07:00
wxiaoguang
a2eea2fb2e
Fix various trivial problems (#35714) 2025-10-21 13:19:29 +08:00