summaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Refactor repo header/list (#29969)wxiaoguang2024-03-219-65/+51
| | | | 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)
* Fix various loading states, remove `.loading` class (#29920)silverwind2024-03-219-34/+18
| | | | | | | | | | | | | | | | | | | | | | | Various code was using fomantic `loading` class which I think got broken a while ago and rendered only a full circle. Fix those to use `is-loading`. Before: <img width="295" alt="Screenshot 2024-03-19 at 22 56 26" src="https://github.com/go-gitea/gitea/assets/115237/dbe83395-5db4-4868-90bc-3613866a35f0"> After: <img width="60" alt="Screenshot 2024-03-19 at 22 54 35" src="https://github.com/go-gitea/gitea/assets/115237/8ac19b7e-035a-4c6d-850b-53a234ef69c2"> <img width="294" alt="Screenshot 2024-03-19 at 22 54 56" src="https://github.com/go-gitea/gitea/assets/115237/34e819d7-25f7-43a1-9d48-4a68dcd2b6ad"> <img width="320" alt="Screenshot 2024-03-19 at 22 55 16" src="https://github.com/go-gitea/gitea/assets/115237/05127544-47ff-4e18-9fd8-c84e44c374f8"> <img width="153" alt="Screenshot 2024-03-19 at 23 01 43" src="https://github.com/go-gitea/gitea/assets/115237/a33248c6-b11d-40ff-82d8-f5a3d85b55aa"> <img width="1300" alt="Screenshot 2024-03-19 at 23 56 25" src="https://github.com/go-gitea/gitea/assets/115237/562ca876-b5d5-4295-961e-9d2cdab31ab0"> <img width="136" alt="Screenshot 2024-03-20 at 00 00 38" src="https://github.com/go-gitea/gitea/assets/115237/44838ac4-67f3-4fec-a8e3-978cc5dbdb72">
* Update register application URL for GitLab (#29959)yp053272024-03-212-2/+2
| | | | | | Fix #26593 The old URL was updated 7 years ago. Maybe no need to hold it any more. ![image](https://github.com/go-gitea/gitea/assets/18380374/95a0b364-832b-4f10-800e-21845d64df1a)
* Refactor StringsToInt64s (#29967)wxiaoguang2024-03-2112-27/+30
| | | And close #27176
* Switch to happy-dom for testing (#29948)silverwind2024-03-214-1066/+323
| | | | | | | | | | | | | Use `happy-dom` again in vitest as it has caught up recently to `jsdom` in terms of features and it is a much more lightweight solution. I encountered [one bug](https://github.com/capricorn86/happy-dom/issues/1342), but it's an easy workaround until fixed. I regenerated the lockfile to get rid of the transitive dependencies so that's why the diff also has some upgrades in it. In total, this change removes 39 npm dependencies.
* Performance improvements for pull request list page (#29900)Lunny Xiao2024-03-2114-50/+86
| | | | | | | | | | | This PR will avoid load pullrequest.Issue twice in pull request list page. It will reduce x times database queries for those WIP pull requests. Partially fix #29585 --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Refactor URL detection (#29960)wxiaoguang2024-03-219-40/+93
| | | "Redirect" functions should only redirect if the target is for current Gitea site.
* Solving the issue of UI disruption when the review is deleted without ↵HEREYUA2024-03-211-1/+7
| | | | | | | | | | | | | | | | refreshing (#29951) **After deleting the review and refreshing, the display is normal. However, Without refreshing, the interface will be broken** https://github.com/go-gitea/gitea/assets/37935145/f5cb19a6-eb26-47b0-b8ee-15b575bbe1ac **after** https://github.com/go-gitea/gitea/assets/37935145/aa65922c-2ebf-4fce-ad91-35661f70329a
* Fix JS error and improve error message styles (#29963)silverwind2024-03-212-1/+3
| | | | | | | | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/29956. This error exposed a existing bug in the code, it was just never noticed because the jQuery expression evaluated without error before while the new one doesn't. Also improves error message styles: Before: <img width="1338" alt="Screenshot 2024-03-21 at 09 16 07" src="https://github.com/go-gitea/gitea/assets/115237/1cc1ef89-ad94-491e-bbca-75387f7547a0"> After: <img width="1335" alt="Screenshot 2024-03-21 at 09 15 44" src="https://github.com/go-gitea/gitea/assets/115237/312efc79-5353-4e2a-a703-1bccd3c01736">
* Fix the bug that user may logout if he switch pages too fast (#29962)Lunny Xiao2024-03-211-17/+9
| | | | | | | | | | | | This PR fixed a bug when the user switching pages too fast, he will logout automatically. The reason is that when the error is context cancelled, the previous code think user hasn't login then the session will be deleted. Now it will return the errors but not think it's not login. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Cancel previous runs of the same PR automatically (#29961)Jason Song2024-03-215-17/+18
| | | | | | | | | | | Follow #25716. Also cancel previous runs for `pull_request_sync`. It's not a bug since it original PR said "if the event is push". The main change is https://github.com/go-gitea/gitea/pull/29961/files#diff-08adda3f8ae0360937f46abb1f4418603bd3518522baa356be11c6c7ac4abcc3. And also rename `CancelRunningJobs` to `CancelPreviousJobs` to make it more clear.
* Exclude `routers/private/tests` from air (#29949)silverwind2024-03-211-1/+10
| | | | | | Exclude this and reformat the toml option to multiline. I wasn't able to get `exclude_regex` to work so it would include a `tests` directory anywhere. I think that option only works on files.
* Remove codecov badge (#29950)silverwind2024-03-212-2/+0
| | | It's been broken since the migration to actions, so lets remove it.
* Misc color tweaks (#29943)silverwind2024-03-202-15/+15
| | | | | | | | | | | | | Minor color tweaks: - Better text contrasts - Better distinguish nav and header wrapper in light theme - Input boxes are now white on light theme - Slightly darker dark theme background <img width="503" alt="Screenshot 2024-03-20 at 19 31 54" src="https://github.com/go-gitea/gitea/assets/115237/c7802a84-2386-4332-bd91-f419473ff644"> <img width="510" alt="Screenshot 2024-03-20 at 19 32 24" src="https://github.com/go-gitea/gitea/assets/115237/21d3529e-6e0a-413a-9e9e-a03bea2405eb">
* Fix and rewrite markup anchor processing (#29931)Lunny Xiao2024-03-211-33/+51
| | | | | | | Fix #29877 --------- Co-authored-by: silverwind <me@silverwind.io>
* Remove fomantic grid module (#29894)silverwind2024-03-205-2004/+502
| | | | Removed the grid module and moved the used parts it into our own CSS, eliminating around 75% unused CSS in turn.
* Add background to dashboard navbar, fix missing padding (#29940)silverwind2024-03-203-5/+7
| | | | | | | | | | | | | Two small CSS fixes: 1. Add background and reduced padding/avatar size to dashboard navbar. We use that background already in a number of "secondary navbars", so it fits. <img width="1344" alt="Screenshot 2024-03-20 at 18 18 21" src="https://github.com/go-gitea/gitea/assets/115237/ce5ebedc-e607-42c7-b7b4-b7a4c0ee68f2"> 2. Fix padding on top of user settings and subscriptions, regressed by https://github.com/go-gitea/gitea/pull/29922.
* Prevent layout shift in `<overflow-menu>` items (#29831)silverwind2024-03-203-11/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | There is a small layout shift in when active tab changes. Notice how the actions SVG is unstable: ![](https://github.com/go-gitea/gitea/assets/115237/a6928e89-5d47-4a91-8f36-1fa22fddbce7) This is because the active item with bold text is wider then the inactive one. I have applied [this trick](https://stackoverflow.com/a/32570813/808699) to prevent this layout shift. It's only active inside `<overflow-menu>` because I wanted to avoid changing HTML and doing it in regular JS would cause a flicker. I don't expect us to introduce other similar menus without `<overflow-menu>`, so that place is likely fine. ![after](https://github.com/go-gitea/gitea/assets/115237/d6089924-8de6-4ee0-8db4-15f16069a131) I also changed the weight from 500 to 600, slightly reduced horizontal padding, merged some tab-bar related CSS rules and a added a small margin below repo-header so it does not look so crammed against the buttons on top. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix loadOneBranch panic (#29938)wxiaoguang2024-03-202-5/+7
| | | | | | Try to fix #29936 Far from ideal, but still better than panic.
* Fix comment review avatar alignment (#29935)wxiaoguang2024-03-201-4/+3
| | | Fix #29934
* Remove the negative margin from `.page-content` (#29922)silverwind2024-03-205-13/+12
| | | | | | | | | | | | | | | | | | | | | | The negative margin was suboptimal and presents a few unnecessary challenges while styling the page. Remove it and add custom margin values, which slightly changes the height a few things near the top of the page as well: 15px less height of explore and login navbar: <img width="899" alt="Screenshot 2024-03-20 at 00 52 34" src="https://github.com/go-gitea/gitea/assets/115237/72a01ca4-5d17-4a0f-b915-61f95054fcb1"> 15px reduced padding-top height of "user bar" and equal 4px padding added: <img width="484" alt="Screenshot 2024-03-20 at 00 52 50" src="https://github.com/go-gitea/gitea/assets/115237/a8507e6d-372d-4a8b-9048-66fcf8a5facd"> 3px less padding on top of repo: <img width="552" alt="Screenshot 2024-03-20 at 00 53 49" src="https://github.com/go-gitea/gitea/assets/115237/dede6e44-7688-440f-a1b6-13532638ae03">
* Move notifications to a standalone file (#29930)Lunny Xiao2024-03-202-457/+472
| | | | There is no code change. Just move notification list related structs/functions from one file to another.
* Remove unnecessary ".Link" usages (#29929)wxiaoguang2024-03-206-15/+15
| | | Follow #29909
* Remove unnecessary ".Link" usages (#29909)wxiaoguang2024-03-2019-108/+108
| | | In HTML, `?key=val` already means "use the current link with new query parameters"
* Show Actions post step when it's running (#29926)Jason Song2024-03-202-2/+46
| | | | | | | | | | | | | | The post step was always waiting, even if all steps were done. Then, once the task was done, the post step became success immediately. Before: <img width="915" alt="xnip_240320_120228" src="https://github.com/go-gitea/gitea/assets/9418365/00347430-f998-4c43-917a-bf6dd6d0e333"> After: <img width="905" alt="xnip_240320_120443" src="https://github.com/go-gitea/gitea/assets/9418365/a419b111-17c2-4029-a022-c761cc419091">
* Fix the wrong default value of ENABLE_OPENID_SIGNIN on docs (#29925)Lunny Xiao2024-03-202-2/+2
| | | Fix #29923
* Restore deleted branches when syncing (#29898)Jason Song2024-03-203-5/+24
| | | | | | | | | | | Regression of #29493. If a branch has been deleted, repushing it won't restore it. Lunny may have noticed that, but I didn't delve into the comment then overlooked it: https://github.com/go-gitea/gitea/pull/29493#discussion_r1509046867 The additional comments added are to explain the issue I found during testing, which are unrelated to the fixes.
* Don't lock using GitHub actions (#29913)Yarden Shoham2024-03-201-23/+0
| | | | | | | | We have our bot for this. See: - https://github.com/GiteaBot/gitea-backporter?tab=readme-ov-file#locks - https://github.com/GiteaBot/gitea-backporter/blob/main/src/lock.ts Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: silverwind <me@silverwind.io>
* Remove jQuery `.attr` from the user search box (#29919)Yarden Shoham2024-03-201-3/+6
| | | | | | - Switched from jQuery `.attr` to plain javascript `.getAttribute` - Tested the user search box and it works as before Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Remove jQuery `.attr` from the archive download and compare page branch ↵Yarden Shoham2024-03-201-4/+4
| | | | | | | | | selector (#29918) - Switched from jQuery `.attr` to plain javascript `.getAttribute` - Tested the archive download and compare page branch selector functionality and it works as before Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Remove jQuery `.attr` from the image diff (#29917)Yarden Shoham2024-03-191-1/+1
| | | | | | - Switched from jQuery `.attr` to plain javascript `.setAttribute` - Tested the image diff functionality and it works as before Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Remove jQuery `.attr` from the quick pull request button text (#29916)Yarden Shoham2024-03-191-1/+1
| | | | | | | - Switched from jQuery `.attr` to plain javascript `.getAttribute` - Tested the quick pull request button text change functionality and it works as before Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Remove jQuery `.attr` from the issue author dropdown (#29915)Yarden Shoham2024-03-191-3/+3
| | | | | | - Switched from jQuery `.attr` to plain javascript `.getAttribute` - Tested the issue author dropdown functionality and it works as before Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Switch to the maintained vitest extension (#29914)Yarden Shoham2024-03-202-3/+3
| | | | | | | https://marketplace.visualstudio.com/items?itemName=zixuanchen.vitest-explorer was moved to https://marketplace.visualstudio.com/items?itemName=vitest.explorer Signed-off-by: Yarden Shoham <git@yardenshoham.com>
* Forbid jQuery `.css` and refactor all usage (#29852)silverwind2024-03-197-73/+78
| | | | | | | | | Tested all functionality. There is a [pre-existing bug](https://github.com/go-gitea/gitea/issues/29853) when moving a project panels which is not caused by this refactoring. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix border on focus in dashboard repo search (#29893)silverwind2024-03-191-1/+7
| | | | | | | | | | | Before: <img width="449" alt="Screenshot 2024-03-18 at 22 35 10" src="https://github.com/go-gitea/gitea/assets/115237/f2893870-e7a3-4e34-b0cf-4610735c9b36"> After: <img width="453" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/36a9f800-28a4-40fc-b6d2-a2e717ddba01">
* Fix invalid link of the commit status when ref is tag (#29752)yp053272024-03-192-3/+132
| | | | | | | | | | Fix #29731 Caused by #24634 Also remove fixme. ps: we can not fix the existed runs, as wrong refs are all recorded in DB, and we can not know whether they are branch or tag: ![image](https://github.com/go-gitea/gitea/assets/18380374/cb7cf266-f73f-419a-be1a-4689fdd1952a)
* Notify reviewers added via CODEOWNERS (#29842)Jimmy Praet2024-03-194-24/+75
|
* Fix milestoneID filter bug in issue list (#29897)Zettat1232024-03-191-3/+3
| | | Fix #29717
* Fix template error when comment review doesn't exist (#29888)wxiaoguang2024-03-198-196/+258
| | | Fix #29885
* Fix missing error check of bufio.Scanner (#29882)coldWater2024-03-197-0/+30
| | | maybe more
* Remove unused error in graceful manager (#29871)Nanguan Lin2024-03-182-12/+4
| | | As title.
* Migrate border and margin classes to Tailwind (#29828)silverwind2024-03-1817-48/+43
| | | | | | | Used all existing css vars, other migrations are 1:1. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Only do counting when count_only=true for repo dashboard (#29884)wxiaoguang2024-03-182-11/+16
| | | Ref: #29878
* Editor error message misleading due to re-used key. (#29859)buckybytes2024-03-182-2/+4
| | | | | | | | | | | | | | | The error message: `editor.file_changed_while_editing = The file contents have changed since you started editing. <a target="_blank" rel="noopener noreferrer" href="%s">Click here</a> to see them or <strong>Commit Changes again</strong> to overwrite them.` Is re-used in inappropriate contexts. The link in the key goes to a 404 when the key is used in a situation where the file contents have not changed. Added two new keys to differentiate commit id mismatch and push out of date conditions.
* [skip ci] Updated licenses and gitignoresGiteaBot2024-03-181-0/+3
|
* move some scripts from 'build' to 'tools' directory, misc refactors (#29844)silverwind2024-03-1710-20/+18
| | | | | | | | | | | | | | - Move some scripts from `build` to new `tools` dir. Eventually i would like to move all but let's do it step-by-step. - Add dir to eslint and move the files into vars. - Update docs accordingly. - While updating docs I noticed we were incorrectly having `public/img` path still in a few places. Replace those with the current `public/assets/img`. --------- Co-authored-by: Nanguan Lin <nanguanlin6@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Fix missing code in the user profile (#29865)Nanguan Lin2024-03-171-0/+14
| | | | | | | fix #29820 deleted by https://github.com/go-gitea/gitea/pull/29248/files#diff-2b0b591787f16325539485e648a09ab6d3177f47dc129cfe84a35ffe141dfd19L39-L62, which causing malfunction of follow/unfollow and missing description in the user profile page.
* Upgrade Go 1.22 and upgrade dependency (#29869)wxiaoguang2024-03-178-589/+265
|
* Fix the wrong locale key of searching users (#29868)Nanguan Lin2024-03-171-1/+1
| | | | | regression of #29530 I guess it's because the user-blocking feature is committed after that locale clean PR.