6543
bb04311b0b
[Refactor] Unify repo search order by logic ( #30876 )
...
have repo OrderBy definitions defined in one place and use a single type
for OrderBy database options
2024-06-13 09:13:11 +00:00
Kerwin Bryant
fede3cbada
Fixed incorrect localization `explorer.go` ( #31348 )
...
see: https://github.com/go-gitea/gitea/pull/29701/files#r1637325139
2024-06-13 01:43:41 +00:00
wxiaoguang
47ca61d8ba
Improve detecting empty files ( #31332 )
...
Co-authored-by: silverwind <me@silverwind.io>
2024-06-13 01:06:46 +00:00
silverwind
21ba5ca03b
Fix navbar `+` menu flashing on page load ( #31281 )
...
Fixes
https://github.com/go-gitea/gitea/pull/31273#issuecomment-2153771331 .
Same method as used in https://github.com/go-gitea/gitea/pull/30215 . All
left-opening dropdowns need to use it method.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2024-06-12 14:58:03 +00:00
Kerwin Bryant
a975ce8d9d
Optimize profile layout to enhance visual experience ( #31278 )
...
Co-authored-by: silverwind <me@silverwind.io>
2024-06-12 04:06:12 +00:00
Kerwin Bryant
e6ab6e637f
code optimization ( #31315 )
...
Simplifying complex if-else to existing Iif operations
2024-06-11 21:07:10 +08:00
silverwind
a2304cb163
Remove jQuery `.text()` ( #30506 )
...
Remove and forbid [.text()](https://api.jquery.com/text/ ). Tested some,
but not all functionality, but I think these are pretty safe
replacements.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-06-10 18:12:31 +08:00
wxiaoguang
0188d82e49
Fix some URLs whose sub-path is missing ( #31289 )
...
Fix #31285
2024-06-07 15:15:17 +00:00
Kerwin Bryant
ab1948d4a3
fixed the dropdown menu for the top New button to expand to the left ( #31273 )
...
before:
![1717660314025](https://github.com/go-gitea/gitea/assets/3371163/17ae7a48-31c5-4c71-b285-f65d9106bf86 )
after:
![1717660674763](https://github.com/go-gitea/gitea/assets/3371163/85f847ac-a044-4695-9004-26e6485288c6 )
2024-06-06 23:49:53 +00:00
Kerwin Bryant
8e33746746
Optimize repo-list layout to enhance visual experience ( #31272 )
...
before:
![1717655078227](https://github.com/go-gitea/gitea/assets/3371163/4d564f96-c2f8-46b1-996f-6cc7abb940ef )
***The problem was that the icon and text were not on a horizontal line,
and the horizontal was not centered;***
after:
![1717655094071](https://github.com/go-gitea/gitea/assets/3371163/b11797f6-05f8-486c-b5fd-df89d0cbdcfd )
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2024-06-07 01:22:03 +02:00
Max Wipfli
da4bbc4247
Allow including `Reviewed-on`/`Reviewed-by` lines for custom merge messages ( #31211 )
...
This PR introduces the `ReviewedOn` and `ReviewedBy` variables for the
default merge message templates (e.g.,
`.gitea/default_merge_message/MERGE_TEMPLATE.md`).
This allows customizing the default merge messages while retaining these
trailers.
This also moves the associated logic out of `pull.tmpl` into the
relevant Go function.
This is a first contribution towards #11077 .
---
For illustration, this allows to recreate the "default default" merge
message with the following template:
```
.gitea/default_merge_message/MERGE_TEMPLATE.md
Merge pull request '${PullRequestTitle}' (${PullRequestReference}) from ${HeadBranch} into ${BaseBranch}
${ReviewedOn}
${ReviewedBy}
```
2024-06-06 08:35:04 +00:00
wxiaoguang
e728fd741b
Fix Activity Page Contributors dropdown ( #31264 )
...
Fix #31261
2024-06-06 10:28:33 +08:00
Kerwin Bryant
06ebae7472
Optimize runner-tags layout to enhance visual experience ( #31258 )
...
![image](https://github.com/go-gitea/gitea/assets/3371163/b8199005-94f2-45be-8ca9-4fa1b3f221b2 )
2024-06-05 22:39:45 +08:00
silverwind
138e946c3d
Replace `gt-word-break` with `tw-break-anywhere` ( #31183 )
...
`overflow-wrap: anywhere` is a superior alternative to `word-wrap:
break-word` and we were already setting it in the class. I tested a few
cases, all look good.
2024-06-04 13:57:11 +00:00
silverwind
4ca65fabda
Remove .segment from .project-column ( #31204 )
...
Using `.segment` on the project columns is a major abuse of that class,
so remove it and instead set the border-radius directly on it.
Fixes: https://github.com/go-gitea/gitea/issues/31129
2024-06-04 07:46:05 +00:00
silverwind
1f8ac27b31
Fix overflow on push notification ( #31179 )
...
Fixes: https://github.com/go-gitea/gitea/issues/30063
<img width="1301" alt="Screenshot 2024-05-30 at 14 43 24"
src="https://github.com/go-gitea/gitea/assets/115237/00443af0-088d-49a5-be9e-8c9adcc2c01d ">
2024-06-04 07:14:24 +00:00
silverwind
4f9b8b397c
Fix overflow on notifications ( #31178 )
...
Fixes https://github.com/go-gitea/gitea/issues/31170 .
<img width="1312" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/627711ed-93ca-4be6-b958-10d673ae9517 ">
2024-06-04 06:10:04 +00:00
Kemal Zebari
cb27c438a8
Document possible action types for the user activity feed API ( #31196 )
...
Resolves #31131 .
It uses the the go-swagger `enum` property to document the activity
action types.
2024-06-03 13:40:48 +00:00
silverwind
9b05bfb173
Fix overflow in issue card ( #31203 )
...
Before:
<img width="373" alt="Screenshot 2024-06-01 at 01 31 26"
src="https://github.com/go-gitea/gitea/assets/115237/82a210f2-c82e-4b7e-ac43-e70e46fa1186 ">
After:
<img width="376" alt="Screenshot 2024-06-01 at 01 31 32"
src="https://github.com/go-gitea/gitea/assets/115237/82d1b9f7-4fad-47bd-948a-04e1e7e006e6 ">
2024-06-03 00:09:51 +00:00
Lunny Xiao
2788a7ca27
Fix agit checkout command line hint & fix ShowMergeInstructions checking ( #31219 )
2024-06-03 06:45:21 +08:00
silverwind
7034efc7dc
Use vertical layout for multiple code expander buttons ( #31122 )
...
Fixes: https://github.com/go-gitea/gitea/issues/31068
- Now it only does a single call to `GetExpandDirection` per line
instead of multiples.
- Exposed `data-expand-direction` to frontend so it can correctly size
the buttons (it's a pain to do in tables).
<img width="142" alt="Screenshot 2024-05-27 at 20 44 56"
src="https://github.com/go-gitea/gitea/assets/115237/8b0b45a6-8e50-4081-8822-5e0775d8d941 ">
<img width="142" alt="Screenshot 2024-05-27 at 20 44 51"
src="https://github.com/go-gitea/gitea/assets/115237/b7ba2c57-8f55-4e9f-9606-c96d16b77892 ">
<img width="132" alt="Screenshot 2024-05-27 at 20 44 46"
src="https://github.com/go-gitea/gitea/assets/115237/0e838fb8-5e8c-4250-9843-a68b88d5418b ">
<img width="80" alt="Screenshot 2024-05-27 at 20 44 33"
src="https://github.com/go-gitea/gitea/assets/115237/da6c7f83-c160-4389-8ab2-889d0568cbe8 ">
<img width="80" alt="Screenshot 2024-05-27 at 20 44 26"
src="https://github.com/go-gitea/gitea/assets/115237/cdb490b2-5040-484a-92e5-46fc5e37c199 ">
<img width="78" alt="Screenshot 2024-05-27 at 20 44 20"
src="https://github.com/go-gitea/gitea/assets/115237/d2978ab0-764e-41ff-922c-25f8fe749f28 ">
Would backport as trivial enhancement.
2024-05-29 06:08:45 +00:00
silverwind
1e3c4d8fc7
Improve mobile review ui ( #31091 )
...
Fixes: https://github.com/go-gitea/gitea/issues/31071
Not perfect but much better than before.
Before: Overflows, sticky not working, filename unreadable:
<img width="506" alt="Screenshot 2024-05-27 at 02 02 40"
src="https://github.com/go-gitea/gitea/assets/115237/a06b1edf-dece-4402-98c2-68670fca265f ">
After:
<img width="457" alt="Screenshot 2024-05-27 at 01 59 06"
src="https://github.com/go-gitea/gitea/assets/115237/2a282c96-e719-4554-b418-81963ae6269c ">
2024-05-28 13:41:37 +00:00
Lunny Xiao
de4616690f
Add topics for repository API ( #31127 )
...
Fix ##31100
2024-05-28 10:03:54 +00:00
metiftikci
aa92b13164
Prevent simultaneous editing of comments and issues ( #31053 )
...
fixes #22907
Tested:
- [x] issue content edit
- [x] issue content change tasklist
- [x] pull request content edit
- [x] pull request change tasklist
![issue-content-edit](https://github.com/go-gitea/gitea/assets/29250154/a0828889-fb96-4bc4-8600-da92e3205812 )
2024-05-27 15:34:18 +00:00
Lunny Xiao
98751108b1
Rename project board -> column to make the UI less confusing ( #30170 )
...
This PR split the `Board` into two parts. One is the struct has been
renamed to `Column` and the second we have a `Template Type`.
But to make it easier to review, this PR will not change the database
schemas, they are just renames. The database schema changes could be in
future PRs.
---------
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: yp05327 <576951401@qq.com>
2024-05-27 08:59:54 +00:00
delvh
072b029b33
Simplify review UI ( #31062 )
...
Instead of always displaying all available actions as buttons, merge
them into a single dropdown menu, same as GitHub. That decreases visual
overload and is more mobile-friendly, while not losing any
functionality.
## Screenshots
<details><summary>Before</summary>
![grafik](https://github.com/go-gitea/gitea/assets/51889757/b957fab0-4cc7-4cf5-a6c8-33f571be7b19 )
</details>
<details><summary>After (unexpanded)</summary>
![grafik](https://github.com/go-gitea/gitea/assets/51889757/c8fd3428-4092-4295-bd55-c243409ba90d )
</details>
<details><summary>After (expanded)</summary>
![grafik](https://github.com/go-gitea/gitea/assets/51889757/c0eada91-54be-42ce-9db1-0db56d971438 )
</details>
2024-05-27 08:24:34 +00:00
silverwind
6e140b58dd
Prevent tab shifting, remove extra margin on fluid pages ( #31090 )
...
1. Extend concept of https://github.com/go-gitea/gitea/pull/29831 to all
tabular menus, there were only three left that weren't already
`<overflow-menu>`.
<img width="634" alt="Screenshot 2024-05-27 at 00 42 16"
src="https://github.com/go-gitea/gitea/assets/115237/d9a7e219-d05e-40a1-9e93-777f9a8a90dd ">
<img width="965" alt="Screenshot 2024-05-27 at 00 29 32"
src="https://github.com/go-gitea/gitea/assets/115237/e6ed71b1-11fb-4a74-9adb-af4524286cff ">
2. Remove extra padding on `fluid padded` container like for example PR
diff view. The page margin is already correctly sized via
`.ui.container`, so this was just extraneous padding that looked ugly.
Before:
<img width="1351" alt="Screenshot 2024-05-27 at 00 45 11"
src="https://github.com/go-gitea/gitea/assets/115237/4b45fd11-b1b2-4fbb-a618-26eb22be9472 ">
After:
<img width="1344" alt="Screenshot 2024-05-27 at 00 45 22"
src="https://github.com/go-gitea/gitea/assets/115237/d09593eb-6c7f-45e7-85b6-f0050047004b ">
3. Replace `gt-word-break` with `tw-break-anywhere` in issue-title,
fixing overflow.
Before:
<img width="1333" alt="Screenshot 2024-05-27 at 00 50 14"
src="https://github.com/go-gitea/gitea/assets/115237/64d15d04-b456-401e-a972-df636965f0eb ">
After:
<img width="1316" alt="Screenshot 2024-05-27 at 00 50 26"
src="https://github.com/go-gitea/gitea/assets/115237/ed1ce830-1408-414b-8263-eeaf773f52c8 ">
2024-05-27 06:45:16 +00:00
André Rosenhammer
14f6105ce0
Make gitea webhooks openproject compatible ( #28435 )
...
This PR adds some fields to the gitea webhook payload that
[openproject](https://www.openproject.org/ ) expects to exists in order
to process the webhooks.
These fields do exists in Github's webhook payload so adding them makes
Gitea's native webhook more compatible towards Github's.
2024-05-26 04:08:13 +00:00
Zettat123
7ab0988af1
Support setting the `default` attribute of the issue template dropdown field ( #31045 )
...
Fix #31044
According to [GitHub issue template
documentation](https://docs.github.com/en/communities/using-templates-to-encourage-useful-issues-and-pull-requests/syntax-for-githubs-form-schema#attributes-for-dropdown ),
the `default` attribute can be used to specify the preselected option
for a dropdown field.
2024-05-23 13:01:02 +00:00
yp05327
daf2a4c047
Fix wrong display of recently pushed notification ( #25812 )
...
There's a bug in #25715 :
If user pushed a commit into another repo with same branch name, the
no-related repo will display the recently pushed notification
incorrectly.
It is simple to fix this, we should match the repo id in the sql query.
![image](https://github.com/go-gitea/gitea/assets/18380374/9411a926-16f1-419e-a1b5-e953af38bab1 )
The latest commit is 2 weeks ago.
![image](https://github.com/go-gitea/gitea/assets/18380374/52f9ab22-4999-43ac-a86f-6d36fb1e0411 )
The notification comes from another repo with same branch name:
![image](https://github.com/go-gitea/gitea/assets/18380374/a26bc335-8e5b-4b9c-a965-c3dc3fa6f252 )
After:
In forked repo:
![image](https://github.com/go-gitea/gitea/assets/18380374/ce6ffc35-deb7-4be7-8b09-184207392f32 )
New PR Link will redirect to the original repo:
![image](https://github.com/go-gitea/gitea/assets/18380374/7b98e76f-0c75-494c-9462-80cf9f98e786 )
In the original repo:
![image](https://github.com/go-gitea/gitea/assets/18380374/5f6a821b-e51a-4bbd-9980-d9eb94a3c847 )
New PR Link:
![image](https://github.com/go-gitea/gitea/assets/18380374/1ce8c879-9f11-4312-8c32-695d7d9af0df )
In the same repo:
![image](https://github.com/go-gitea/gitea/assets/18380374/64b56073-4d0e-40c4-b8a0-80be7a775f69 )
New PR Link:
![image](https://github.com/go-gitea/gitea/assets/18380374/96e1b6a3-fb98-40ee-b2ee-648039fb0dcf )
08/15 Update:
Follow #26257 , added permission check and logic fix mentioned in
https://github.com/go-gitea/gitea/pull/26257#discussion_r1294085203
2024/04/25 Update:
Fix #30611
---------
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-05-21 17:00:35 +00:00
Kemal Zebari
1007ce764e
Don't include link of deleted branch when listing branches ( #31028 )
...
From
https://github.com/go-gitea/gitea/issues/31018#issuecomment-2119622680 .
This commit removes the link to a deleted branch name because it returns
a 404 while it is in this deleted state. GitHub also throws a 404 when
navigating to a branch link that was just deleted, but this deleted
branch is removed from the branch list after a page refresh. Since with
Gitea this deleted branch would be kept around for quite some time
(well, until the "cleanup deleted branches" cron job begins), it makes
sense to not have this as a link that users can navigate to.
2024-05-21 02:23:07 +00:00
Zettat123
f1d9f18d96
Return `access_denied` error when an OAuth2 request is denied ( #30974 )
...
According to [RFC
6749](https://datatracker.ietf.org/doc/html/rfc6749#section-4.1.2.1 ),
when the resource owner or authorization server denied an request, an
`access_denied` error should be returned. But currently in this case
Gitea does not return any error.
For example, if the user clicks "Cancel" here, an `access_denied` error
should be returned.
<img width="360px"
src="https://github.com/go-gitea/gitea/assets/15528715/be31c09b-4c0a-4701-b7a4-f54b8fe3a6c5 "
/>
2024-05-20 07:17:00 +00:00
wxiaoguang
de9bcd1d23
Avoid 500 panic error when uploading invalid maven package file ( #31014 )
...
PackageDescriptor.Metadata might be nil (and maybe not only for maven).
This is only a quick fix.
The new `if` block is written intentionally to avoid unnecessary
indenting to the existing code.
2024-05-20 06:44:16 +00:00
wxiaoguang
f48cc501c4
Fix incorrect "blob excerpt" link when comparing files ( #31013 )
...
When comparing files between the base repo and forked repo, the "blob
excerpt" link should point to the forked repo, because the commit
doesn't exist in base repo.
Co-authored-by: Giteabot <teabot@gitea.io>
2024-05-20 05:57:57 +00:00
wxiaoguang
b6574099ed
Fix project column title overflow ( #31011 )
...
By the way:
* Re-format the "color.go" to Golang code style
* Remove unused `overflow-y: scroll;` from `.project-column` because
there is `overflow: visible`
2024-05-20 05:21:01 +00:00
wxiaoguang
edbf74c418
Fix "force private" logic ( #31012 )
...
When creating a repo, the "FORCE_PRIVATE" config option should be
respected, `readonly` doesn't work for checkbox, so it should use
`disabled` attribute.
2024-05-20 00:56:45 +00:00
wxiaoguang
821d2fc2a3
Simplify mirror repository API logic ( #30963 )
...
Fix #30921
2024-05-17 16:07:41 +00:00
wxiaoguang
740b6e1389
Fix JS error when editing a merged PR's title ( #30990 )
2024-05-16 13:04:25 +00:00
Frank Villaro-Dixon
2611249511
template: `label` fix correct input id ( #30987 )
...
Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu>
2024-05-16 14:36:31 +08:00
silverwind
ea8e4baacc
Put web editor into a segment ( #30966 )
...
Implement
https://github.com/go-gitea/gitea/pull/30707#issuecomment-2084126206
Diff without whitespace:
https://github.com/go-gitea/gitea/pull/30966/files?diff=unified&w=1
Might as well backport.
2024-05-15 14:54:34 +00:00
KN4CK3R
b1d8f13bd0
Protected tag is no internal server error ( #30962 )
...
Fixes #30959
Adds an API test for protected tags.
Fix existing tag in combination with fixtures.
2024-05-14 06:48:21 +00:00
silverwind
ed25676a9a
Restyle release list, fix branch dropdown ( #30837 )
...
Fixes https://github.com/go-gitea/gitea/issues/30821 and restyles the
release list.
Desktop:
<img width="1199" alt="Screenshot 2024-05-02 at 20 46 10"
src="https://github.com/go-gitea/gitea/assets/115237/bee92423-d4a9-4b26-8301-3a1e09eef4cd ">
Mobile:
<img width="443" alt="Screenshot 2024-05-02 at 20 46 21"
src="https://github.com/go-gitea/gitea/assets/115237/42ecbae5-bdb6-4b16-a0ee-9c64daede68d ">
---------
Co-authored-by: Giteabot <teabot@gitea.io>
2024-05-13 23:33:51 +02:00
Zettat123
b3beaed147
Support using label names when changing issue labels ( #30943 )
...
Resolve #30917
Make the APIs for adding labels and replacing labels support both label
IDs and label names so the
[`actions/labeler`](https://github.com/actions/labeler ) action can work
in Gitea.
<img width="600px"
src="https://github.com/go-gitea/gitea/assets/15528715/7835c771-f637-4c57-9ce5-e4fbf56fa0d3 "
/>
2024-05-13 04:28:53 +00:00
silverwind
301eaf60bf
Fix file path width in repo non-homepage view ( #30951 )
...
Fixes: https://github.com/go-gitea/gitea/issues/30940
<img width="1310" alt="Screenshot 2024-05-11 at 20 48 41"
src="https://github.com/go-gitea/gitea/assets/115237/f163dfd4-1299-421f-a99e-cd0c793e0e3d ">
2024-05-12 04:02:25 +00:00
wxiaoguang
080486e47d
Fix some UI regressions for commit list ( #30920 )
...
Close #30919
---------
Co-authored-by: silverwind <me@silverwind.io>
2024-05-10 12:58:05 +00:00
wxiaoguang
7424f27cf3
Check if reverse proxy is correctly configured ( #30890 )
...
Follow #27011
Follow #30885
---------
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: Giteabot <teabot@gitea.io>
2024-05-10 20:07:01 +08:00
wxiaoguang
3fdb2d4ad8
Fix incorrect issue form ( #30881 )
...
Fix #30864
2024-05-08 15:39:13 +00:00
Lunny Xiao
a303c973e0
Fix various problems around projects board view ( #30696 )
...
# The problem
The previous implementation will start multiple POST requests from the
frontend when moving a column and another bug is moving the default
column will never be remembered in fact.
# What's changed
- [x] This PR will allow the default column to move to a non-first
position
- [x] And it also uses one request instead of multiple requests when
moving the columns
- [x] Use a star instead of a pin as the icon for setting the default
column action
- [x] Inserted new column will be append to the end
- [x] Fix #30701 the newly added issue will be append to the end of the
default column
- [x] Fix when deleting a column, all issues in it will be displayed
from UI but database records exist.
- [x] Add a limitation for columns in a project to 20. So the sorting
will not be overflow because it's int8.
---------
Co-authored-by: silverwind <me@silverwind.io>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-05-08 13:44:57 +00:00
wxiaoguang
eda10cc2bb
Fix some UI problems (dropdown/container) ( #30849 )
...
Follow #30345
Follow #30547
`ellipsis` / `white-space` shouldn't be put on the general dropdown components.
2024-05-06 07:17:22 +00:00
wxiaoguang
ce8b11ae13
Fix some UI problems (install/checkbox) ( #30854 )
...
Fix the space between the box and label for checkboxes, and fix incorrect usages in "repo-issue.js"
2024-05-06 06:32:05 +00:00
wxiaoguang
5c236bd4c0
Fix issue/PR title edit ( #30858 )
...
1. "enter" doesn't work (I think it is the last enter support for #14843 )
2. if a branch name contains something like `&`, then the branch selector doesn't update
2024-05-05 13:09:41 +00:00
silverwind
c445a85528
Improve repo button row layout ( #30668 )
...
Since there is now a second `<input>` in the repo buttons, we can make a
better-looking layout with no empty space, except on mobile.
Also I fixed one bug with focus border on clone panel.
## Large
<img width="1163" alt="Screenshot 2024-04-23 at 22 25 22"
src="https://github.com/go-gitea/gitea/assets/115237/8135a572-aa67-4672-ad49-b76b06890b52 ">
## Medium
<img width="870" alt="Screenshot 2024-04-23 at 22 25 34"
src="https://github.com/go-gitea/gitea/assets/115237/9e93f61c-3315-4a78-8328-8cefad5b50fa ">
## Mobile
<img width="416" alt="Screenshot 2024-04-23 at 22 25 52"
src="https://github.com/go-gitea/gitea/assets/115237/859e341f-807a-48e6-8bcf-31715963216c ">
2024-05-02 19:10:49 +00:00
Kemal Zebari
872caa17c0
Catch and handle unallowed file type errors in issue attachment API ( #30791 )
...
Before, we would just throw 500 if a user passes an attachment that is
not an allowed type. This commit catches this error and throws a 422
instead since this should be considered a validation error.
2024-05-02 16:33:31 +00:00
wxiaoguang
6ff2acc52c
Fix issue card layout ( #30800 )
...
Fix #30788
2024-05-02 11:19:44 +00:00
wxiaoguang
ebe6f4cad7
Fix branch selector UI ( #30803 )
...
Fix #30802
2024-05-02 10:45:23 +00:00
Chester
6709e28da7
Add API endpoints for getting action jobs status ( #26673 )
...
Sample of response, it is similar to Github actions
ref
https://docs.github.com/en/rest/actions/workflow-runs?apiVersion=2022-11-28#list-workflow-runs-for-a-repository
``` json
{
"workflow_runs": [
{
"id": 3,
"name": "Explore-Gitea-Actions",
"head_branch": "main",
"head_sha": "6d8d29a9f7a01ded8f8aeb64341cb31ee1ab5f19",
"run_number": 3,
"event": "push",
"display_title": "More job",
"status": "success",
"workflow_id": "demo2.yaml",
"url": "/chester/test/actions/runs/3",
"created_at": "2023-08-22T13:41:33-04:00",
"updated_at": "2023-08-22T13:41:37-04:00",
"run_started_at": "2023-08-22T13:41:33-04:00"
},
{
"id": 2,
"name": "Explore-Gitea-Actions",
"head_branch": "main",
"head_sha": "6d8d29a9f7a01ded8f8aeb64341cb31ee1ab5f19",
"run_number": 2,
"event": "push",
"display_title": "More job",
"status": "success",
"workflow_id": "demo.yaml",
"url": "/chester/test/actions/runs/2",
"created_at": "2023-08-22T13:41:30-04:00",
"updated_at": "2023-08-22T13:41:33-04:00",
"run_started_at": "2023-08-22T13:41:30-04:00"
},
{
"id": 1,
"name": "Explore-Gitea-Actions",
"head_branch": "main",
"head_sha": "e5369ab054cae79899ba36e45ee82811a6e0acd5",
"run_number": 1,
"event": "push",
"display_title": "Add job",
"status": "failure",
"workflow_id": "demo.yaml",
"url": "/chester/test/actions/runs/1",
"created_at": "2023-08-22T13:15:21-04:00",
"updated_at": "2023-08-22T13:18:10-04:00",
"run_started_at": "2023-08-22T13:15:21-04:00"
}
],
"total_count": 3
}
```
---------
Co-authored-by: yp05327 <576951401@qq.com>
Co-authored-by: puni9869 <80308335+puni9869@users.noreply.github.com>
2024-05-01 09:40:23 +08:00
silverwind
564102ce89
Rework and fix stopwatch ( #30732 )
...
Fixes https://github.com/go-gitea/gitea/issues/30721 and overhauls the
stopwatch. Time is now shown inside the "dot" icon and on both mobile
and desktop. All rendering is now done by `<relative-time>`, the
`pretty-ms` dependency is dropped.
Desktop:
<img width="557" alt="Screenshot 2024-04-29 at 22 33 27"
src="https://github.com/go-gitea/gitea/assets/115237/3a46cdbf-6af2-4bf9-b07f-021348badaac ">
Mobile:
<img width="640" alt="Screenshot 2024-04-29 at 22 34 19"
src="https://github.com/go-gitea/gitea/assets/115237/8a2beea7-bd5d-473f-8fff-66f63fd50877 ">
Note for tippy:
Previously, tippy instances defaulted to "menu" theme, but that theme is
really only meant for `.ui.menu`, so it was not optimal for the
stopwatch popover.
This introduces a unopinionated `default` theme that has no padding and
should be suitable for all content. I reviewed all existing uses and
explicitely set the desired `theme` on all of them.
2024-04-30 14:52:46 +00:00
wxiaoguang
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:
![image](https://github.com/go-gitea/gitea/assets/2114189/92836527-2cb2-4531-9296-233c5bd698f4 )
![image](https://github.com/go-gitea/gitea/assets/2114189/3a0729fc-5e33-44b5-9fb4-3a4e787405b5 )
![image](https://github.com/go-gitea/gitea/assets/2114189/9845ab6b-88e3-4e5a-8d6d-2b8af259d593 )
2024-04-30 04:26:13 +00:00
silverwind
a3d9f0d915
Fix all rounded borders, change affected tab menus to pills ( #30707 )
...
Fixes https://github.com/go-gitea/gitea/issues/30673 , all 23 issues.
Notes:
- Tab bar menus had to change to pills because of unsolvable issue with
the border-radius as tab bar renders a overlapping border onto the box
below. And I think pills look better.
- Added padding to code editor empty preview message
- Hide monaco's built-in blue focus border, we don't need it and it
never showed before either.
- Label add menu is simplified, removing the nested segment.
<img width="1322" alt="Screenshot 2024-04-25 at 22 26 19"
src="https://github.com/go-gitea/gitea/assets/115237/7e394e0c-b7ad-417d-8e9f-12f1dea93ed1 ">
<img width="1326" alt="Screenshot 2024-04-25 at 22 28 00"
src="https://github.com/go-gitea/gitea/assets/115237/66c8499f-aa9f-4d95-8cca-ef13dfa82c65 ">
<img width="997" alt="Screenshot 2024-04-25 at 22 36 53"
src="https://github.com/go-gitea/gitea/assets/115237/07896102-c71d-4246-8173-c2bc2e1d3cae ">
<img width="832" alt="Screenshot 2024-04-25 at 22 56 09"
src="https://github.com/go-gitea/gitea/assets/115237/d83afc96-08ca-4adc-baf4-3d02804be57c ">
<img width="361" alt="Screenshot 2024-04-25 at 22 57 12"
src="https://github.com/go-gitea/gitea/assets/115237/c7371a68-00b5-47d8-84d0-ddc5268b2b2c ">
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2024-04-29 20:53:15 +00:00
wxiaoguang
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
Micash
ad4e902d5a
Add support for npm bundleDependencies ( #30751 )
2024-04-29 16:19:06 +08:00
wxiaoguang
8de2992ffb
Make Ctrl+Enter work for issue/comment edit ( #30720 )
...
Fix #30710
2024-04-27 14:32:00 +00:00
silverwind
b93c87b6fe
Issue card improvements ( #30687 )
...
Fixes https://github.com/go-gitea/gitea/issues/30682 and does a few
improvements:
- Use gap instead of margin/padding
- Don't render empty image div
- Remove `right floated` class that did nothing
<img width="406" alt="Screenshot 2024-04-24 at 20 21 20"
src="https://github.com/go-gitea/gitea/assets/115237/2fa88707-c2c4-40df-aee7-a684c3097ed0 ">
---------
Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
2024-04-27 13:35:26 +00:00
Yarden Shoham
51c28d9683
Don't show loading indicators when refreshing the system status ( #30712 )
...
Signed-off-by: Yarden Shoham <git@yardenshoham.com>
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2024-04-27 13:05:06 +00:00
Kemal Zebari
dd301cae1c
Prevent allow/reject reviews on merged/closed PRs ( #30686 )
...
Resolves #30675 .
2024-04-27 11:55:03 +00:00
silverwind
b2abac5e5f
Improve diff stats bar ( #30669 )
...
Minor tweaks:
- Remove unnecessary `item` class which was causing unwanted padding to
be added.
- Add some padding and prevent wrapping so it looks better on mobile.
- Increase width by 4px.
<img width="116" alt="Screenshot 2024-04-24 at 00 15 07"
src="https://github.com/go-gitea/gitea/assets/115237/1f1cf54c-8053-4297-b309-71d9c2ceb9ee ">
<img width="441" alt="Screenshot 2024-04-24 at 00 14 57"
src="https://github.com/go-gitea/gitea/assets/115237/2f3a33dc-edad-4b97-b64c-6812aae513cb ">
2024-04-27 11:22:55 +00:00
silverwind
9b2536b78f
Update misspell to 0.5.1 and add `misspellings.csv` ( #30573 )
...
Misspell 0.5.0 supports passing a csv file to extend the list of
misspellings, so I added some common ones from the codebase. There is at
least one typo in a API response so we need to decided whether to revert
that and then likely remove the dict entry.
2024-04-27 08:03:49 +00:00
silverwind
c93eefb42b
Diff color enhancements, add line number background ( #30670 )
...
1. Bring back the background on line numbers. This feature was lost a
long time ago.
<img width="457" alt="Screenshot 2024-04-24 at 01 36 09"
src="https://github.com/go-gitea/gitea/assets/115237/76a7f5a9-c22a-4c72-9f0a-ebf16a66513e ">
<img width="473" alt="Screenshot 2024-04-24 at 01 22 47"
src="https://github.com/go-gitea/gitea/assets/115237/eef06cf2-f1b9-40e3-947d-dd5852ec12a3 ">
<img width="457" alt="Screenshot 2024-04-24 at 02 13 18"
src="https://github.com/go-gitea/gitea/assets/115237/59e317d4-76a7-468c-8a19-10d88c675cc3 ">
<img width="459" alt="Screenshot 2024-04-24 at 01 23 21"
src="https://github.com/go-gitea/gitea/assets/115237/f1a46f8d-8846-4d78-a9d7-8b7dc18ac6e4 ">
2. Expanded lines background is now full-line, including line numbers:
<img width="1303" alt="Screenshot 2024-04-24 at 01 37 12"
src="https://github.com/go-gitea/gitea/assets/115237/271eefe2-0869-424e-93fb-ccd8adc87806 ">
3. Sort affected colors alphabetically in the CSS
Fixes #14603
2024-04-26 19:37:21 +00:00
Bo-Yi Wu
852547d0dc
feat(api): enhance Actions Secrets Management API for repository ( #30656 )
...
- Add endpoint to list repository action secrets in API routes
- Implement `ListActionsSecrets` function to retrieve action secrets
from the database
- Update Swagger documentation to include the new
`/repos/{owner}/{repo}/actions/secrets` endpoint
- Add `actions` package import and define new routes for actions,
secrets, variables, and runners in `api.go`.
- Refactor action-related API functions into `Action` struct methods in
`org/action.go` and `repo/action.go`.
- Remove `actionAPI` struct and related functions, replacing them with
`NewAction()` calls.
- Rename `variables.go` to `action.go` in `org` directory.
- Delete `runners.go` and `secrets.go` in both `org` and `repo`
directories, consolidating their content into `action.go`.
- Update copyright year and add new imports in `org/action.go`.
- Implement `API` interface in `services/actions/interface.go` for
action-related methods.
- Remove individual action-related functions and replace them with
methods on the `Action` struct in `repo/action.go`.
---------
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Signed-off-by: appleboy <appleboy.tw@gmail.com>
2024-04-26 21:11:49 +08:00
wxiaoguang
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
yp05327
2a3906d755
Improve job commit description ( #30579 )
...
Fix https://github.com/go-gitea/gitea/issues/30567
When job is a schedule:
![image](https://github.com/go-gitea/gitea/assets/18380374/b07e9d43-e8b7-4ee2-87b3-a7050c3a8ca5 )
When it is a normal one:
![image](https://github.com/go-gitea/gitea/assets/18380374/0d58dab9-74bb-421b-8952-0578cdf21a52 )
also add a 'space' behind `:`
![image](https://github.com/go-gitea/gitea/assets/18380374/4cebece0-bfe6-4ad9-b806-e5c49bb9be43 )
![image](https://github.com/go-gitea/gitea/assets/18380374/02da7681-474b-4c0f-9dad-b6558f6cb484 )
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-04-26 02:22:45 +00:00
wxiaoguang
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
Jiaxin Zhu
a63f14b908
Fix view of readme file in the home code page. ( #30564 )
...
Gitea attempts to display image file, pdf file, etc. named readme in the
home code page (but it cannot).
I think only the markdown and plain-text file should be displayed, which
is also the behavior of GitHub.
Co-authored-by: jxshin <zhujiaxinabc@gmail.com>
2024-04-25 00:07:38 +00:00
silverwind
1a2ae64b16
Fix checkbox field markup ( #30666 )
...
Fixes https://github.com/go-gitea/gitea/issues/30664 .
Previous use was not a supported way by fomantic and the misuse only
became visible after the checkbox migration.
2024-04-23 21:53:57 +00:00
wxiaoguang
2ee93ea178
Avoid doubled border for the PR info segment ( #30663 )
2024-04-23 19:24:10 +00:00
wxiaoguang
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
dd2aaadce3
Fix flash message for flex-container ( #30657 )
2024-04-23 08:31:51 +00:00
silverwind
370b1bdb37
Fix project name wrapping, remove horizontal margin on header ( #30631 )
...
Enable wrapping of unbroken lines:
<img width="1308" alt="Screenshot 2024-04-22 at 00 31 33"
src="https://github.com/go-gitea/gitea/assets/115237/1a28ade1-d708-4260-96a3-cf508b6dcb79 ">
Remove extra margin added by nested `.ui.container` on certain
viewports:
Before:
<img width="1305" alt="Screenshot 2024-04-22 at 00 40 23"
src="https://github.com/go-gitea/gitea/assets/115237/d3d8c0d1-380c-4867-b95c-4d53d70d4a93 ">
After:
<img width="1310" alt="Screenshot 2024-04-22 at 00 40 33"
src="https://github.com/go-gitea/gitea/assets/115237/2ba7b9f2-db2f-4bcc-8cce-5c415625ddea ">
2024-04-23 04:17:51 +00:00
Lunny Xiao
8924d9b2ef
Fix compare api swagger ( #30648 )
...
The swagger format on #30349 is not right. This PR will fix it.
2024-04-23 02:22:43 +00:00
silverwind
aff7b7bdd2
Remove obsolete CSS text classes ( #30576 )
...
- `.text-thin` and `.text-italic` are not present in CSS so were doing nothing and I removed them.
- `.text.middle` was unused so I removed it.
- `.text.italic` is replaced with `tw-italic`.
- `.text.normal` had exactly one use and it wasn't even needed.
- add a `muted` class to the link to `org_profile_avatar.tmpl`.
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-04-22 11:21:06 +00:00
silverwind
0386a42f70
Hide diff stats on empty PRs ( #30629 )
...
When a PR is empty, e.g. has neither additions nor deletions, we don't
need to show this:
<img width="125" alt="Screenshot 2024-04-21 at 23 25 38"
src="https://github.com/go-gitea/gitea/assets/115237/0b987eb5-66f5-4b9b-b5aa-7e9e267e9b52 ">
2024-04-22 10:48:14 +00:00
wxiaoguang
f4a1cf7eab
Fix repo home UI when there is no repo description ( #30552 )
...
Fix #30502 by a new approach.
![image](https://github.com/go-gitea/gitea/assets/2114189/22f48bca-82d1-45cc-b1b7-ee2344b81a76 )
2024-04-21 23:47:31 +00:00
wxiaoguang
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.
![image](https://github.com/go-gitea/gitea/assets/2114189/f6ceaabd-bc89-4bf2-baa2-a6f0324c1962 )
2024-04-21 23:14:33 +00:00
silverwind
1b1b8500ae
Fix flash on dashboard ( #30572 )
...
Fixes https://github.com/go-gitea/gitea/issues/30566 , regression from
https://github.com/go-gitea/gitea/pull/30214 .
2024-04-21 20:24:56 +00:00
wxiaoguang
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
wxiaoguang
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
silverwind
dd8e6ae270
Improve "Reference in new issue" modal ( #30547 )
...
Fixes: https://github.com/go-gitea/gitea/issues/29994
Also some misc enhancements done to the form in the modal.
<img width="840" alt="Screenshot 2024-04-17 at 23 02 55"
src="https://github.com/go-gitea/gitea/assets/115237/e71fba55-55cd-4e48-a497-6b1025c36a43 ">
2024-04-18 19:31:53 +00:00
silverwind
d4ec6b3d16
Add form field id generation, remove duplicated ids ( #30546 )
...
Fixes: https://github.com/go-gitea/gitea/issues/30384
On repo settings page, there id `repo_name` was used 5 times on the same
page, some in modal and such. I think we are better off just
auto-generating these IDs in the future so that labels link up with
their form element.
Ideally this id generation would be done in backend in a subtemplate,
but seeing that we already have similar JS patches for checkboxes, I
took the easy path for now.
I also checked that these `#repo_name` were not in use in JS and the
only case where this id appears in JS is on the migration page where
it's still there.
---------
Co-authored-by: Giteabot <teabot@gitea.io>
2024-04-18 09:01:06 +00:00
silverwind
31538133c3
Fix border-radius on view, blame and code search ( #30545 )
...
Fixes: https://github.com/go-gitea/gitea/issues/30540
1. Fix all these boxes by adding `bottom attached` and removing a
problematic CSS rule:
<img width="1319" alt="Screenshot 2024-04-17 at 22 25 31"
src="https://github.com/go-gitea/gitea/assets/115237/346445a4-4944-4003-a1ef-6f5b0eda624e ">
<img width="643" alt="Screenshot 2024-04-17 at 22 21 18"
src="https://github.com/go-gitea/gitea/assets/115237/10f17ed3-9ad6-48de-92fa-bac6621815b9 ">
2. Change the "last commit" box to `ui segment` which has correct
border-radius. Also included is a tiny tweak to make author name ellipse
instead of wrap.
<img width="1331" alt="Screenshot 2024-04-17 at 22 23 23"
src="https://github.com/go-gitea/gitea/assets/115237/285fbd45-ced0-4d33-abe3-7384ffa03188 ">
Co-authored-by: Giteabot <teabot@gitea.io>
2024-04-18 08:34:23 +00:00
6543
be5be0ac81
Expose fuzzy search for issues/pulls ( #29701 )
...
close #29685
---------
Signed-off-by: 6543 <6543@obermui.de>
Co-authored-by: silverwind <me@silverwind.io>
2024-04-18 00:16:52 +00:00
wxiaoguang
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
wxiaoguang
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
silverwind
311f5261cd
Fix and tweak pull request commit list ( #30528 )
...
Fixes https://github.com/go-gitea/gitea/issues/30493 , regression from
https://github.com/go-gitea/gitea/pull/30374 .
Also did the flexbox convertion as suggested by the existing comment.
<img width="850" alt="Screenshot 2024-04-16 at 22 28 48"
src="https://github.com/go-gitea/gitea/assets/115237/e8905944-620a-4211-b5c5-53ed3b3ee23e ">
Co-authored-by: Giteabot <teabot@gitea.io>
2024-04-17 08:58:08 +00:00
wxiaoguang
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
silverwind
3746a625f5
Tweak repo buttons on mobile and labeled button border-radius ( #30503 )
...
Fixes: https://github.com/go-gitea/gitea/issues/30514
Fixes:
https://github.com/go-gitea/gitea/pull/30288#issuecomment-2057466623
- Fix border-radius regression from
https://github.com/go-gitea/gitea/pull/30475
- Fix and simplify hover state
- Move the modal HTML so it does not interfere with the CSS
- Make the star and unwatch text show on mobile. There is still plenty
of space, below is iPhone 12 viewport size
<img width="696" alt="Screenshot 2024-04-15 at 20 34 03"
src="https://github.com/go-gitea/gitea/assets/115237/af90bb00-4671-4973-a255-8eb44ee6ba8d ">
<img width="230" alt="Screenshot 2024-04-15 at 20 31 42"
src="https://github.com/go-gitea/gitea/assets/115237/986ef533-7a01-4bb0-8dcd-fd19e4259e84 ">
<img width="233" alt="Screenshot 2024-04-15 at 20 31 47"
src="https://github.com/go-gitea/gitea/assets/115237/5b825dd8-0ccc-4d56-9d8f-774abb935b68 ">
---------
Co-authored-by: Giteabot <teabot@gitea.io>
2024-04-16 17:46:12 +02:00
silverwind
a658e2f277
Fix long branch name overflows ( #30345 )
...
Fixes: https://github.com/go-gitea/gitea/issues/27971
Fixes: https://github.com/go-gitea/gitea/pull/28010
<img width="689" alt="Screenshot 2024-04-09 at 00 19 57"
src="https://github.com/go-gitea/gitea/assets/115237/7c895a47-274f-40a6-a126-290658f1982d ">
Also fixes a similar issue in issue list where CSS was there but not
active because of missing `display: block`.
<img width="372" alt="Screenshot 2024-04-09 at 00 18 25"
src="https://github.com/go-gitea/gitea/assets/115237/cfbee7cd-2e15-4ac7-96ce-020816f48798 ">
2024-04-16 08:52:45 +00:00
Tobias Balle-Petersen
58b204b813
Update API to return 'source_id' for users ( #29718 )
...
Using the API, a user's _source_id_ can be set in the _CreateUserOption_
model, but the field is not returned in the _User_ model.
This PR updates the _User_ model to include the field _source_id_ (The
ID of the Authentication Source).
2024-04-16 06:08:48 +00:00
Bo-Yi Wu
c70e442ce4
feat(api): implement branch/commit comparison API ( #30349 )
...
- Add new `Compare` struct to represent comparison between two commits
- Introduce new API endpoint `/compare/*` to get commit comparison
information
- Create new file `repo_compare.go` with the `Compare` struct definition
- Add new file `compare.go` in `routers/api/v1/repo` to handle
comparison logic
- Add new file `compare.go` in `routers/common` to define `CompareInfo`
struct
- Refactor `ParseCompareInfo` function to use `common.CompareInfo`
struct
- Update Swagger documentation to include the new API endpoint for
commit comparison
- Remove duplicate `CompareInfo` struct from
`routers/web/repo/compare.go`
- Adjust base path in Swagger template to be relative (`/api/v1`)
GitHub API
https://docs.github.com/en/rest/commits/commits?apiVersion=2022-11-28#compare-two-commits
---------
Signed-off-by: Bo-Yi Wu <appleboy.tw@gmail.com>
Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
2024-04-16 11:45:04 +08:00
silverwind
b9f69b4a4d
Fix various overflows on actions view ( #30344 )
...
Fix a number of text overflow issues in actions view and run list. Also
improve mobile view of run list.
Fixes: https://github.com/go-gitea/gitea/issues/30328
<img width="782" alt="Screenshot 2024-04-08 at 23 10 16"
src="https://github.com/go-gitea/gitea/assets/115237/3d9f9f88-3eab-44a0-8144-30c2b58b24cb ">
<img width="935" alt="Screenshot 2024-04-08 at 23 17 46"
src="https://github.com/go-gitea/gitea/assets/115237/581d73ea-a31d-416b-be3a-47313b879b12 ">
<img width="1008" alt="Screenshot 2024-04-08 at 23 49 05"
src="https://github.com/go-gitea/gitea/assets/115237/c5d10565-f285-477f-8659-1caf94797647 ">
<img width="397" alt="Screenshot 2024-04-08 at 23 55 30"
src="https://github.com/go-gitea/gitea/assets/115237/368aaa75-1903-4058-9d75-d1fe91c564d6 ">
2024-04-15 19:46:52 +00:00
yp05327
2c80421243
Convert max file name length to 255 ( #30489 )
...
Quick/Partly fix #29907
In Linux and MacOS, by default the max file name length is 255.
In windows, it depends on the version and settings, and has no file name
length limitation, but has path length limitation.
By default it is 260, considering path length is longer than filename,
so I think it is ok to do this.
For Windows, see
https://learn.microsoft.com/windows/win32/fileio/maximum-file-path-limitation?tabs=registry
For Linux, see
https://github.com/torvalds/linux/blob/master/include/uapi/linux/limits.h#L12-L13
For MacOS, see
https://discussions.apple.com/thread/254788848?sortBy=best
2024-04-15 19:08:31 +00:00
silverwind
ef3941f2eb
Revert 100% label max-width ( #30481 )
...
Partial revert of https://github.com/go-gitea/gitea/pull/30479
It's causing problems at least here:
https://github.com/go-gitea/gitea/pull/30344#discussion_r1564895591
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-04-15 01:04:02 +00:00
wxiaoguang
b84baf21fa
Improve flex ellipsis ( #30479 )
...
![image](https://github.com/go-gitea/gitea/assets/2114189/857794d8-2170-42be-a5bf-47ebacbafebd )
---------
Co-authored-by: silverwind <me@silverwind.io>
2024-04-14 21:43:30 +02:00
silverwind
9946353282
Remove fomantic button module ( #30475 )
...
CSS-only module. Button colors are reduced to this:
<img width="639" alt="Screenshot 2024-04-14 at 15 36 07"
src="https://github.com/go-gitea/gitea/assets/115237/882d6c02-d1de-44f2-b707-db02a9f5070d ">
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-04-14 17:53:52 +00:00
silverwind
044cc169e7
Use `flex-container` for dashboard layout ( #30214 )
...
Added new class `flex-container-sidebar` to cover the dashboard sidebar.
Previously this was 37.5% with more padding. Now there is less empty
space between the two columns and this matches other pages like repo or
admin settings page.
Desktop:
<img width="1345" alt="Screenshot 2024-03-31 at 15 11 36"
src="https://github.com/go-gitea/gitea/assets/115237/717389d9-d42c-466e-a8fe-e968f79447fd ">
Mobile:
<img width="444" alt="Screenshot 2024-03-31 at 15 11 44"
src="https://github.com/go-gitea/gitea/assets/115237/7faa840b-513a-411b-bf2d-26d52b9b71a0 ">
---------
Co-authored-by: Giteabot <teabot@gitea.io>
2024-04-14 13:39:11 +02:00
silverwind
4b1063f3db
Rewrite and restyle reaction selector and enable no-sizzle eslint rule ( #30453 )
...
Enable `no-sizzle` lint rule, there was only one use in `initCompReactionSelector` and:
- Remove all jQuery except the necessary fomantic dropdown init
- Remove the recursion, instead bind event listeners to common parent container nodes
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: Giteabot <teabot@gitea.io>
2024-04-14 18:44:11 +08:00
silverwind
6999a88fd9
Pulse page improvements ( #30149 )
...
1. add border-radius and spacing to bars
2. use tailwind background classes
3. Add more space around activity list headers
<img width="983" alt="Screenshot 2024-03-27 at 23 40 54"
src="https://github.com/go-gitea/gitea/assets/115237/70f72c30-e69f-4ecb-882f-32b8bc94d638 ">
<img width="1020" alt="Screenshot 2024-03-27 at 23 41 02"
src="https://github.com/go-gitea/gitea/assets/115237/a35dbbda-515c-40b0-938a-d759f9686b8e ">
2024-04-14 09:21:16 +00:00
Jason Song
fd59cd9450
Avoid losing token when updating mirror settings ( #30429 )
...
Fix #30416 .
Before (it shows as "Unset" while there's a token):
<img width="980" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/d7148e3e-62c9-4d2e-942d-3d795b79515a ">
After:
<img width="977" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/24aaa1db-5baa-4204-9081-470b15ea72b5 ">
The username shows as "oauth2" because of
f9fdac9809/services/migrations/dump.go (L99)
I have checked that all usage of `MirrorRemoteAddress` has been updated.
<img width="1806" alt="image"
src="https://github.com/go-gitea/gitea/assets/9418365/2f042501-2824-4511-9203-c84a6731a02d ">
However, it needs to be checked again when backporting.
---------
Co-authored-by: Giteabot <teabot@gitea.io>
2024-04-13 17:41:57 +02:00
wxiaoguang
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
silverwind
8fd8978b49
Fix admin notice view-detail ( #30450 )
...
Fix https://github.com/go-gitea/gitea/issues/30434 , regression from
https://github.com/go-gitea/gitea/pull/30115 .
I also removed the date insertion into the modal which was also broken
since that date was switched to `absolute-date` because I see no real
purpose to putting that date into the modal.
Result:
<img width="1038" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/aa2eb8b4-73dc-4d98-9b80-3f276f89d9e5 ">
2024-04-13 15:46:02 +08:00
HEREYUA
e8a99c8f92
Fix the spacing issue in the Project view ( #30415 )
...
**fix**: [#30388 ](https://github.com/go-gitea/gitea/issues/30388 )
**before**
![image](https://github.com/go-gitea/gitea/assets/37935145/52ca7311-dca4-4430-9a37-3c45b08fe3dd )
**after**
![image](https://github.com/go-gitea/gitea/assets/37935145/6b75ce69-4423-4ea4-99a1-d7234287c5c0 )
2024-04-12 02:08:58 +00:00
silverwind
50dbed6527
Fix author name alignment in commits table ( #30396 )
...
Fixes https://github.com/go-gitea/gitea/issues/30129 by introducing a
wrapper div with flexbox that collapses any inter-tag whitespace within.
View diff with whitespace hidden.
Author names aligned:
<img width="172" alt="Screenshot 2024-04-10 at 19 41 27"
src="https://github.com/go-gitea/gitea/assets/115237/d761e8f2-0e67-4f84-8d37-9ed73850470a ">
Vertically centered on expand:
<img width="466" alt="Screenshot 2024-04-10 at 19 43 02"
src="https://github.com/go-gitea/gitea/assets/115237/decd68b3-19b5-4cfa-a505-b358e4a0715b ">
Ellipsis works:
<img width="344" alt="image"
src="https://github.com/go-gitea/gitea/assets/115237/6f8624a2-f8b6-4f3e-ac98-c44dd0cdfca5 ">
2024-04-11 03:16:44 +00:00
silverwind
50099d7af4
Various improvements for long file and commit names ( #30374 )
...
Fixes: https://github.com/go-gitea/gitea/issues/29438
This contains numerous enhancements for how large commit messages and
large filenames render. Another notable change is that the file path is
no longer cut off by backend at 30 chars, but rendered in full with
wrapping.
<img width="1329" alt="Screenshot 2024-04-09 at 21 53 57"
src="https://github.com/go-gitea/gitea/assets/115237/5ccbb3d6-643a-4f60-ba79-3572b36d5182 ">
<hr>
<img width="711" alt="Screenshot 2024-04-09 at 21 44 24"
src="https://github.com/go-gitea/gitea/assets/115237/6ffe8fbb-407c-4aa7-b591-3d80daea7d57 ">
<hr>
<img width="439" alt="Screenshot 2024-04-09 at 21 19 03"
src="https://github.com/go-gitea/gitea/assets/115237/1ec7f6e9-2fd8-4841-87eb-6ca02ab9cd61 ">
<hr>
<img width="444" alt="Screenshot 2024-04-09 at 21 18 52"
src="https://github.com/go-gitea/gitea/assets/115237/70931b9e-5841-477e-b3bc-98f8d2662964 ">
---------
Co-authored-by: Giteabot <teabot@gitea.io>
2024-04-10 06:13:22 +00:00
KN4CK3R
8498e67309
Some NuGet package enhancements ( #30280 )
...
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>
2024-04-07 16:46:59 +00:00
silverwind
36887ed392
Fix and rewrite contrast color calculation, fix project-related bugs ( #30237 )
...
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>
2024-04-07 16:19:25 +00:00
silverwind
019857a701
Add `--page-spacing` variable, fix admin dashboard notice ( #30302 )
...
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 ">
2024-04-07 15:45:36 +00:00
wxiaoguang
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
silverwind
649aada366
Remove fomantic list module ( #30281 )
...
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 ">
2024-04-06 21:33:45 +00:00
wxiaoguang
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
silverwind
9c1f4dae2e
Always use `octicon-eye` on watch button ( #30288 )
...
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 ">
2024-04-06 08:25:39 +00:00
wxiaoguang
b2b49c9bde
Fix view commit link ( #30297 )
...
Fix #30098
2024-04-06 02:03:07 +08:00
Yakov
609a627a44
Add `[other].SHOW_FOOTER_POWERED_BY` setting to hide `Powered by` ( #30253 )
...
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>
2024-04-03 16:01:50 +00:00
wxiaoguang
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
silverwind
944c76e784
Fix spacing in issue navbar ( #30238 )
...
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
2024-04-02 11:48:07 +00:00
wxiaoguang
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
silverwind
ff334749f5
Remove fomantic input module ( #30194 )
...
Another pure CSS module. Some styling is part of the `form` module which
will likely follow next.
2024-03-31 16:06:06 +00:00
Yarden Shoham
0497b2607d
Remove most jQuery function calls from the repository topic box ( #30191 )
...
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>
2024-03-31 15:39:50 +00:00
silverwind
8da9130c1f
Prevent flash of dropdown menu on labels list ( #30215 )
...
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>
2024-03-31 16:58:55 +02:00
wxiaoguang
6d34ce25b1
Do not allow different storage configurations to point to the same directory ( #30169 )
...
Replace #29171
2024-03-31 03:03:24 +00:00
silverwind
8fd15990c5
Remove fomantic checkbox module ( #30162 )
...
CSS is pretty slim already and the `.ui.toggle.checkbox` sliders on
admin page also still work. The only necessary JS is the one that links
`input` and `label` so that it can be toggled via label. All checkboxes
except the markdown ones render at `--checkbox-size: 16px` now.
<img width="174" alt="Screenshot 2024-03-28 at 22 15 10"
src="https://github.com/go-gitea/gitea/assets/115237/3455c1bb-166b-47e4-9847-2d20dd1f04db ">
<img width="499" alt="Screenshot 2024-03-28 at 21 00 07"
src="https://github.com/go-gitea/gitea/assets/115237/412be2b3-d5a0-478a-b17b-43e6bc12e8ce ">
<img width="83" alt="Screenshot 2024-03-28 at 22 14 34"
src="https://github.com/go-gitea/gitea/assets/115237/d8c89838-a420-4723-8c49-89405bb39474 ">
---------
Co-authored-by: delvh <dev.lh@web.de>
2024-03-29 04:56:01 +00:00
silverwind
dd8dde2be8
replace jquery-minicolors with coloris ( #30055 )
...
Get rid of one more jQuery dependant and have a nicer color picker as
well.
Now there is only a single global color picker init because that is all
that's necessary because the elements are present on the page when the
init code runs. The init is slightly weird because the module only takes
a selector instead of DOM elements directly.
The label modals now also perform form validation because previously it
was possible to trigger a 500 error `Color cannot be empty.` by clearing
out the color value on labels.
<img width="867" alt="Screenshot 2024-03-25 at 00 21 05"
src="https://github.com/go-gitea/gitea/assets/115237/71215c39-abb1-4881-b5c1-9954b4a89adb ">
<img width="860" alt="Screenshot 2024-03-25 at 00 20 48"
src="https://github.com/go-gitea/gitea/assets/115237/a12cb68f-c38b-4433-ba05-53bbb4b1023e ">
2024-03-29 04:00:07 +01:00
sillyguodong
62b073e6f3
Add API for `Variables` ( #29520 )
...
close #27801
---------
Co-authored-by: silverwind <me@silverwind.io>
2024-03-28 20:40:35 +00:00
yp05327
6103623596
Fix `DEFAULT_SHOW_FULL_NAME=false` has no effect in commit list and commit graph page ( #30096 )
...
Fix #20446
This PR will fix the username in:
repo home page
![image](https://github.com/go-gitea/gitea/assets/18380374/347c0f70-ea42-432d-aae3-bf87a7e07ae1 )
repo commit list page
![image](https://github.com/go-gitea/gitea/assets/18380374/b3b1f5d5-c371-4222-ac2e-64b8994c7551 )
repo commit graph page
![image](https://github.com/go-gitea/gitea/assets/18380374/01b7117c-3aea-4d7d-8bd1-35e5ea942821 )
pr commit page
![image](https://github.com/go-gitea/gitea/assets/18380374/4d180c30-2150-4348-8eeb-0b4b2559ec19 )
Will not fix:
wiki revisions page:
![image](https://github.com/go-gitea/gitea/assets/18380374/b49df6bf-d751-4374-b7ea-1ac85e2739e3 )
ps: the author name is `FullName` by default
2024-03-28 15:15:39 -04:00
Kemal Zebari
242b331260
Prevent re-review and dismiss review actions on closed and merged PRs ( #30065 )
...
Resolves #29965 .
---
Manually tested this by:
- Following the
[installation](https://docs.gitea.com/next/installation/install-with-docker#basics )
guide (but built a local Docker image instead)
- Creating 2 users, one who is the `Owner` of a newly-created repository
and the other a `Collaborator`
- Had the `Collaborator` create a PR that the `Owner` reviews
- `Collaborator` resolves conversation and `Owner` merges PR
And with this change we see that we can no longer see re-request review
button for the `Owner`:
<img width="1351" alt="Screenshot 2024-03-25 at 12 39 18 AM"
src="https://github.com/go-gitea/gitea/assets/60799661/bcd9c579-3cf7-474f-a51e-b436fe1a39a4 ">
2024-03-28 15:19:24 +00:00
silverwind
226a82a939
Migrate font-family to tailwind ( #30118 )
...
Enable us to use tailwind's
[`font-family`](https://tailwindcss.com/docs/font-family ) classes as
well as remove `gt-mono` in favor of `tw-font-mono`. I also merged the
"compensation" to one selector, previously this was two different values
0.9em and 0.95em. I did not declare a `serif` font because I don't think
there will ever be a use case for those. Command ran:
```sh
perl -p -i -e 's#gt-mono#tw-font-mono#g' web_src/js/**/* templates/**/*
2024-03-28 08:31:07 +00:00
silverwind
7fda109aba
Drag-and-drop improvements for projects and issue pins ( #29875 )
...
1. Add "grabbing" cursor while dragging items:
![](https://github.com/go-gitea/gitea/assets/115237/c60845ff-7544-4215-aeaa-408e8c4ef03a )
2. Make project board only drag via their header, not via their whole
body.
![](https://github.com/go-gitea/gitea/assets/115237/62c27f3d-993a-481d-9cc3-b6226b4c5d61 )
3. Fix some cursor problems in projects
4. Move shared options into `createSortable`.
2024-03-28 00:20:38 +01:00
Denys Konovalov
e5160185ed
Add default board to new projects, remove uncategorized pseudo-board ( #29874 )
...
On creation of an empty project (no template) a default board will be
created instead of falling back to the uneditable pseudo-board.
Every project now has to have exactly one default boards. As a
consequence, you cannot unset a board as default, instead you have to
set another board as default. Existing projects will be modified using a
cron job, additionally this check will run every midnight by default.
Deleting the default board is not allowed, you have to set another board
as default to do it.
Fixes #29873
Fixes #14679 along the way
Fixes #29853
Co-authored-by: delvh <dev.lh@web.de>
2024-03-27 20:54:32 +00:00
HEREYUA
0262c66ba6
Fix: Organization Interface Display Issue ( #30133 )
...
**Before**
![image](https://github.com/go-gitea/gitea/assets/37935145/88d04a4b-6dc5-4399-9813-2c339eae3722 )
**After**
![image](https://github.com/go-gitea/gitea/assets/37935145/e97a64b8-ea24-4de7-992d-5928888872d0 )
2024-03-27 12:48:09 +00:00
HEREYUA
1261dd6742
When the title in the issue has a value, set the text cursor at the end of the text. ( #30090 )
...
Fix: [#25055 ](https://github.com/go-gitea/gitea/issues/25055 )
Before
![image](https://github.com/go-gitea/gitea/assets/37935145/1b89cd7b-4fa3-49aa-9b5e-a8413add436e )
After
![image](https://github.com/go-gitea/gitea/assets/37935145/fa808f8d-d3ce-4245-a4fe-dd0282ba3fdf )
ps: I've noticed that we are gradually replacing jQuery, so I didn't use jQuery here.
2024-03-27 15:20:10 +08:00
Lunny Xiao
538790ad1d
Put an edit file button on pull request files to allow a quick operation ( #29697 )
...
Resolve #23848
This PR put an edit file button on pull request files to allow a quick
edit for a file. After the edit finished, it will return back to the
viewed file position on pull request files tab.
It also use a branch view file link instead of commit link when it's a
non-commit pull request files view.
<img width="1532" alt="image"
src="https://github.com/go-gitea/gitea/assets/81045/3637ca4c-89d5-4621-847b-79702a44f617 ">
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
Co-authored-by: silverwind <me@silverwind.io>
2024-03-27 02:34:10 +00:00
silverwind
2ab5f05f40
Add svg linter and fix incorrect svgs ( #30086 )
...
Fixes https://github.com/go-gitea/gitea/issues/30082 .
Adds a new linter that searches for non-existant SVG images in
templates. Output before the fix was:
```
$ make lint-templates
SVG "octicon-warning" not found, used in templates/devtest/flex-list.tmpl
SVG "octicon-warning" not found, used in templates/devtest/flex-list.tmpl
SVG "octicon-markup" not found, used in templates/repo/diff/comment_form.tmpl
make: *** [Makefile:438: lint-templates] Error 1
```
<img width="306" alt="Screenshot 2024-03-25 at 23 31 05"
src="https://github.com/go-gitea/gitea/assets/115237/1052d1a9-bfec-4d5a-9cae-f895f78f7c93 ">
2024-03-26 11:19:15 +00:00
yp05327
13921569dd
Add muted class to author name in repo commit list ( #29989 )
...
Before:
![image](https://github.com/go-gitea/gitea/assets/18380374/f6b3728c-ed9a-4e47-8755-89373235dff2 )
After:
![image](https://github.com/go-gitea/gitea/assets/18380374/272c85e3-620d-4758-ae4d-ad90b54e142c )
If repo is a mirror, external user's name will be white, but if user is
existed, then you will see blue names and white names together:
![image](https://github.com/go-gitea/gitea/assets/18380374/747622da-56e3-4162-b391-919787a8cee4 )
---------
Co-authored-by: silverwind <me@silverwind.io>
2024-03-25 20:18:58 +00:00
silverwind
8717c1c2be
Fix menu buttons in issues and release ( #30056 )
...
Fix regression from https://github.com/go-gitea/gitea/pull/30033
These buttons had lost their border because `.ui.header` sets `none` but
`.ui.menu` has it, after the migration, the order of styles changed and
header won. I see no reason why those have the `header` class in first
place, besides for semantic meaning.
Before:
<img width="491" alt="Screenshot 2024-03-25 at 00 39 27"
src="https://github.com/go-gitea/gitea/assets/115237/fa1b7505-75cf-4854-a97f-db3c46f31e93 ">
After:
<img width="496" alt="Screenshot 2024-03-25 at 00 39 14"
src="https://github.com/go-gitea/gitea/assets/115237/8f6bdc07-9596-436b-8c82-9af283300004 ">
2024-03-25 13:52:54 +00:00
silverwind
ec3d467f15
Migrate `gt-hidden` to `tw-hidden` ( #30046 )
...
We have to define this one in helpers.css because tailwind only
generates a single class but certain things rely on this being
double-class. Command ran:
```sh
perl -p -i -e 's#gt-hidden#tw-hidden#g' web_src/js/**/* templates/**/* models/**/* web_src/css/**/*
---------
Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
2024-03-24 18:23:38 +00:00
silverwind
68ec9b4859
Migrate margin and padding helpers to tailwind ( #30043 )
...
This will conclude the refactor of 1:1 class replacements to tailwind,
except `gt-hidden`. Commands ran:
```bash
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-0#tw-$1$2-0#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-1#tw-$1$2-0.5#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-2#tw-$1$2-1#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-3#tw-$1$2-2#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-4#tw-$1$2-4#g' {web_src/js,templates,routers,services}/**/*
perl -p -i -e 's#gt-(p|m)([lrtbxy])?-5#tw-$1$2-8#g' {web_src/js,templates,routers,services}/**/*
```
2024-03-24 17:42:49 +01:00
wxiaoguang
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
![image](https://github.com/go-gitea/gitea/assets/2114189/11b7e458-88a4-480d-b4d7-72ee59406dd1 )
![image](https://github.com/go-gitea/gitea/assets/2114189/0fe777d5-c95c-4288-a818-0427680805b6 )
---------
Co-authored-by: silverwind <me@silverwind.io>
2024-03-24 17:05:00 +01:00
silverwind
90a4f9a49e
Migrate `gap` helpers to tailwind ( #30034 )
...
Commands ran:
```sh
perl -p -i -e 's#gt-gap-0#tw-gap-0#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-1#tw-gap-0.5#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-2#tw-gap-1#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-3#tw-gap-2#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-4#tw-gap-4#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-5#tw-gap-8#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-x-0#tw-gap-x-0#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-x-1#tw-gap-x-0.5#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-x-2#tw-gap-x-1#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-x-3#tw-gap-x-2#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-x-4#tw-gap-x-4#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-x-5#tw-gap-x-8#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-y-0#tw-gap-y-0#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-y-1#tw-gap-y-0.5#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-y-2#tw-gap-y-1#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-y-3#tw-gap-y-2#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-y-4#tw-gap-y-4#g' web_src/js/**/* templates/**/*
perl -p -i -e 's#gt-gap-y-5#tw-gap-y-8#g' web_src/js/**/* templates/**/*
2024-03-24 14:31:35 +00:00
silverwind
f22fe4e194
Remove fomantic header module ( #30033 )
...
Likely still a few useless classes left, but I think I at least don't
have missed any.
---------
Co-authored-by: delvh <dev.lh@web.de>
Co-authored-by: Giteabot <teabot@gitea.io>
2024-03-24 14:32:19 +01:00
silverwind
db01bf6cc8
Various code view improvements ( #30014 )
...
1. Restore missing styles for message close icon
2. Move `code-line-button` so that it does not go off-screen on small
viewports
3. Make `code-line-button` look and behave like other buttons
4. Make `code-line-button` work in blame
5. Make the active selection span the whole line, not just the code part
6. Tweak colors, make dark theme code bg darker, make line numbers same
color in diff and file view.
7. Move code background to parent, fixing border radius and other
problems
8. Enable code wrap in blame
9. Improve blame responsiveness
10. Remove `--color-code-sidebar-bg` in blame, now it uses same
background as code
11. Rename `--color-active-line` to `--color-highlight-bg`
12. Add `--color-highlight-bg`
13. Fix button group borders on hover and border-right on last button.
<img width="1343" alt="Screenshot 2024-03-23 at 22 34 13"
src="https://github.com/go-gitea/gitea/assets/115237/fcbb919f-5dc3-43f0-97f6-870d6f412554 ">
<img width="1334" alt="Screenshot 2024-03-23 at 22 34 26"
src="https://github.com/go-gitea/gitea/assets/115237/ca44c3b7-4328-4645-ba49-b0dc6a5ac06d ">
<img width="1338" alt="Screenshot 2024-03-23 at 22 34 57"
src="https://github.com/go-gitea/gitea/assets/115237/00eb0b5a-1ec7-4669-a94a-4602b9d1c1ac ">
<img width="1337" alt="Screenshot 2024-03-23 at 22 34 42"
src="https://github.com/go-gitea/gitea/assets/115237/752edc4a-064f-413c-9dff-c086187fcd85 ">
Fixes: https://github.com/go-gitea/gitea/issues/18074
2024-03-24 12:14:03 +00:00
silverwind
75e2e5c736
Migrate font-size helpers to tailwind ( #30029 )
...
Migrate `gt-font-*` to `tw-text-*` All tailwind-original class names are
also available and render like they would with 16px root font size.
We currently have root font size at 14px, but I would like to eventually
migrate us to 16px so that the tailwind docs apply to us unchangend and
because 16px is the recommended root font size for web pages in general.
Also the number 16 is much better dividable than 14 so will result in
more integers.
2024-03-23 21:22:15 +00:00
silverwind
0bef9a2775
Replace all simple inline styles with tailwind ( #30032 )
...
These should be all simple inline styles that were left in the
templates.
Co-authored-by: Giteabot <teabot@gitea.io>
2024-03-23 20:11:15 +00:00