aboutsummaryrefslogtreecommitdiffstats
Commit message (Collapse)AuthorAgeFilesLines
* Adjust some documentations titles (#23941)Lunny Xiao2023-04-0624-47/+51
| | | As title.
* [skip ci] Updated translations via CrowdinGiteaBot2023-04-061-62/+80
|
* Update eslints for Vue 3 (#23935)Jonathan Tran2023-04-051-1/+1
| | | | | | | | | | | | I found that some lint warnings in my editor are conflicting, and I believe the root cause is using lints designed for Vue 2 instead of Vue 3. We moved to Vue 3 in #20044. I verified that the explicitly disabled rules in the changed file are still part of the `vue/vue3-recommended` set. See [Available rules - eslint-plugin-vue](https://eslint.vuejs.org/rules/) for a full list of lints.
* Fix image border-radius (#23886)wxiaoguang2023-04-051-9/+1
| | | | | | | | | | | | | | 1. Instead of polluting the `border-radius` style globally, each "img" usage should declare their own styles. 2. There were some bugs in code, I believe the `.img` selector was done by mistake. After: ![image](https://user-images.githubusercontent.com/2114189/229415742-161b018f-14c3-471d-bcf7-34f83e5c2d89.png) ![image](https://user-images.githubusercontent.com/2114189/229415789-829d364a-76da-47a5-8c61-398cc990873c.png)
* [skip ci] Updated translations via CrowdinGiteaBot2023-04-0518-59/+42
|
* Scroll collapsed file into view (#23702)Jimmy Praet2023-04-053-2/+12
|
* docs: make the required backticks in email password more explicit (#23923)alex2023-04-041-1/+1
| | | | updated the example config to make the needed backticks around the password more obvious
* docs: fix typo (#23924)alex2023-04-041-1/+1
| | | fixes a minor typo in the email templates page
* Update docs markdown file weight to make it clear (#23909)Lunny Xiao2023-04-0489-97/+117
| | | | For Docusaurus, it needs a meta data named `sidebar_position`, so we copy all `weight` under `menu/sidebar` as top meta key.
* Add activity feeds API (#23494)Zettat1232023-04-0410-0/+665
| | | | | Close #5666 Add APIs for getting activity feeds.
* Fix code view (diff) broken layout (#23096)wxiaoguang2023-04-047-38/+33
| | | | | | | | | | | | | | | | Close #22911 I think it's ready for review now, feel free to test it, welcome to help to improve. ### Before ![image](https://user-images.githubusercontent.com/2114189/220958734-06871615-b498-4143-8449-3d443f08ffaa.png) ### After ![image](https://user-images.githubusercontent.com/2114189/220958621-0dce2728-57b8-4a1f-ac5d-48c7c2d42f5c.png)
* Use ghost user if package creator does not exist (#23822)KN4CK3R2023-04-041-1/+7
| | | Fixes #23818
* Org pages style fixes (#23901)silverwind2023-04-046-32/+29
| | | | | | | | | | | | | | | | | Few fixes/enhancements around org pages: Use flexbox for member and repo lists and tweak rendering of tabs and list: <img width="765" alt="Screenshot 2023-04-03 at 22 54 24" src="https://user-images.githubusercontent.com/115237/229625716-92a834c3-9121-4729-8b9b-3a3973cf9a91.png"> <img width="771" alt="Screenshot 2023-04-03 at 22 55 15" src="https://user-images.githubusercontent.com/115237/229625719-acc08ce8-4489-44a6-a9b9-e36755c55b1d.png"> Vertically center remove/leave buttons, add link to avatar: <img width="1223" alt="Screenshot 2023-04-03 at 21 51 20" src="https://user-images.githubusercontent.com/115237/229612616-b662b795-e754-41a1-a77a-381c267e6104.png">
* User/Org Feed render description as per web (#23887)65432023-04-042-2/+15
| | | | User descriptions should be rendered so that links and other markup appear correct in RSS feeds.
* Use User.ID instead of User.Name in ActivityPub API for Person IRI (#23823)wxiaoguang2023-04-047-30/+58
| | | | | | | | Thanks to @trwnh Close #23802 The ActivityPub id is an HTTPS URI that should remain constant, even if the user changes their name.
* Remove fomantic ".link" selector and styles (#23888)wxiaoguang2023-04-035-57/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's difficult to play with Fomantic's ".link" selector&styles, and it doesn't bring any real benefit. Instead, it sometimes introduces regressions (because of the `:not` selector, really difficult to fine-tune). Regression: <details> ![image](https://user-images.githubusercontent.com/2114189/229421849-b48fbcf6-2ae2-4264-b06b-2a06c12e1a4b.png) </details> After this PR, there is no ".link" in code anymore. We do not need to play the overwriting and `:not()` game anymore. ![image](https://user-images.githubusercontent.com/2114189/229422058-476aa5e2-53db-402d-b507-a6063824f835.png) ![image](https://user-images.githubusercontent.com/2114189/229422435-34fde1bc-b2ec-48ec-8c4a-6d8c2610b249.png) ![image](https://user-images.githubusercontent.com/2114189/229422014-cb38c8c7-828f-4a49-a761-95ea824d46a7.png) ![image](https://user-images.githubusercontent.com/2114189/229422031-10f6b4a5-af76-40ee-8fa1-692112a9274f.png)
* [skip ci] Updated translations via CrowdinGiteaBot2023-04-041-0/+7
|
* Fix `cases.Title` crash for concurrency (#23885)wxiaoguang2023-04-031-8/+5
| | | | | | | | Regression of #19676 and #21814 Fix #23872 `cases.Title` is not thread-safe, it has internal state, so it can't be used as a global shared variable.
* Disable editing tags (#23883)Zettat1232023-04-032-2/+2
| | | | | | | | | | | | Fixes #23865 In GitHub, users cannot edit a tag. <img src="https://user-images.githubusercontent.com/15528715/229409445-4233941b-3a37-4846-bc0c-efa94b90d9e0.png" width="600px" /> So in this PR the edit button will not be shown if the release's `IsTag` is `true`
* Fix user profile description rendering (#23882)wxiaoguang2023-04-031-6/+6
| | | | | | | | | | | The `ul li` styles were polluted. Before: ![image](https://user-images.githubusercontent.com/2114189/229409756-22438268-ee36-4e4a-a20b-04ee8ee4a79d.png) After: ![image](https://user-images.githubusercontent.com/2114189/229409809-25cea715-b6f1-4346-9bb4-3fbb58fcca65.png)
* Introduce GiteaLocaleNumber custom element to handle number localization on ↵wxiaoguang2023-04-0324-227/+94
| | | | | | | | | | | | | | | | | | | | | | | pages. (#23861) Follow #21429 & #22861 Use `<gitea-locale-number>` instead of backend `PrettyNumber`. All old `PrettyNumber` related functions are removed. A lot of code could be simplified. And some functions haven't been used for long time (dead code), so they are also removed by the way (eg: `SplitStringAtRuneN`, `Dedent`) This PR only tries to improve the `PrettyNumber` rendering problem, it doesn't touch the "plural" problem. Screenshot: ![image](https://user-images.githubusercontent.com/2114189/229290804-1f63db65-1e34-4a54-84ba-e00b44331b17.png) ![image](https://user-images.githubusercontent.com/2114189/229290911-c88dea00-b11d-48dd-accb-9f52edd73ce4.png)
* Convert .Source.SkipVerify to $cfg.SkipVerify (#23839)yp053272023-04-031-1/+1
| | | `Source` doesn't have `SkipVerify`, it is defined in `cfg`
* Fix review box viewport overflow issue (#23800)silverwind2023-04-031-22/+4
| | | | | | | | | | | | | | | | Fix regression that came likely from https://github.com/go-gitea/gitea/pull/23271: Long lines of text currently cause the review box's CodeMirror element to resize which apparently is not recognized by [popper's resize detection](https://popper.js.org/docs/v2/modifiers/event-listeners/) and which causes the element to go partially out of viewport until a reflow happens: ![wrap](https://user-images.githubusercontent.com/115237/228673260-f8ffe89e-5724-4fb9-b93f-30b146c4c436.gif) Fix this by setting the element to a static width derived from viewport width and remove the previously clumsy media queries.
* Fix owner team access mode value in team_unit table (#23675)yp053272023-04-033-3/+53
| | | | | | | | | | | | | | All `access_mode` value of Owner Teams are 0(AccessModeNone) in `team_unit` table, which should be 4(AccessModeOwner) In `team` table: ![image](https://user-images.githubusercontent.com/18380374/227409457-1b9660ae-8cf7-49c8-a013-1850b46baebc.png) In `team_unit` table: ![image](https://user-images.githubusercontent.com/18380374/227409429-a793dd90-4ae1-4191-b95b-e288c591f9fd.png) ps: In https://github.com/go-gitea/gitea/pull/23630, `access_mode` in `team_unit` is used to check the team unit permission, but I found that user can not see issues in owned org repos.
* Fix submit button won't refresh in New Repository Fork page (#22994)yp053272023-04-031-0/+1
| | | | | | | | | Fork a repo, and input an invalid repo name, you will get an error. Then rename the repo name to a valid one, the submit button is still disabled. In other pages, for example, in create repo page, the submit button will not be disabled. So I removed the codes to disable the submit button.
* Introduce GitHub markdown editor, keep EasyMDE as fallback (#23876)wxiaoguang2023-04-0346-831/+761
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The first step of the plan * #23290 Thanks to @silverwind for the first try in #15394 . Close #10729 and a lot of related issues. The EasyMDE is not removed, now it works as a fallback, users can switch between these two editors. Editor list: * Issue / PR comment * Issue / PR comment edit * Issue / PR comment quote reply * PR diff view, inline comment * PR diff view, inline comment edit * PR diff view, inline comment quote reply * Release editor * Wiki editor Some editors have attached dropzone Screenshots: <details> ![image](https://user-images.githubusercontent.com/2114189/229363558-7e44dcd4-fb6d-48a0-92f8-bd12f57bb0a0.png) ![image](https://user-images.githubusercontent.com/2114189/229363566-781489c8-5306-4347-9714-d71af5d5b0b1.png) ![image](https://user-images.githubusercontent.com/2114189/229363771-1717bf5c-0f2a-4fc2-ba84-4f5b2a343a11.png) ![image](https://user-images.githubusercontent.com/2114189/229363793-ad362d0f-a045-47bd-8f9d-05a9a842bb39.png) </details> --------- Co-authored-by: silverwind <me@silverwind.io>
* Improve LoadUnitConfig to handle invalid or duplicate units (#23736)Jason Song2023-04-033-17/+77
| | | | | | | The old code just parses an invalid key to `TypeInvalid` and uses it as normal, and duplicate keys will be kept. So this PR will ignore invalid key and log warning and also deduplicate valid units.
* Append `(comment)` when a link points at a comment rather than the whole ↵Hester Gong2023-04-038-11/+61
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | issue (#23734) Close #23671 For the feature mentioned above, this PR append ' (comment)' to the rendered html if it is a hashcomment. After the PR, type in the following ``` pull request from other repo: http://localhost:3000/testOrg/testOrgRepo/pulls/2 pull request from this repo: http://localhost:3000/aaa/testA/pulls/2 issue comment from this repo: http://localhost:3000/aaa/testA/issues/1#issuecomment-18 http://localhost:3000/aaa/testA/pulls/2#issue-9 issue comment from other repo: http://localhost:3000/testOrg/testOrgRepo/pulls/2#issuecomment-24 http://localhost:3000/testOrg/testOrgRepo/pulls/2#issue ``` Gives: <img width="687" alt="截屏2023-03-27 13 53 06" src="https://user-images.githubusercontent.com/17645053/227852387-2b218e0d-3468-4d90-ad81-d702ddd17fd2.png"> Other than the above feature, this PR also includes two other changes: 1 Right now, the render of links from file changed tab in pull request might not be very proper, for example, if type in the following. (not sure if this is an issue or design, if not an issue, I will revert the changes). example on [try.gitea.io](https://try.gitea.io/HesterG/testrepo/pulls/1) ``` https://try.gitea.io/HesterG/testrepo/pulls/1/files#issuecomment-162725 https://try.gitea.io/HesterG/testrepo/pulls/1/files ``` it will render the following <img width="899" alt="截屏2023-03-24 15 41 37" src="https://user-images.githubusercontent.com/17645053/227456117-5eccedb7-9118-4540-929d-aee9a76de852.png"> In this PR, skip processing the link into a ref issue if it is a link from files changed tab in pull request After: type in following ``` hash comment on files changed tab: http://localhost:3000/testOrg/testOrgRepo/pulls/2/files#issuecomment-24 files changed link: http://localhost:3000/testOrg/testOrgRepo/pulls/2/files ``` Gives <img width="708" alt="截屏2023-03-27 22 09 02" src="https://user-images.githubusercontent.com/17645053/227964273-5dc06c50-3713-489c-b05d-d95367d0ab0f.png"> 2 Right now, after editing the comment area, there will not be tippys attached to `ref-issue`; and no tippy attached on preview as well. example: https://user-images.githubusercontent.com/17645053/227850540-5ae34e2d-b1d7-4d0d-9726-7701bf825d1f.mov In this PR, in frontend, make sure tippy is added after editing the comment, and to the comment on preview tab After: https://user-images.githubusercontent.com/17645053/227853777-06f56b4c-1148-467c-b6f7-f79418e67504.mov
* Rename actions unit to `repo.actions` and add docs for it (#23733)Jason Song2023-04-034-5/+6
| | | | | | | | | | I neglected that the `NameKey` of `Unit` is not only for translation, but also configuration. So it should be `repo.actions` to maintain consistency. ## :warning: BREAKING :warning: If users already use `actions.actions` in `DISABLED_REPO_UNITS` or `DEFAULT_REPO_UNITS`, it will be treated as an invalid unit key.
* Try to catch more broken translations (#23867)wxiaoguang2023-04-031-5/+30
| | | | | | Result: #23866 Gitea should drop the ``` ` ``` as string quoter, it is not recognized by Crowdin and it causes problem for translators.
* [skip ci] Updated translations via CrowdinGiteaBot2023-04-034-4/+4
|
* Update JS deps (#23853)silverwind2023-04-025-342/+409
| | | | | - Update all JS dependencies - Regenerate svgs - Tested heatmap, swagger, citation
* Added close/open button to details page of milestone (#23877)Bartlomiej Komendarczuk2023-04-031-0/+7
| | | | | | | | | Depending on the current state, a close or open button appears. Close https://github.com/go-gitea/gitea/issues/19083 --- ![image](https://user-images.githubusercontent.com/11333925/229367898-844ff790-c725-440a-9cf7-242c7745d643.png) ![image](https://user-images.githubusercontent.com/11333925/229367873-6a77fceb-1627-41d4-9d76-1f10ba2b278b.png)
* Check `IsActionsToken` for LFS authentication (#23841)Zettat1232023-04-021-1/+19
| | | | | | | Close #23824 Actions cannot fetch LFS objects from private repos because we don't check if the user is the `ActionUser`.
* Prefill input values in oauth settings as intended (#23829)yp053272023-04-021-7/+7
|
* Display image size for multiarch container images (#23821)KN4CK3R2023-04-028-22/+198
| | | | | | | | Fixes #23771 Changes the display of different architectures for multiarch images to show the image size: ![grafik](https://user-images.githubusercontent.com/1666336/228781477-cc76c4d1-4728-434f-8a27-fc008790d924.png)
* Use clippie module to copy to clipboard (#23801)silverwind2023-04-025-45/+13
| | | | | | | | | | | | Externalize clipboard copying to the [clippie](https://github.com/silverwind/clippie) module which I feel I can maintain outside this repo for shared benefit with my other projects. The module is feature-equivalent to the previous code and has one improvement where it sets `aria-hidden` on the fallback textarea, preventing screen readers from picking it up. Also it support `Array` of `content` as well to copy multiple items at once, in case it's ever needed.
* Remove assertion debug code for show/hide refactoring (#23576)wxiaoguang2023-04-021-26/+0
| | | | | | | | | | | | | | | | | | | | When doing the refactoring: * #22950 I added some debug mode code (assertShown) to help to catch bugs, it did catch some bugs like: * #23074 If it has been proved that there is no more bugs, this assertion could be removed easily and clearly. Feel free to decide when to remove it (feel free to convert it from Draft to Ready for Review). cc: @silverwind
* [skip ci] Updated translations via CrowdinGiteaBot2023-04-023-8/+28
|
* Remove jQuery ready usage (#23858)silverwind2023-04-013-3/+11
| | | | Replace it with equal function of our own and enable the eslint rule to forbid future usage.
* Fix JS error when changing PR's target branch (#23862)wxiaoguang2023-04-011-2/+0
| | | | | | | | | | | | | | Caught by @justusbunsi An old bug from #6488 In `pullrequest_targetbranch_change`, the `data` might be empty, because `UpdatePullRequestTarget` may respond `http.StatusNoContent`. And the old code's `$branchTarget.text(data.base_branch);` doesn't make sense, because in the end, the page will be always reloaded. So, just remove the `$branchTarget.text(data.base_branch);`, everything should be fine.
* Improve action log display with control chars (#23820)wxiaoguang2023-04-015-3/+92
| | | | | | | | | | | Close #23680 Some CLI programs use "\r" and control chars to print new content in current line. So, the strings in one line are actually from `\rReading...1%\rReading...5%\rReading...100%` This PR tries to make the output better.
* Fix review conversation reply (#23846)wxiaoguang2023-04-011-0/+1
| | | | | Regression of #23245 Close #23843
* Improve home page template, fix Sort dropdown menu flash (#23856)wxiaoguang2023-04-012-6/+4
| | | | | | | | | | | | | | | | | | Follow #23854 Major changes: 1. The old `<div class="ui"><div class="six wide column ..."> </div></div>` doesn't have affect any more * So clean them, and remove other unnecessary elements/styles. 2. Add padding for narrow view. Before ![image](https://user-images.githubusercontent.com/2114189/229262177-e8cf6c9b-b17b-482c-83fe-a84579e01e8e.png) After: ![image](https://user-images.githubusercontent.com/2114189/229262166-d46134b0-2117-4d5c-a469-a2115cbd4b6c.png)
* Make first section on home page full width (#23854)silverwind2023-03-311-1/+1
| | | | | | | | | Before: <img width="1272" alt="Screenshot 2023-03-31 at 19 56 16" src="https://user-images.githubusercontent.com/115237/229195611-4570453c-26bf-4663-865b-7e7eb9115060.png"> After: <img width="1270" alt="Screenshot 2023-03-31 at 20 00 14" src="https://user-images.githubusercontent.com/115237/229195639-23841b62-38d8-4e43-8ee5-3f70cba5de6e.png">
* [skip ci] Updated translations via CrowdinGiteaBot2023-04-011-0/+3
|
* Fix incorrect CORS failure detection logic (#23844)wxiaoguang2023-03-311-5/+5
| | | | | | Regression of #23495 Fixes #23838 Fixes #23850
* Fix 500 error if there is a name conflict when edit authentication source ↵yp053272023-03-312-3/+12
| | | | (#23832)
* Use different SVG for pending and running actions (#23836)Hester Gong2023-03-312-2/+6
| | | | | | | | | | | | | | Before: <img width="641" alt="截屏2023-03-31 11 12 17" src="https://user-images.githubusercontent.com/17645053/229013472-237701db-2c30-4477-a7b5-d40640361b14.png"> <img width="576" alt="截屏2023-03-31 11 10 48" src="https://user-images.githubusercontent.com/17645053/229013535-571aa8be-8e58-4d93-8641-9b8b5fd90108.png"> After: <img width="709" alt="截屏2023-03-31 11 05 44" src="https://user-images.githubusercontent.com/17645053/229012963-ccd1e9a7-8bea-4197-aa36-865eafbf8858.png"> <img width="528" alt="截屏2023-03-31 11 06 56" src="https://user-images.githubusercontent.com/17645053/229012971-a7313eb6-ecd2-4da3-89a7-c20be33f4611.png">
* CSS color tweaks (#23828)silverwind2023-03-313-14/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Change grey shades in arc-green to match the theme more: <img width="661" alt="Screenshot 2023-03-30 at 21 42 34" src="https://user-images.githubusercontent.com/115237/228957952-8e099e56-6923-4aa6-8ce9-3c1cd898b73e.png"> Adjusted grey shade in light theme: <img width="652" alt="image" src="https://user-images.githubusercontent.com/115237/228963876-3bde6181-8397-4dc2-be72-33982e6c7acb.png"> Increase contrast in arc-green, change background to slightly darker shade, change forgeground to slightly brighter colors: <img width="283" alt="Screenshot 2023-03-30 at 22 33 20" src="https://user-images.githubusercontent.com/115237/228957957-272c24a5-dd0b-427a-b6b7-e62836bdd73c.png"> Increase contrast of grey text in light theme as well by making them darker: <img width="273" alt="Screenshot 2023-03-30 at 22 33 35" src="https://user-images.githubusercontent.com/115237/228957959-283139c7-6fa7-4b68-9fdd-16c668ad1301.png"> Add color rule for border multiple select items: <img width="183" alt="Screenshot 2023-03-30 at 22 29 31" src="https://user-images.githubusercontent.com/115237/228957954-6b5a752d-bbb0-4519-ab35-d02c0804d955.png"> <img width="181" alt="Screenshot 2023-03-30 at 22 29 46" src="https://user-images.githubusercontent.com/115237/228957956-fca9790a-d6c9-4f31-8d1b-d183ab3ac669.png"> Added color rule for red `*` on required form fields: <img width="97" alt="image" src="https://user-images.githubusercontent.com/115237/228958760-517ad9ef-565d-4349-b734-9b559ab42429.png">