summaryrefslogtreecommitdiffstats
path: root/web_src/js/features/repo-diff.js
Commit message (Collapse)AuthorAgeFilesLines
* Add filetree on left of diff view (#21012)sebastian-sauer2022-09-271-25/+18
| | | | | | | | | | | | | | This PR adds a filetree to the left side of the files/diff view. Initially the filetree will not be shown and may be shown via a new "Show file tree" button. Showing and hiding is using the same icon as github. Folders are collapsible. On small devices (max-width 991 PX) the file tree will be hidden. Close #18192 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix tooltip init after review (#20814)silverwind2022-08-171-9/+13
| | | | | | | | | | * Fix tooltip init after review Previous code passed a jQuery collection which initTooltip couldn't handle. Instead, iterate the individial matched elements and add a dollar to the variable name to make it clear it's jQuery. Fixes: https://github.com/go-gitea/gitea/issues/20809
* Replace fomantic popup module with tippy.js (#20428)silverwind2022-08-091-2/+2
| | | | | | | | - replace fomantic popup module with tippy.js - fix chaining and add comment - add 100ms delay to tooltips - stopwatch improvments, raise default maxWidth - update web_src/js/features/common-global.js - use type=submit instead of js
* Init popup for new code comment (#20234)Gusted2022-07-051-0/+2
| | | | | | | | | - Initialize the popup for the tooltip inside the new code comment. - This works and is good enough to have this issue fixed for 1.17 Fix #20068
* Allow to mark files in a PR as viewed (#19007)delvh2022-05-071-2/+10
| | | Users can now mark files in PRs as viewed, resulting in them not being shown again by default when they reopen the PR again.
* Improve reviewing PR UX (#19612)Gusted2022-05-071-1/+16
|
* Use explicit jQuery import, remove unused eslint globals (#18435)silverwind2022-01-281-0/+2
| | | | | - Don't rely on globals (window.$) for jQuery import - Remove eslint globals no longer in use
* Fix PR comments UI (#18323)wxiaoguang2022-01-191-1/+1
| | | | | Closes: * Review comment cannot be edited #17768 * Changing PR Comment Resolved State Disables Further Changes #18315
* Revert "Prevent possible XSS when using jQuery (#18289)" (#18293)wxiaoguang2022-01-161-1/+1
| | | This reverts commit 661d3d28e97bb49bef075c0314edad5879148aaa.
* Prevent possible XSS when using jQuery (#18289)Gusted2022-01-161-1/+1
| | | | | | | In the case of misuse or misunderstanding from a developer whereby, if `sel` can receive user-controlled data, jQuery `$(sel)` can lead to the creation of a new element. Current usage is using hard-coded selectors in the templates, but nobody prevents that from expanding to user-controlled somehow.
* Load EasyMDE/CodeMirror dynamically, remove RequireEasyMDE (#18069)wxiaoguang2022-01-051-1/+1
| | | This PR makes frontend load EasyMDE/CodeMirror dynamically, and removes `RequireEasyMDE`.
* Fix EasyMDE validation (#18161)wxiaoguang2022-01-031-1/+1
|
* Require codereview to have content (#18156)Gusted2022-01-021-0/+7
| | | | | - Report a validityError when the codeReview have no comment. - Resolves #18151 - Refactor
* Fix loading content history on show more (#17819)Gusted2021-12-061-1/+3
| | | | | | | | | | | | | | | * Fix loading content history on show more - Call `initRepoIssueContentHistory` so that the newly loaded issues also get their content history. - Resolves #17767 * apply history to show diff too Signed-off-by: Andrew Thornton <art27@cantab.net> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: 6543 <6543@obermui.de>
* Allow Loading of Diffs that are too large (#17739)zeripath2021-11-221-1/+28
| | | | | | | | | | | * Allow Loading of Diffs that are too large This PR allows the loading of diffs that are suppressed because the file is too large. It does not handle diffs of files which have lines which are too long. Fix #17738 Signed-off-by: Andrew Thornton <art27@cantab.net>
* perf: sent `data-path` once for each file (#17657)Gusted2021-11-191-2/+2
| | | | | | | | | | | | | | - Don't sent it with each line, instead send it at the top-element for each file. - Related: https://github.com/go-gitea/gitea/pull/17618#issuecomment-968192761 2.5K Additions: No-Patch: Unified: 2.14 MB (2.14 MB size) Split: 2.59 MB (2.59 MB size) Patch: Unified: 2.10 MB (2.10 MB size) (-1.8%) Split: 2.55 MB (2.55 MB size) (-1.5%)
* Improve async/await usage, and sort init calls in `index.js` (#17386)wxiaoguang2021-11-091-0/+25
| | | | * clean up async/await, and sort init calls in `index.js * use `const _promise` to indicate that we do not need await an async function
* Frontend refactor, PascalCase to camelCase, remove unused code (#17365)wxiaoguang2021-10-211-2/+2
| | | | | * Frontend refactor, PascalCase to camelCase, remove unused code * fix
* Fix the PR review form bug during frontend refactor (#17332)wxiaoguang2021-10-161-1/+1
|
* Split `index.js` to separate files (#17315)wxiaoguang2021-10-171-0/+81
* split `index.js` to separate files * tune clipboard * fix promise * fix document * remove intermediate empty file * fix async event listener * use `export function` instead of `export {}`, add more comments Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: 6543 <6543@obermui.de>