summaryrefslogtreecommitdiffstats
path: root/templates
Commit message (Collapse)AuthorAgeFilesLines
* Prevent tab shifting, remove extra margin on fluid pages (#31090) (#31099)Giteabot2024-05-275-10/+13
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #31090 by @silverwind 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"> Co-authored-by: silverwind <me@silverwind.io>
* Make gitea webhooks openproject compatible (#28435) (#31081)Giteabot2024-05-261-0/+34
| | | | | Backport #28435 by Chief-Detektor Co-authored-by: André Rosenhammer <andre.rosenhammer@gmail.com>
* Support setting the `default` attribute of the issue template dropdown field ↵Giteabot2024-05-241-1/+1
| | | | | | | | | | | | | | (#31045) (#31059) Backport #31045 by @Zettat123 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. Co-authored-by: Zettat123 <zettat123@gmail.com>
* Fix wrong display of recently pushed notification (#25812) (#31043)yp053272024-05-231-2/+2
| | | | | | | | | | | Backport #25812 ~~ps: removed some new codes in `tests/integration/pull_merge_test.go`~~ --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Don't include link of deleted branch when listing branches (#31028) (#31032)Giteabot2024-05-211-1/+1
| | | | | | | | | | | | | | | | Backport #31028 by @kemzeb 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. Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
* Return `access_denied` error when an OAuth2 request is denied (#30974) (#31029)Giteabot2024-05-201-2/+2
| | | | | | Backport #30974 by Zettat123 Co-authored-by: Zettat123 <zettat123@gmail.com> Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Fix incorrect "blob excerpt" link when comparing files (#31013) (#31026)Giteabot2024-05-202-6/+8
| | | | | Backport #31013 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Avoid 500 panic error when uploading invalid maven package file (#31014) ↵Giteabot2024-05-202-2/+9
| | | | | | | (#31027) Backport #31014 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix project column title overflow (#31011) (#31025)Giteabot2024-05-201-10/+6
| | | | | Backport #31011 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix "force private" logic (#31012) (#31021)Giteabot2024-05-2010-11/+12
| | | | | Backport #31012 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Simplify mirror repository API logic (#30963) (#31009)Giteabot2024-05-181-1/+1
| | | | | | | Backport #30963 by wxiaoguang Fix #30921 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix JS error when editing a merged PR's title (#30990) (#31001)Giteabot2024-05-171-4/+2
| | | | | | | Backport #30990 by @wxiaoguang Regression of Fix issue/PR title edit (#30858) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* template: `label` fix correct input id (#30987) (#30997)Giteabot2024-05-161-1/+1
| | | | | | | Just a small commit to fix a wrong label for id. Thanks and cheers! Signed-off-by: Frank Villaro-Dixon <frank@villaro-dixon.eu> Co-authored-by: Frank Villaro-Dixon <frank@vi-di.fr>
* Put web editor into a segment (#30966) (#30993)Giteabot2024-05-161-19/+23
| | | | | Backport #30966 by silverwind Co-authored-by: silverwind <me@silverwind.io>
* Protected tag is no internal server error (#30962) (#30970)Giteabot2024-05-141-4/+13
| | | | | | | | | | Backport #30962 by @KN4CK3R Fixes #30959 Adds an API test for protected tags. Fix existing tag in combination with fixtures. Co-authored-by: KN4CK3R <admin@oldschoolhack.me>
* Restyle release list, fix branch dropdown (#30837) (#30968)Giteabot2024-05-132-13/+12
| | | | | | | | | | | | | | | | | | | Backport #30837 by @silverwind 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: silverwind <me@silverwind.io>
* Support using label names when changing issue labels (#30943) (#30958)Giteabot2024-05-131-5/+2
| | | | | | | | | | | | | | | | Backport #30943 by @Zettat123 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" /> Co-authored-by: Zettat123 <zettat123@gmail.com>
* Fix file path width in repo non-homepage view (#30951) (#30952)Giteabot2024-05-121-1/+1
| | | | | | | | | | Backport #30951 by @silverwind 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"> Co-authored-by: silverwind <me@silverwind.io>
* Fix some UI regressions for commit list (#30920) (#30937)Giteabot2024-05-101-5/+9
| | | | | | | | Backport #30920 by wxiaoguang Close #30919 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Check if reverse proxy is correctly configured (#30890) (#30935)Giteabot2024-05-101-13/+15
| | | | | | | | | Backport #30890 by wxiaoguang Follow #27011 Follow #30885 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Fix incorrect issue form (#30881) (#30904)Giteabot2024-05-081-5/+1
| | | | | Backport #30881 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix various problems around projects board view (#30696) (#30902)Giteabot2024-05-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #30696 by @lunny # 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: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix some UI problems (dropdown/container) (#30849) (#30871)Giteabot2024-05-067-178/+201
| | | | | | | | Backport #30849 by wxiaoguang Follow #30345 Follow #30547 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix some UI problems (install/checkbox) (#30854) (#30870)Giteabot2024-05-061-146/+148
| | | | | Backport #30854 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix issue/PR title edit (#30858) (#30865)Giteabot2024-05-051-18/+25
| | | | | | | | Backport #30858 by wxiaoguang 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 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve repo button row layout (#30668) (#30839)Giteabot2024-05-022-7/+7
| | | | | | | | | | | | | | | | | | | | | | | Backport #30668 by @silverwind 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"> Co-authored-by: silverwind <me@silverwind.io>
* Catch and handle unallowed file type errors in issue attachment API (#30791) ↵Giteabot2024-05-031-0/+6
| | | | | | | | | | | (#30834) Backport #30791 by kemzeb 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. Co-authored-by: Kemal Zebari <60799661+kemzeb@users.noreply.github.com>
* Fix issue card layout (#30800) (#30820)Giteabot2024-05-021-3/+3
| | | | | | | Backport #30800 by wxiaoguang Fix #30788 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix branch selector UI (#30803) (#30819)Giteabot2024-05-023-30/+24
| | | | | | | Backport #30803 by wxiaoguang Fix #30802 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Rework and fix stopwatch (#30732) (#30787)Giteabot2024-04-301-30/+39
| | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #30732 by @silverwind 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. Co-authored-by: silverwind <me@silverwind.io>
* Right align the "Settings" menu item in overflow-menu (#30764) (#30777)Giteabot2024-04-302-1/+3
| | | | | Backport #30764 by wxiaoguang Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Rename CodeIndexerEnabled to IsRepoIndexerEnabled (#30762) (#30767)Giteabot2024-04-292-2/+2
| | | | | | | | | | Backport #30762 by @wxiaoguang Fix #30761 Most places use `IsRepoIndexerEnabled` but not `CodeIndexerEnabled`, so it should always use `IsRepoIndexerEnabled` for consistency. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix all rounded borders, change affected tab menus to pills (#30707) (#30769)Giteabot2024-04-2915-36/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Backport #30707 by @silverwind 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: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Make Ctrl+Enter work for issue/comment edit (#30720)v1.22.0-rc1wxiaoguang2024-04-272-5/+5
| | | Fix #30710
* Issue card improvements (#30687)silverwind2024-04-271-10/+15
| | | | | | | | | | | | | | | 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>
* Don't show loading indicators when refreshing the system status (#30712)Yarden Shoham2024-04-271-1/+2
| | | | | Signed-off-by: Yarden Shoham <git@yardenshoham.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: silverwind <me@silverwind.io>
* Prevent allow/reject reviews on merged/closed PRs (#30686)Kemal Zebari2024-04-271-12/+16
| | | Resolves #30675.
* Improve diff stats bar (#30669)silverwind2024-04-271-1/+1
| | | | | | | | | | | | | 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">
* Update misspell to 0.5.1 and add `misspellings.csv` (#30573)silverwind2024-04-271-1/+1
| | | | | | 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.
* Diff color enhancements, add line number background (#30670)silverwind2024-04-261-11/+11
| | | | | | | | | | | | | | | | | | | | | | 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
* feat(api): enhance Actions Secrets Management API for repository (#30656)Bo-Yi Wu2024-04-261-0/+48
| | | | | | | | | | | | | | | | | | | | | | | | | | - 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>
* Fix code search input for different views (#30678)wxiaoguang2024-04-261-10/+12
| | | | | | 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)
* Improve job commit description (#30579)yp053272024-04-262-1/+4
| | | | | | | | | | | | | | | | | | | | | 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>
* Improve oauth2 client "preferred username field" logic and the error ↵wxiaoguang2024-04-251-7/+4
| | | | | | | | | | | | | 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.
* Fix view of readme file in the home code page. (#30564)Jiaxin Zhu2024-04-251-1/+1
| | | | | | | | 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>
* Fix checkbox field markup (#30666)silverwind2024-04-232-6/+10
| | | | | | 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.
* Avoid doubled border for the PR info segment (#30663)wxiaoguang2024-04-231-1/+3
|
* Initial support for colorblindness-friendly themes (#30625)wxiaoguang2024-04-244-32/+19
| | | | | | | 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.
* Fix flash message for flex-container (#30657)wxiaoguang2024-04-232-4/+2
|
* Fix project name wrapping, remove horizontal margin on header (#30631)silverwind2024-04-232-5/+5
| | | | | | | | | | | | | | | | | 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">