eb8bb82e58
Fix activity heat map padding & locale ( #30823 )
...
Fix #30808
---------
Co-authored-by: silverwind <me@silverwind.io >
2024-05-02 13:22:55 +00:00
wxiaoguang and GitHub
6ff2acc52c
Fix issue card layout ( #30800 )
...
Fix #30788
2024-05-02 11:19:44 +00:00
wxiaoguang and GitHub
ebe6f4cad7
Fix branch selector UI ( #30803 )
...
Fix #30802
2024-05-02 10:45:23 +00:00
be112c1fc3
Skip gzip for some well-known compressed file types ( #30796 )
...
Co-authored-by: silverwind <me@silverwind.io >
2024-05-02 02:27:25 +00:00
wxiaoguang and GitHub
ce08a9fe2f
Fix markdown rendering when mentioning users ( #30795 )
2024-05-02 01:00:46 +00:00
wxiaoguang and GitHub
6f7cd94a02
Fix bleve fuzziness ( #30799 )
...
Fix #30797
Fix #30317
2024-05-01 15:32:52 +03:00
wxiaoguang and GitHub
a988237eb4
Improve logout from worker ( #30775 )
...
A quick fix for #30756
2024-04-30 15:35:42 +00:00
wxiaoguang and GitHub
5f05e7b41a
Fix dashboard commit status null access ( #30771 )
...
Fix #30768
2024-04-30 12:39:36 +00:00
wxiaoguang and GitHub
059b2718a5
Right align the "Settings" menu item in overflow-menu ( #30764 )
...
I guess there could be enough people liking to make the Settings menu
item right aligned. As a site admin, I found it's easier to find the
right-aligned Settings menu item.
Tested with various sizes:



2024-04-30 04:26:13 +00:00
wxiaoguang and GitHub
61b495e5ab
Fix issue label rendering in the issue popup ( #30763 )
2024-04-30 02:36:32 +00:00
wxiaoguang and GitHub
4daea7c603
Rename CodeIndexerEnabled to IsRepoIndexerEnabled ( #30762 )
...
Fix #30761
Most places use `IsRepoIndexerEnabled` but not `CodeIndexerEnabled`, so
it should always use `IsRepoIndexerEnabled` for consistency.
2024-04-29 20:15:35 +00:00
wxiaoguang and GitHub
8de2992ffb
Make Ctrl+Enter work for issue/comment edit ( #30720 )
...
Fix #30710
2024-04-27 14:32:00 +00:00
wxiaoguang and GitHub
6d2a307ad8
Rename migration package name for 1.22-rc1 ( #30730 )
...
Ref: Propose to restart 1.22 release #30501
2024-04-27 14:02:07 +00:00
wxiaoguang and GitHub
d3cdef88ad
Add some tests to clarify the "must-change-password" behavior ( #30693 )
...
Follow #30472 :
When a user is created by command line `./gitea admin user create`:
Old behavior before #30472 : the first user (admin or non-admin) doesn't
need to change password.
Revert to the old behavior before #30472
2024-04-27 12:23:37 +00:00
wxiaoguang and GitHub
993736d838
Fix code search input for different views ( #30678 )
...
Now only show the "code search" on the repo home page, because it only
does global search.
So do not show it when viewing file or directory to avoid misleading
users (it doesn't search in a directory)
2024-04-26 11:21:04 +00:00
cd70ab31cd
Fix incorrect object id hash function ( #30708 )
...
Great thanks to @oliverpool for figuring out the problem and proposing a
fix.
Regression of #28138
Incorrect hash causes the user's LFS files get all deleted when running
`doctor fix all`
(by the way, remove unused/non-standard comments)
Co-authored-by: Giteabot <teabot@gitea.io >
2024-04-26 09:49:48 +00:00
wxiaoguang and GitHub
1e749b80d7
Add route handler info for debugging purpose ( #30705 )
...
Follow #30519
2024-04-26 09:09:49 +00:00
wxiaoguang and GitHub
ed8c63cea3
Deduplicate lfs common code ( #30704 )
2024-04-26 02:53:30 +00:00
wxiaoguang and GitHub
6a0750177f
Allow to save empty comment ( #30706 )
...
Fix #29986
2024-04-26 01:17:43 +00:00
wxiaoguang and GitHub
fd63b96f6a
Refactor imagediff and fix regression bug ( #30694 )
...
Fix #30683
2024-04-25 21:01:38 +08:00
wxiaoguang and GitHub
bffbbf5470
Improve oauth2 client "preferred username field" logic and the error handling ( #30622 )
...
Follow #30454
And fix #24957
When using "preferred_username", if no such field,
`extractUserNameFromOAuth2` (old `getUserName`) shouldn't return an
error. All other USERNAME options do not return such error.
And fine tune some logic and error messages, make code more stable and
more friendly to end users.
2024-04-25 11:22:32 +00:00
wxiaoguang and GitHub
2ee93ea178
Avoid doubled border for the PR info segment ( #30663 )
2024-04-23 19:24:10 +00:00
wxiaoguang and GitHub
b79e3db264
Initial support for colorblindness-friendly themes ( #30625 )
...
Initial support for #25680
This PR only adds some simple styles from GitHub, it is big enough and
it focuses on adding the necessary framework-level supports. More styles
could be fine-tuned later.
2024-04-24 00:18:41 +08:00
wxiaoguang and GitHub
dd2aaadce3
Fix flash message for flex-container ( #30657 )
2024-04-23 08:31:51 +00:00
wxiaoguang and GitHub
e6103955cc
Fix queue test ( #30646 )
...
Fix #30643
The old test code is not stable due to the data-race described in the
TODO added at that time.
Make it stable, and remove a debug-only field from old test code.
2024-04-22 23:55:43 +00:00
wxiaoguang and GitHub
7cb88e9c18
Use correct hash for "git update-index" ( #30626 )
2024-04-22 00:13:44 +00:00
wxiaoguang and GitHub
f4a1cf7eab
Fix repo home UI when there is no repo description ( #30552 )
...
Fix #30502 by a new approach.

2024-04-21 23:47:31 +00:00
wxiaoguang and GitHub
1e4867730b
Fix dropdown text ellipsis ( #30628 )
...
Follow
https://github.com/go-gitea/gitea/pull/30547#discussion_r1573866519
Fix #30624
The Fomantic UI Dropdown wasn't designed to work that way, its "text"
element might contain images. So the "overflow" shouldn't be added to
any general dropdown text.

2024-04-21 23:14:33 +00:00
wxiaoguang and GitHub
f95622cddc
Fix issue comment form and quick-submit ( #30623 )
...
1. Rewrite initGlobalEnterQuickSubmit (by the way, remove jQuery)
2. Fix issue comment form layout
2024-04-22 01:00:04 +08:00
48d4580dd5
Clarify permission "HasAccess" behavior ( #30585 )
...
Follow #30495
"HasAccess" behavior wasn't clear, to make it clear:
* Use a new name `HasAnyUnitAccess`, it will be easier to review related
code and permission problems.
* Separate everyone access mode to a separate field, then all calls to
HasAccess are reverted to old behavior before #30495 .
* Add new tests.
---------
Co-authored-by: Giteabot <teabot@gitea.io >
2024-04-20 03:15:04 +00:00
89e39872ff
Fix links in PyPI Simple Repository API page ( #30594 )
...
Thanks to @Zottelchen for looking into problem and proposing the fix.
Ref: https://github.com/astral-sh/uv/issues/3017 ,
https://peps.python.org/pep-0503/
This PR's change is from Zottelchen's work.
And I by the way rename the `$p` to `$pd` because `p` is used as
"package" in code, while `pd` is used as "package description".
----
Co-authored-by: Zottelchen
2024-04-20 01:15:14 +00:00
wxiaoguang and GitHub
53cf46cae7
Fix commit file status parser ( #30602 )
...
Try to fix #30492
2024-04-19 14:41:03 +00:00
wxiaoguang and GitHub
f60e1a1af2
Fix HEAD method for robots.txt ( #30603 )
...
Fix #30601
2024-04-19 21:43:56 +08:00
eb24d973b0
Fix project description rendering for org ( #30587 )
...
Fix #30263

Co-authored-by: Giteabot <teabot@gitea.io >
2024-04-19 07:58:56 +00:00
wxiaoguang and GitHub
fe82991547
Fix changelog (main) ( #30582 )
...
1. The 1.21.11 changelog is missing
2. Split the old content to CHANGELOG-archived.md, to reduce the size of
CHANGELOG.md
2024-04-19 06:08:30 +00:00
wxiaoguang and GitHub
bcbeb24dba
Mock queue backoff duration ( #30553 )
...
During testing, the backoff duration shouldn't be longer than other
durations
2024-04-18 20:00:59 +00:00
d0e0708355
Refactor and fix archive link bug ( #30535 )
...
Regression of #29920
Fixes : #30569
Also this is a rewriting to eliminate the remaining jQuery usages from code.
Co-authored-by: Giteabot <teabot@gitea.io >
2024-04-19 00:45:50 +08:00
wxiaoguang and GitHub
d1ba5f431b
Some following up changes for routes ( #30550 )
...
1. Switch back to the old order for `reqRepoAdmin, context.RepoRef()`
2. Add a routing function info for global NotFound
2024-04-18 09:36:19 +00:00
wxiaoguang and GitHub
3feba9f1f4
Allow everyone to read or write a wiki by a repo unit setting ( #30495 )
...
Replace #6312
Help #5833
Wiki solution for #639
2024-04-17 15:58:37 +00:00
0798370f25
Correct locale string rendering ( #30522 )
...
Since #29165 , the translations are rendered as HTML in templates, so:
1. if the translation does contain `<>`, use `TrString`
2. use `{dummy}` instead of `<dummy>` as much as possible
Co-authored-by: Giteabot <teabot@gitea.io >
2024-04-17 10:24:08 +00:00
3e2e76e248
Refactor web routes ( #30519 )
...
Re-organize the routes in web.go and use ctx constants instead of `context.UnitTypes()`
---------
Co-authored-by: Giteabot <teabot@gitea.io >
2024-04-17 08:31:37 +00:00
b84baf21fa
Improve flex ellipsis ( #30479 )
...

---------
Co-authored-by: silverwind <me@silverwind.io >
2024-04-14 21:43:30 +02:00
4c6e2da088
Improve "must-change-password" logic and document ( #30472 )
...
Unify the behaviors of "user create" and "user change-password".
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2024-04-14 17:22:14 +00:00
wxiaoguang and GitHub
18dd9f9a3f
Fix label rendering ( #30456 )
...
1. Check whether the label is for an issue or a pull request.
2. Don't use space to layout
3. Make sure the test strings have trailing spaces explicitly, to avoid
some IDE removing the trailing spaces automatically.
2024-04-13 10:05:33 +00:00
wxiaoguang and GitHub
92e27e15c3
Add comment for ContainsRedirectURI about the exact match ( #30457 )
...
Close #26897
Replace #30336
2024-04-13 09:31:40 +00:00
wxiaoguang and GitHub
c248f010ad
Refactor cache and disable go-chi cache ( #30417 )
...
use built-in cache package to wrap external go-chi cache package
2024-04-13 08:38:44 +00:00
wxiaoguang and GitHub
f9fdac9809
Limit the max line length when parsing git grep output ( #30418 )
2024-04-12 03:36:34 +00:00
wxiaoguang and GitHub
26ee66327f
Split issue edit code from repo-legacy.js into its own file ( #30419 )
...
Follow Split `index.js` to separate files (#17315 )
It's time to move some code away from the messy "legacy" file.
2024-04-12 02:22:59 +08:00
wxiaoguang and GitHub
074a3e05f6
Fix oauth2 builtin application logic ( #30304 )
...
Fix #29074 (allow to disable all builtin apps) and don't make the doctor
command remove the builtin apps.
By the way, rename refobject and joincond to camel case.
2024-04-08 04:13:34 +00:00
83f83019ef
Clean up log messages ( #30313 )
...
`log.Xxx("%v")` is not ideal, this PR adds necessary context messages.
Remove some unnecessary logs.
Co-authored-by: Giteabot <teabot@gitea.io >
2024-04-07 19:17:06 +08:00
wxiaoguang and GitHub
bbe5cd7c92
Refactor startup deprecation messages ( #30305 )
...
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
2024-04-07 01:11:25 +00:00
wxiaoguang and GitHub
7396172a02
Fix code block style for code preview ( #30298 )
...
Fix #30292
To avoid unnecessary style overriding, use "div" instead of "code"
2024-04-06 20:07:08 +08:00
wxiaoguang and GitHub
b2b49c9bde
Fix view commit link ( #30297 )
...
Fix #30098
2024-04-06 02:03:07 +08:00
654cfd1dfb
Refactor "dump" sub-command ( #30240 )
...
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 >
2024-04-03 02:16:46 +00:00
ca5c895efb
Render embedded code preview by permlink in markdown ( #30234 )
...
The permlink in markdown will be rendered as a code preview block, like GitHub
Co-authored-by: silverwind <me@silverwind.io >
2024-04-02 17:48:27 +00:00
wxiaoguang and GitHub
0db554fa63
Refactor commit signature parser ( #30228 )
...
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`
2024-04-01 20:23:17 +00:00
wxiaoguang and GitHub
ca297a90fb
Refactor dropzone ( #30232 )
...
Simplify code and use `.files` elements
2024-04-02 02:16:38 +08:00
wxiaoguang and GitHub
751997ad34
Refactor file view & render ( #30227 )
...
The old code is inconsistent and fragile, and the UI isn't right.
2024-04-01 21:11:30 +08:00
wxiaoguang and GitHub
a008486f5c
Refactor DeleteInactiveUsers, fix bug and add tests ( #30206 )
...
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
2024-04-01 02:06:35 +00:00
wxiaoguang and GitHub
ab028356c7
Fix markdown color code detection ( #30208 )
...
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.
2024-03-31 19:17:34 +08:00
wxiaoguang and GitHub
6d34ce25b1
Do not allow different storage configurations to point to the same directory ( #30169 )
...
Replace #29171
2024-03-31 03:03:24 +00:00
wxiaoguang and GitHub
71706126b5
Refactor markdown render ( #30139 )
...
Only split the file into small ones (and rename AttentionTypes to
attentionTypes)
2024-03-28 02:26:13 +00:00
1ad48f781e
Relax generic package filename restrictions ( #30135 )
...
Now, the chars `=:;()[]{}~!@#$%^ &` are possible as well
Fixes #30134
---------
Co-authored-by: KN4CK3R <admin@oldschoolhack.me >
2024-03-27 16:55:05 +00:00
wxiaoguang and GitHub
f1707f4562
Refactor render ( #30136 )
2024-03-27 13:14:34 +00:00
wxiaoguang and GitHub
8e79aed573
Fix git grep search limit, add test ( #30071 )
...
Fix #30069
2024-03-25 21:25:22 +08:00
4734d43e14
Support repo code search without setting up an indexer ( #29998 )
...
By using git's ability, end users (especially small instance users) do
not need to enable the indexer, they could also benefit from the code
searching feature.
Fix #29996


---------
Co-authored-by: silverwind <me@silverwind.io >
2024-03-24 17:05:00 +01:00
wxiaoguang and GitHub
1cdc6c3a4e
Escape paths for find file correctly ( #30026 )
...
Fix #30020
2024-03-23 13:07:47 +00:00
wxiaoguang and GitHub
2ff213bbc1
Refactor markdown attention render ( #29984 )
...
Follow #29833 and add tests
2024-03-22 12:16:23 +00:00
wxiaoguang and GitHub
226231ea27
Fix some pending problems ( #29985 )
...
These changes are quite independent and trivial, so I don't want to open
too many PRs.
* https://github.com/go-gitea/gitea/pull/29882#discussion_r1529607091
* the `f.Close` should be called properly
* the error message could be more meaningful
(https://github.com/go-gitea/gitea/pull/29882#pullrequestreview-1942557935 )
*
https://github.com/go-gitea/gitea/pull/29859#pullrequestreview-1942324716
* the new translation strings don't take arguments
* https://github.com/go-gitea/gitea/pull/28710#discussion_r1443778807
* stale for long time
* #28140
* a form was forgotten to be changed to work with backend code
2024-03-22 19:17:30 +08:00
wxiaoguang and GitHub
ca4107dc96
Refactor external URL detection ( #29973 )
...
Follow #29960 , `IsExternalURL` is not needed anymore.
Add some tests for `RedirectToCurrentSite`
2024-03-22 04:32:40 +08:00
wxiaoguang and GitHub
bfa160fc98
Refactor repo header/list ( #29969 )
...
1. Use general "mobile-only" and "not-mobile" CSS styles, remove some`@media (max-width: 767.98px)` tricks
2. Use `CountFmt` for repo list, just like the repo header (and it matches GitHub, to avoid big numbers bloat the page)
2024-03-21 17:04:03 +00:00
wxiaoguang and GitHub
cdb4d1a8db
Refactor StringsToInt64s ( #29967 )
...
And close #27176
2024-03-21 15:07:35 +00:00
wxiaoguang and GitHub
01500957c2
Refactor URL detection ( #29960 )
...
"Redirect" functions should only redirect if the target is for current Gitea site.
2024-03-21 12:02:34 +00:00
wxiaoguang and GitHub
21151474e3
Fix loadOneBranch panic ( #29938 )
...
Try to fix #29936
Far from ideal, but still better than panic.
2024-03-20 15:38:22 +00:00
wxiaoguang and GitHub
bc55a80693
Fix comment review avatar alignment ( #29935 )
...
Fix #29934
2024-03-20 14:05:34 +00:00
wxiaoguang and GitHub
91699a9bb1
Remove unnecessary ".Link" usages ( #29929 )
...
Follow #29909
2024-03-20 06:58:10 +00:00
wxiaoguang and GitHub
4c476fa41d
Remove unnecessary ".Link" usages ( #29909 )
...
In HTML, `?key=val` already means "use the current link with new query parameters"
2024-03-20 13:56:42 +08:00
wxiaoguang and GitHub
828701ff2d
Fix template error when comment review doesn't exist ( #29888 )
...
Fix #29885
2024-03-19 04:19:48 +00:00
wxiaoguang and GitHub
b251e608c0
Only do counting when count_only=true for repo dashboard ( #29884 )
...
Ref: #29878
2024-03-18 11:05:17 +00:00
wxiaoguang and GitHub
abb330e613
Upgrade Go 1.22 and upgrade dependency ( #29869 )
2024-03-17 15:40:05 +00:00
wxiaoguang and GitHub
673286d8c8
Refactor clone-panel styles ( #29861 )
...
1. The borders were doubled on the "empty" page, fix it.
2. Remove unnecessary CSS classes like "clone", "compact", etc
3. Use CSS class "clone-panel" instead of ID "clone-panel"
4. Use `tw-flex-1` instead of `gt-f1`
5. Remove unnecessary ID "more-btn"
2024-03-17 12:40:42 +00:00
wxiaoguang and GitHub
a889381664
Remove AddParamIfExist(AddParam) ( #29841 )
...
Follow #29834
Remove AddParamIfExist, use "AddParamString" instead, it should clearly
know what is being added into the parameters.
2024-03-16 12:07:56 +00:00
wxiaoguang and GitHub
66902d89e5
Refactor markdown attention render ( #29833 )
...
* Remove some deadcode
* Use 2-word name for CSS class names
* Remove "gt-*" rules for sanitizer
The UI doesn't change much.
2024-03-16 11:34:38 +00:00
wxiaoguang and GitHub
e0ea3811c4
Refactor AddParam to AddParamIfExist ( #29834 )
...
When read the code: `pager.AddParam(ctx, "search", "search")`, the
question always comes: What is it doing? Where is the value from? Why
"search" / "search" ?
Now it is clear: `pager.AddParamIfExist("search", ctx.Data["search"])`
2024-03-16 10:20:13 +01:00
7a6260f889
Improve repo search UI ( #29767 )
...
1. Introduce a special "flex-items-block" for menu items, to align the
dropdown menu items
2. Simplify the "repo search" form
3. Add missing "TopicOnly" search option
Screenshots:
The old UI items don't align:
<details>

</details>
New UI (doesn't change much, but the items align)
<details>


</details>
---------
Co-authored-by: silverwind <me@silverwind.io >
2024-03-15 09:45:30 +00:00
wxiaoguang and GitHub
43de021ac1
Add test for webhook ( #29755 )
...
Follow #29690
2024-03-14 01:10:51 +00:00
wxiaoguang and GitHub
df60dbfb99
Fix incorrect locale Tr for gpg command ( #29754 )
2024-03-13 16:24:34 +00:00
e01b0014de
Improve a11y document and dropdown item ( #29753 )
...
Co-authored-by: silverwind <me@silverwind.io >
2024-03-13 13:44:46 +00:00
wxiaoguang and GitHub
3e94ac5c7c
Improve QueryEscape helper function ( #29768 )
...
Make it return "template.URL" to follow Golang template's context
auto-escaping.
2024-03-13 21:32:30 +08:00
wxiaoguang and GitHub
29a8c8de77
Partially enable MSSQL case-sensitive collation support ( #29238 )
...
Follow #28662
2024-03-08 03:19:35 +00:00
wxiaoguang and GitHub
c72e1a7abb
Use strict protocol check when redirect ( #29642 )
2024-03-07 02:03:41 +00:00
wxiaoguang and GitHub
1d2548949a
Avoid issue info panic ( #29625 )
...
Fix #29624
2024-03-06 13:12:44 +00:00
wxiaoguang and GitHub
90a3f2d4b7
Avoid unexpected panic in graceful manager ( #29629 )
...
There is a fundamental design problem of the "manager" and the "wait
group".
If nothing has started, the "Wait" just panics: sync: WaitGroup is
reused before previous Wait has returned
There is no clear solution besides a complete rewriting of the "manager"
If there are some mistakes in the app.ini, end users would just see the
"panic", but not the real error messages. A real case: #27643
This PR is just a quick fix for the annoying panic problem.
2024-03-06 11:50:39 +00:00
wxiaoguang and GitHub
c381343a60
Add a link for the recently pushed branch notification ( #29627 )
2024-03-06 11:25:00 +00:00
wxiaoguang and GitHub
5cddab4f74
Make wiki default branch name changable ( #29603 )
...
Fix #29000
Fix #28685
Fix #18568
Related: #27497
And by the way fix #24036 , add a Cancel button there (one line)
2024-03-06 14:26:32 +08:00
wxiaoguang and GitHub
61619c84d0
Fix 500 error when adding PR comment ( #29622 )
2024-03-06 13:09:38 +08:00
wxiaoguang and GitHub
ebff37ae09
Improve natural sort ( #29611 )
...
Hugely simplify the code, and add more tests (only new approach could
pass)
2024-03-05 15:13:35 +00:00
wxiaoguang and GitHub
3e84bfdf41
Remove unnecessary ctxData for "attachments" template ( #29600 )
...
The "attachments" template never uses it
2024-03-05 04:59:16 +00:00
wxiaoguang and GitHub
ade6241691
Use flex wrap to layout the PR update button ( #29590 )
...
Follow #29418
I think using "flex-wrap: wrap" here is better than hard-coding the screen width.
By using "flex-wrap: wrap", the UI layouts automatically for various
widths (even if in some languages, the sentence might be pretty long)
2024-03-05 03:03:14 +00:00
wxiaoguang and GitHub
df1268ca08
Make "/user/login" page redirect if the current user has signed in ( #29583 )
...
Fix #29582 and maybe more.
Maybe fix #29116
2024-03-05 02:12:03 +00:00