aboutsummaryrefslogtreecommitdiffstats
path: root/templates/repo
Commit message (Collapse)AuthorAgeFilesLines
* Fix markdown render behaviors (#34122)wxiaoguang36 hours9-14/+14
| | | | | | | * Fix #27645 * Add config options `MATH_CODE_BLOCK_DETECTION`, problematic syntaxes are disabled by default * Fix #33639 * Add config options `RENDER_OPTIONS_*`, old behaviors are kept
* Refactor dropdown ellipsis (#34123)wxiaoguang36 hours17-99/+93
| | | Remove legacy `truncated-item-container` and `truncated-item-name`.
* fix(#34076):replace assgniee translation key (#34077)Simon Priet6 days1-1/+1
| | | | | | | | | | | | | | | | Fix the typo on the `filter_assginee_no_assigne` key used in translations. The typo itself doesn't produce a bug (as it's there both on the code and on the locales) Side Note: Github UI is not the best to bulk change this :/ Squashing commits on the PR should be adequate. Closes #34076 . --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* [Fix] Resolve the problem of commit_statuses not being loaded at the top - ↵Kerwin Bryant6 days1-2/+2
| | | | | right when switching files from the file tree (#34079) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add descriptions for private repo public access settings and improve the UI ↵yp053278 days1-32/+50
| | | | | (#34057) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add anonymous access support for private/unlisted repositories (#34051)wxiaoguang8 days5-29/+46
| | | | | | | | | | | Follow #33127 Fix #8649, fix #639 This is a complete solution. A repo unit could be set to: * Anonymous read (non-signed-in user) * Everyone read (signed-in user) * Everyone write (wiki-only)
* Hide activity contributors, recent commits and code frequrency left tabs if ↵Lunny Xiao8 days1-9/+13
| | | | | | | | | | | there is no code permission (#34053) When a team have no code unit permission of a repository, the member of the team should not view activity contributors, recent commits and code frequrency. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Adjust the layout of the toolbar on the Issues/Projects page (#33667)Kerwin Bryant9 days2-4/+6
| | | | | | | | | | | On the list page, labels and milestones do not serve as a switch-tab. Instead, they function as page navigation. The switch-tab is only appropriate for use on the labels and milestones pages. And fix projects page layout. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* fix org repo creation being limited by user limits (#34030)TheFox0x710 days1-14/+10
| | | | | | | | | | | fixes an issue where user is unable to create new repository in organization via UI if repository limits are in place and user has exhausted them for their own namespace. closes: https://github.com/go-gitea/gitea/issues/15504 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix dropdown delegating and some UI problems (#34014)wxiaoguang12 days1-1/+1
| | | | | | | | | | | | | | | | The old logic is incomplete. See the comment for the improved logic. Fix #34011 And more fixes: 1. use empty "alt" for images, otherwise the width is not right when the image fails to load 2. remove the "dropdown icon" patch, because it has been clearly done in "dropdown.js" now 3. remove the "dropdown filtered item" patch, added a clear callback, and improve the logic 4. fix global init when a node is removed and added back gain (eg: the "cherry pick" dialog with a dropdown)
* Auto expand "New PR" form (#33971)wxiaoguang13 days4-6/+6
| | | Follow GitHub's behavior: use `?expand=1` to expand the "New PR" form
* Allow filtering issues by any assignee (#33343)Andreas Svanberg2025-03-212-11/+19
| | | | | | | | | | | | | | | | This is the opposite of the "No assignee" filter, it will match all issues that have at least one assignee. Before ![Before change](https://github.com/user-attachments/assets/4aea194b-9add-4a84-8d6b-61bfd8d9e58e) After ![After change with any filter](https://github.com/user-attachments/assets/99f1205d-ba9f-4a0a-a60b-cc1a0c0823fe) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Optimize Layout Styles of Filelist (#33920)Kerwin Bryant2025-03-191-5/+7
| | | | | | | Align items --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix file tree issues (#33916)Kerwin Bryant2025-03-171-2/+2
|
* Remove unused or abused styles (#33918)wxiaoguang2025-03-172-13/+9
| | | | | | * `top aligned` => `tw-align-top` * label list: it was broken, this PR fixes it * reference link: simplified * settings/repos: not affected
* Replace text-align classes with tailwind (#33905)silverwind2025-03-1621-43/+43
| | | | | | | Small refactor to remove these CSS classes in favor of tailwind. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add missing translation (#33900)Lunny Xiao2025-03-151-1/+1
|
* Add file tree to file view page (#32721)Kerwin Bryant2025-03-154-105/+158
| | | | | | | | | | | Resolve #29328 This pull request introduces a file tree on the left side when reviewing files of a repository. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve repo commit view (#33877)wxiaoguang2025-03-141-3/+12
| | | | | | | | | | | | | | | | | Fix #24623 Major changes: 1. Redirect `/owner/repo/blob/*` requests to `/owner/repo/src/commit/*` (like GitHub) 2. Add a "view file diff" link (see screenshot below) 3. Refactor "AssertHTMLElement" to generic, now we can accurately assert existence or number. 4. Add more tests --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: delvh <dev.lh@web.de>
* Fine tune push mirror UI (#33866)wxiaoguang2025-03-142-29/+34
|
* Add workflow_job webhook (#33694)ChristopherHX2025-03-111-0/+14
| | | | | | | | | Provide external Integration information about the Queue lossly based on https://docs.github.com/en/webhooks/webhook-events-and-payloads?actionType=completed#workflow_job Naming conflicts between GitHub & Gitea are here, Blocked => Waiting, Waiting => Queued Rationale Enhancement for ephemeral runners management #33570
* Add material icons for file list (#33837)wxiaoguang2025-03-101-3/+1
|
* Full-file syntax highlighting for diff pages (#33766)Dustin Firebaugh2025-03-091-6/+6
| | | | | | | | | | | | Fix #33358, fix #21970 This adds a step in the `GitDiffForRender` that does syntax highlighting for the entire file and then only references lines from that syntax highlighted code. This allows things like multi-line comments to be syntax highlighted correctly. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Decouple diff stats query from actual diffing (#33810)wxiaoguang2025-03-082-7/+7
| | | | | | | | | The diff stats are no longer part of the diff generation. Use `GetDiffShortStat` instead to get the total number of changed files, added lines, and deleted lines. As such, `gitdiff.GetDiff` can be simplified: It should not do more than expected. And do not run "git diff --shortstat" for pull list. Fix #31492
* Refactor repo-issue.ts (#33784)wxiaoguang2025-03-045-81/+78
| | | And remove jQuery
* Refactor initRepoBranchTagSelector to use new init framework (#33776)Kerwin Bryant2025-03-032-1/+3
| | | | | | | | Make "initRepoBranchTagSelector" to use new init framework and fix the abused "js-branch-tag-selector" styles --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor buttons to use new init framework (#33774)Kerwin Bryant2025-03-033-3/+3
| | | | | | | | | | Make buttons to use new init framework * "js-toggle-commit-body" * "show-panel/hide-panel/show-modal" * "copy-content" --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor markup and pdf-viewer to use new init framework (#33772)Kerwin Bryant2025-03-038-15/+13
| | | | | | | | | | | | | | | | 1. Add some "render-content" classes to "markup" elements when the content is rendered 2. Use correct "markup" wrapper for "preview" (but not set that class on the tab) 3. Remove incorrect "markup" class from LFS file view, because there is no markup content * "edit-diff" is also removed because it does nothing 5. Use "initPdfViewer" for PDF viewer 6. Remove incorrect "content" class from milestone markup 7. Init all ".markup" elements by new init framework --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor global init code and add more comments (#33755)wxiaoguang2025-03-031-3/+4
| | | | | | | | | | | | | | | | | | | Follow up #33748 Now there are 3 "global" functions: * registerGlobalSelectorFunc: for all elements matching the selector, eg: `.ui.dropdown` * registerGlobalInitFunc: for `data-global-init="initInputAutoFocusEnd"` * registerGlobalEventFunc: for `data-global-click="onCommentReactionButtonClick"` And introduce `initGlobalInput` to replace old `initAutoFocusEnd` and `attachDirAuto`, use `data-global-init` to replace fragile `.js-autofocus-end` selector. Another benefit is that by the new approach, no matter how many times `registerGlobalInitFunc` is called, we only need to do one "querySelectorAll" in the last step, it could slightly improve the performance.
* Fix dynamic content loading init problem (#33748)wxiaoguang2025-03-014-8/+8
| | | | | | | | | | | | | | | | 1. Rewrite `dirauto.ts` to `observer.ts`. * We have been using MutationObserver for long time, it's proven that it is quite performant. * Now we extend its ability to handle more "init" works. 2. Use `observeAddedElement` to init all non-custom "dropdown". 3. Use `data-global-click` to handle click events from dynamically loaded elements. * By this new approach, the old fragile selector-based (`.comment-reaction-button`) mechanism is removed. 4. By the way, remove unused `.diff-box` selector, it was abused and never really used. A lot of FIXMEs in "repo-diff.ts" are completely fixed, newly loaded contents could work as expected.
* Use `git diff-tree` for `DiffFileTree` on diff pages (#33514)Alexander McRae2025-02-282-27/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Modify Diff View FileTree to show all files ## Changes * removes Show Status button on diff * uses `git diff-tree` to generate the file tree for the diff * doesn't reload the diff tree each time we load more files in the preview * selecting and unloaded file will keep loading until that file is loaded * removes `DiffFileList.vue` and "Show Stats" in diff options ## Open Questions * selecting and unloaded file will keep loading until that file is loaded. Is this behaviour okay? It matches what github does. ### Demo In this demo I set `git.MAX_GIT_DIFF_FILES=1` in my `app.ini` to demonstrate a worst case example. In most cases the behaviour isn't nearly as jarring as we load a bunch of files at a time. https://github.com/user-attachments/assets/72f29663-d6fc-472d-94fa-7fb5950c2836 --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Clone repository with Tea CLI (#33725)Quentin2025-02-271-0/+1
| | | | | | | | | | | | This PR adds "Tea CLI" as a clone method. <img width="350" alt="Capture d’écran 2025-02-25 à 23 38 47" src="https://github.com/user-attachments/assets/8e86e54a-998b-45d1-9f20-167b449e79b6" /> --------- Signed-off-by: Quentin Guidée <quentin.guidee@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Show info about maintainers are allowed to edit a PR (#33738)wxiaoguang2025-02-271-5/+10
| | | | | | | | | | A simple and clear approach. The existing test TestPullCompare_EnableAllowEditsFromMaintainer should be good enough. Fix #21280 ![image](https://github.com/user-attachments/assets/b685950b-4095-45ad-b913-425f840f2876)
* Align sidebar gears to the right (#33721)Quentin2025-02-276-8/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently, the issue/pr sidebar is hard to read visually. One of the reason is that the gear icons make reading difficult because they are "in the way" when reading, and not aligned together. This PR proposes to align them on the right. Actions are also better highlighted this way. ## Screenshots ### Issue | Before this PR | After this PR | | --- | --- | | <img width="322" alt="Capture d’écran 2025-02-25 à 19 59 39" src="https://github.com/user-attachments/assets/efdd13af-7b22-4f2b-8e65-dd17d6f3ffad" /> | <img width="322" alt="Capture d’écran 2025-02-25 à 19 58 56" src="https://github.com/user-attachments/assets/eeacc3f4-5e2c-4558-a4b3-0f1ab4742107" /> | ### Pull Request | Before this PR | After this PR | | --- | --- | | <img width="322" alt="Capture d’écran 2025-02-25 à 20 16 12" src="https://github.com/user-attachments/assets/c274b58b-ad50-4ad8-b3da-91dbabd1b120" /> | <img width="322" alt="Capture d’écran 2025-02-25 à 20 15 54" src="https://github.com/user-attachments/assets/ecfd6d60-a525-4767-872d-2ef84030d81e" /> | Signed-off-by: Quentin Guidée <quentin.guidee@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Fix inconsistent closed issue list icon (#33722)Lunny Xiao2025-02-251-1/+1
| | | | | | | | | | | Fixe #33718 Before ![image](https://github.com/user-attachments/assets/2c77e249-a118-4471-8c63-ead4fe0f6336) After ![image](https://github.com/user-attachments/assets/c082eba8-5b21-4814-b091-c725ca46ccf3)
* Add cropping support when modifying the user/org/repo avatar (#33498)Kerwin Bryant2025-02-061-2/+1
| | | | | | | | Fixed #33321 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix commit status events (#33320)Lunny Xiao2025-02-041-0/+11
| | | | | | | | | | Fix #32873 Fix #33201 ~Fix #33244~ ~Fix #33302~ depends on ~#33396~ A part of this PR should be backported to v1.23 manually.
* Worktime tracking for the organization level (#19808)K Kovacs2025-02-036-9/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Dear Gitea team, first of all, thanks for the great work you're doing with this project. I'm planning to introduce Gitea at a client site, and noticed that while there is time recording, there are no project-manager-friendly reports to actually make use of that data, as were also mentioned by others in #4870 #8684 and #13531. Since I had a little time last weekend, I had put together something that I hope to be a useful contribution to this great project (while of course useful for me too). This PR adds a new "Worktime" tab to the Organisation level. There is a date range selector (by default set to the current month), and there are three possible views: - by repository, - by milestone, and - by team member. Happy to receive any feedback! There are several possible future improvements of course (predefined date ranges, charts, a member time sheet, matrix of repos/members, etc) but I hope that even in this relatively simple state this would be useful to lots of people. <img width="1161" alt="Screen Shot 2022-05-25 at 22 12 58" src="https://user-images.githubusercontent.com/118010/170366976-af00c7af-c4f3-4117-86d7-00356d6797a5.png"> Keep up the good work! Kristof --------- Co-authored-by: user <user@kk-git1> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Hide/disable unusable UI elements when a repository is archived (#33459)wxiaoguang2025-01-313-50/+55
| | | And by the way, remove some jQuery code
* Fix issue sidebar dropdown keyboard support (#33447)wxiaoguang2025-01-304-5/+8
| | | Just a quick fix, fix #33444
* Refactor repository transfer (#33211)Lunny Xiao2025-01-301-4/+4
| | | | | | | | | | | | | - Both have `RejectTransfer` and `CancelTransfer` because the permission checks are not the same. `CancelTransfer` can be done by the doer or those who have admin permission to access this repository. `RejectTransfer` can be done by the receiver user if it's an individual or those who can create repositories if it's an organization. - Some tests are wrong, this PR corrects them. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Support choose email when creating a commit via web UI (#33432)wxiaoguang2025-01-301-0/+10
| | | Initial PR for #24469
* Do not show unnecessary commit sign lock icon (#33387)wxiaoguang2025-01-251-1/+4
| | | Fix #33385
* Repo homepage styling tweaks (#33289)silverwind2025-01-242-2/+2
| | | | | | | | | | | | | | | Reduce it to a value that results in `.repo-home-sidebar-top` and `.repo-home-sidebar-bottom` having 240px content width, the same as GitHub. Before: <img width="1333" alt="Screenshot 2025-01-15 at 18 28 34" src="https://github.com/user-attachments/assets/cf0fa21b-87be-40e3-a6cd-26d146bce9cc" /> After: <img width="1330" alt="Screenshot 2025-01-15 at 18 28 27" src="https://github.com/user-attachments/assets/28acd837-10f4-4176-b8a0-510cd28c8b8d" />
* Fix comment header padding (#33377)Typed SIGTERM2025-01-254-8/+8
|
* Refactor webhook events (#33337)Lunny Xiao2025-01-231-21/+21
| | | | | | | Extract from #33320 This PR uses a map instead of a struct to store webhook event information. It removes many duplicated functions and makes the logic clearer.
* Fix code button alignment (#33345)silverwind2025-01-221-1/+2
| | | | | Fixes: https://github.com/go-gitea/gitea/issues/33344 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve sync fork behavior (#33319)wxiaoguang2025-01-201-6/+8
| | | | | | | | Fix #33271 Suppose there is a `branch-a` in fork repo: 1. if `branch-a` exists in base repo: try to sync `base:branch-a` to `fork:branch-a` 2. if `branch-a` doesn't exist in base repo: try to sync `base:main` to `fork:branch-a`
* Fix push message behavior (#33215)Chai-Shi2025-01-171-3/+3
| | | | | | | Fixes #32769 by the logic from pr #33192 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Trivial fixes (#33304)wxiaoguang2025-01-172-2/+2
| | | | | | | 1. the error check was added for go-git, it was caused by the empty `.keep` file in the test fixtures. 2. use `PostFormValue` instead of `PostForm.Get` (`Get` needs to parse the form ahead) 3. fix incorrect container text (it should show "Images" in the header but not "OS/Arch") 4. align maven xml 5. fix closed PR color&icon