aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js
Commit message (Collapse)AuthorAgeFilesLines
* Refactor legacy JS (#33115)wxiaoguang2025-01-064-28/+30
|
* Refactor legacy line-number and scroll code (#33094)wxiaoguang2025-01-044-137/+68
| | | | | 1. remove jquery 2. rewrite the "line number selection", fix various edge cases 3. fix the scroll
* Refactor repo-new.ts (#33070)wxiaoguang2025-01-016-57/+69
| | | | | 1. merge `repo-template.ts` into `repo-new.ts` (they are all for "/repo/create") 2. remove jquery 3. fix an anonying fomantic dropdown bug, see the comment of `onResponseKeepSelectedItem`
* Refactor pull-request compare&create page (#33071)wxiaoguang2025-01-022-62/+14
| | | The old code is unnecessarily complex.
* Fix unittest and repo create bug (#33061)wxiaoguang2024-12-311-1/+2
| | | | | | | 1. `StatDir` was not right, fix the FIXME 2. Clarify the test cases for `IsUsableRepoName` 3. Fix regression bug in `repo-new.ts` Fix #33060
* [Feature] Private README.md for organization (#32872)Chai-Shi2024-12-311-11/+31
| | | | | | | | Implemented #29503 --------- Co-authored-by: Ben Chang <ben_chang@htc.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Make issue suggestion work for new PR page (#33035)wxiaoguang2024-12-312-2/+4
| | | Fix #33026
* Fix bug automerge cannot be chosed when there is only 1 merge style (#33040)Lunny Xiao2024-12-301-1/+1
| | | | | | | This is a quick bug fix. Even if there is only 1 merge style, the dropdown menu will still be displayed to allow users to choose auto-merge. Fix #32448
* Refactor comment history and fix content edit (#33018)wxiaoguang2024-12-283-33/+41
| | | | | And fix a regression bug for comment content editing. Now 11 "import jquery" files left
* fix textarea newline handle (#32966)metiftikci2024-12-252-5/+20
| | | | | | | | | | | - Fix cursor position if input newline on middle of lines - ~Increment number if numbered list~ ![image](https://github.com/user-attachments/assets/bcfe2625-11a8-4ea4-9a71-b7ecfe81b2e0) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add auto-expanding running actions step (#30058)bytedream2024-12-221-2/+50
| | | | | | | Auto-expands the currently running action step. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add action auto-scroll (#30057)bytedream2024-12-212-6/+39
| | | | | | | | | | | | | Adds an auto-scroll/follow feature to running actions (fix #25186, fix #28535). When new log lines are appended and the bottom of the logs container (`.action-view-right`) is visible at this time, the page automatically scrolls down to the bottom of the logs. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Enable Typescript `strictFunctionTypes` (#32911)silverwind2024-12-2220-84/+93
| | | | | | | | 1. Enable [strictFunctionTypes](https://www.typescriptlang.org/tsconfig/#strictFunctionTypes) 2. Introduce `DOMEvent` helper type which sets `e.target`. Surely not totally correct with that `Partial` but seems to work. 3. Various type-related refactors, change objects in `eventsource.sharedworker.ts` to `Map`.
* Fix areYouSure confirm (#32941)wxiaoguang2024-12-214-4/+12
| | | See the comment
* show warning on navigation if currently editing comment or title (#32920)Tim2024-12-203-7/+18
| | | | | | | | | | This PR fixes the issue https://github.com/go-gitea/gitea/issues/32223 Make the browser to show the confirm popup, as it does with other forms. --------- Co-authored-by: Tim Wundenberg <tim@wundenbergs.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor repo-projects.ts (#32892)silverwind2024-12-194-124/+87
| | | | | | | | | | - Remove jQuery - Add types to all functions - Tested all modified functionality --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Move RepoBranchTagSelector init outside the SFC (#32890)silverwind2024-12-183-47/+38
| | | | | SFCs shouldn't export anything besides their component, and this eliminates one issue with tsc, while apparently also solving a hack. It seems to work as before, also when multiples are on the same page.
* Fix various trivial problems (#32861)wxiaoguang2024-12-171-0/+10
| | | | | | | | | | | | | | 1. add/improve comments to help future readers could understand the problem more easily. 2. add an error log to LDAP with username fallback 3. use `or` instead of `Iif` for "repo/branch_dropdown" (`Iif` was a mistake, but it doesn't really affect the UI) 4. add `tw-font-mono` style to container digest to match dockerhub 5. fix a bug in RepoBranchTagSelector: the form is not updated when there is no click to an item --------- Co-authored-by: delvh <dev.lh@web.de>
* Fix incomplete Actions status aggregations (#32859)wxiaoguang2024-12-163-7/+12
| | | fix #32857
* Fix remaining typescript issues, enable `tsc` (#32840)silverwind2024-12-1620-94/+115
| | | | | | | | | | | | Fixes 79 typescript errors. Discovered at least two bugs in `notifications.ts`, and I'm pretty sure this feature was at least partially broken and may still be, I don't really know how to test it. After this, only like ~10 typescript errors remain in the codebase but those are harder to solve. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Tweak repo sidebar (#32847)silverwind2024-12-151-3/+3
| | | | | | | | | | | | | | | | | | | | | | | Before and after: <img width="218" alt="Screenshot 2024-12-15 at 04 53 53" src="https://github.com/user-attachments/assets/299b1f0a-ba72-47c6-b662-a9d540d4d741" /> <img width="222" alt="Screenshot 2024-12-15 at 04 53 41" src="https://github.com/user-attachments/assets/5a2b5332-e324-4d20-82e9-21d1c850e826" /> Diff without whitespace: https://github.com/go-gitea/gitea/pull/32847/files?diff=unified&w=1 The `tw-mt-2` is fine even if the element renders empty: <img width="387" alt="image" src="https://github.com/user-attachments/assets/76a976e4-ba2e-48a5-9248-c361552a937a" /> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor markdown math render (#32831)wxiaoguang2024-12-141-9/+11
| | | Add more tests
* Improve JSX/TSX support in code editor (#32833)silverwind2024-12-141-4/+11
| | | | | | | | | | | | | | | | | Two tweaks to Monaco to improve JSX/TSX support. 1. Certain language features like JSX/TSX only work when passing `uri` (containing the filename), do this. 2. Set the `jsx` compiler option to avoid error annotations Before: <img width="441" alt="Screenshot 2024-12-13 at 15 11 33" src="https://github.com/user-attachments/assets/dac245a7-e80f-4249-8e09-13124b03d12a" /> After: <img width="441" alt="Screenshot 2024-12-13 at 15 10 46" src="https://github.com/user-attachments/assets/726ad712-d116-438d-88da-bc40534b6860" />
* Fix various UI bugs (#32821)wxiaoguang2024-12-131-3/+2
|
* Fix bug of branch/tag selector in the issue sidebar (#32744)hiifong2024-12-131-0/+1
| | | | | | | Fix: #32731 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Detect whether action view branch was deleted (#32764)Lunny Xiao2024-12-121-1/+2
| | | | | Fix #32761 ![图片](https://github.com/user-attachments/assets/a5a7eef8-0fea-4242-b199-1b0b73d9bbdb)
* Add "n commits" link to contributors in contributors graph page (#32799)Chai-Shi2024-12-122-4/+24
| | | | | | | | | | | | Fixes Issue #29365 and inherit PR #29429 - I should extend the #29429 fork but the fork is not synced, so I created another PR. - Use `silenced` class for the link, as in #29847 --------- Co-authored-by: Ben Chang <ben_chang@htc.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix "unicode escape" JS error (#32806)wxiaoguang2024-12-121-10/+11
| | | | | | | | | | | | | | | | | | | | | <details> ![image](https://github.com/user-attachments/assets/98aef2fb-791e-4b4a-b2ac-e880f8a52040) ![image](https://github.com/user-attachments/assets/532673ae-c4cf-4d84-a5c6-93e6eacd341c) ![image](https://github.com/user-attachments/assets/2a241a3d-b7f6-44ca-89d9-9d68386fbf3e) ![image](https://github.com/user-attachments/assets/1251e43d-41f2-42d1-a23b-3182e3812c3d) </details> --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix JS error when dropping a file to a editor without dropzone (#32804)wxiaoguang2024-12-121-0/+1
| | | `dropzoneEl` may not exist
* Fix clone panel js error (#32798)wxiaoguang2024-12-121-3/+3
| | | side effect of jquery removal, fix #32797
* Fix repo home file list (#32788)wxiaoguang2024-12-112-33/+31
| | | | | | | 1. use grid instead of table, completely drop "ui table" from that list 2. move some "commit sign" related styles into a new file by the way (no change) because I need to figure out where `#repo-files-table` is used. 3. move legacy "branch/tag selector" related code into repo-legacy.ts, now there are 13 `import $` files left.
* Rearrange Clone Panel (#31142)Blender Defender2024-12-116-49/+92
| | | | | | | | | | | | | Rearrange the clone panel to use less horizontal space. The following changes have been made to achieve this: - Moved everything into the dropdown menu - Moved the HTTPS/SSH Switch to a separate line - Moved the "Clone in VS Code"-Button up and added a divider - Named the dropdown button "Code", added appropriate icon --------- Co-authored-by: techknowlogick <techknowlogick@gitea.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix a number of typescript errors (#32773)silverwind2024-12-1119-80/+81
| | | | | | | Fixes 96 typescript errors. Behaviour changes are commented below. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add label/author/assignee filters to the user/org home issue list (#32779)wxiaoguang2024-12-111-21/+27
| | | | | | | | | | Replace #26661, fix #25979 Not perfect, but usable and much better than before. Since it is quite complex, I am not quite sure whether there would be any regression, if any, I will fix in first time. I have tested the related pages many times: issue list, milestone issue list, project view, user issue list, org issue list.
* Change typescript `module` to `nodenext` (#32757)silverwind2024-12-101-1/+1
| | | | | | | | | | | | | | | | | Typescript 5.7 changed semantics around JSON imports and `nodenext` is now [treated differently](https://devblogs.microsoft.com/typescript/announcing-typescript-5-7-beta/#validated-json-imports-in---module-nodenext) than `node16` for JSON imports and it requires the import attribute, so change the value to that and add the attribute to eliminate this typescript error. [`moduleResolution`](https://www.typescriptlang.org/tsconfig/#moduleResolution) is treated as an alias when `module` is `nodenext`, so we don't need to specify it. Also see https://github.com/microsoft/TypeScript/issues/60589. It appears the next Typescript release will fix this for `node16`, but I guess it'll still be good to switch to `nodenext`.
* Refactor issue filter (labels, poster, assignee) (#32771)wxiaoguang2024-12-103-77/+103
| | | | | | | | | | | | Rewrite a lot of legacy strange code, remove duplicate code, remove jquery, and make these filters reusable. Let's forget the old code, new code affects: * issue list open/close switch * issue list filter (label, author, assignee) * milestone list open/close switch * milestone issue list filter (label, author, assignee) * project view (label, assignee)
* Make RepoActionView.vue support `##[group]` (#32770)wxiaoguang2024-12-101-11/+36
|
* Make Monaco theme follow browser, fully type codeeditor.ts (#32756)silverwind2024-12-091-34/+79
| | | | | | | | 1. Monaco's theme now follows changes in dark/light mode setting, this works via [`MediaQueryList`](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList)'s [change event](https://developer.mozilla.org/en-US/docs/Web/API/MediaQueryList/change_event). 2. Fully type the file, it now passes typescript strict mode.
* Fix duplicate dropdown dividers (#32760)wxiaoguang2024-12-095-30/+167
| | | | | | | | Fix #27466 The problem is that any item in the menu could be hidden, pure CSS won't work, and dropdown's builtin "hideDividers" doesn't work with our "scope dividers". The newly introduced "archived" label makes the dividers regression more.
* Refactor issue list (#32755)wxiaoguang2024-12-081-57/+54
| | | | | 1. add backend support for filtering "poster" and "assignee" * due to the limits, there is no frontend support at the moment 2. rewrite TS code without jquery, now there are 14 jQuery files left:
* fix: render job title as commit message (#32748)metiftikci2024-12-081-3/+3
| | | | | | | resolves #32724 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix typescript errors in Vue files, fix regression in "Recent Commits" chart ↵silverwind2024-12-086-37/+59
| | | | | | | | | | | (#32649) - Fix all typescript errors in `.vue` files - Fix regression from https://github.com/go-gitea/gitea/pull/32329 where "Recent Commits" chart would not render. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor LabelEdit (#32752)wxiaoguang2024-12-083-78/+63
| | | | | | | | | | | And fix a regression: https://github.com/go-gitea/gitea/pull/30053#discussion_r1874405470 Major changes: * rewrite without jquery * remove the "delete modal", using "link-action" is good enough * merge "new modal" and "edit modal"
* GitHub like repo home page (#32213)yp053272024-12-062-32/+26
| | | | | | | Move some components (description, license, release, language stats) to sidebar --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor RepoActionView.vue, add `::group::` support (#32713)wxiaoguang2024-12-061-100/+111
| | | | | | | 1. make it able to "force reload", then the previous pending request won't block the new request 2. make it support `::group::` 3. add some TS types (but there are still many variables untyped, this PR is large enough, the remaining types could be added in the future)
* Issue time estimate, meaningful time tracking (#23113)Illya Marchenko2024-12-052-33/+0
| | | | | | | | | | | | | Redesign the time tracker side bar, and add "time estimate" support (in "1d 2m" format) Closes #23112 --------- Co-authored-by: stuzer05 <stuzer05@gmail.com> Co-authored-by: Yarden Shoham <hrsi88@gmail.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: 6543 <6543@obermui.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix file editor & preview (#32706)wxiaoguang2024-12-044-50/+43
| | | | | | Fix a regression caused by jQuery removal (`renderPreviewPanelContent`) And simplify the file editor, it doesn't need to be that complex. And remove jQuery code.
* Refactor markdown editor and use it for milestone description editor (#32688)wxiaoguang2024-12-047-49/+54
| | | | | | | | | | Refactor markdown editor to clarify its "preview" behavior and remove jQuery code. Close #15045 --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix word overflow in file search page (#32695)yp053272024-12-031-0/+1
|
* Add "View all branches/tags" entry to Branch Selector (#32653)Kerwin Bryant2024-12-021-0/+8
| | | | | | | ![image](https://github.com/user-attachments/assets/7b62a38f-36d5-452a-8a97-204842c68b2e) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>