aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js
Commit message (Collapse)AuthorAgeFilesLines
* Fix bug when review pull request commits (#35192)Lunny Xiao5 days1-18/+25
| | | | | | | | | | | | | | The commit range in the UI follows a half-open, half-closed convention: (,]. When reviewing a range of commits, the beforeCommitID should be set to the commit immediately preceding the first selected commit. For single-commit reviews, we must identify and use the previous commit of that specific commit. The endpoint ViewPullFilesStartingFromCommit is currently unused and can be safely removed. Fix #35157 Replace #35184 Partially extract from #35077
* Update JS and PY deps (#35191)silverwind7 days1-2/+2
| | | | | | - Updated all dependencies - Fixed new CSS lint errors, specifically tested the RepoActivityTopAuthors.vue change - Regenerated SVGs
* Change function description comments to tsdoc style (#35185)silverwind7 days8-35/+35
| | | | | | | | | | | | | | | 1. change function comments to the minimal [tsdoc](https://tsdoc.org/) style. This has the benefit of making editors show the doc string in tooltips when the function is hovered: <img width="521" height="110" alt="image" src="https://github.com/user-attachments/assets/b966f4f1-8239-433a-a456-5bd5c05d69ef" /> 2. disable eslint `multiline-comment-style` as it conflicts with tsdoc. --------- Signed-off-by: silverwind <me@silverwind.io>
* Fix migrate input box bug (#35166)Lunny Xiao12 days1-2/+6
| | | | Fix #35162
* Only hide dropzone when no files have been uploaded (#35156)Bart van der Braak13 days1-1/+6
| | | | | | | | | | | Instead of always hiding the dropzone when it's not active: - hide it when when there are no uploaded files and it becomes inactive - don't hide it when there are uploaded files Fixes #35125 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix form property assignment edge case (#35073)wxiaoguang2025-07-142-8/+27
| | | | | | | "form" has an edge case: its `<input name=action>` element overwrites the `action` property, we can only set attribute. This PR makes `assignElementProperty` can handle such case, and add more tests
* Refactor OpenIDConnect to support SSH/FullName sync (#34978)wxiaoguang2025-07-101-0/+3
| | | | | * Fix #26585 * Fix #28327 * Fix #34932
* Tweak eslint config, fix new issues (#35019)silverwind2025-07-102-2/+2
| | | | | | | 1. Enable [`@typescript-eslint/no-unnecessary-type-conversion`](https://typescript-eslint.io/rules/no-unnecessary-type-conversion/), I think the two cases that were hit are safe cases. 2. Disable `no-new-func`, `@typescript-eslint/no-implied-eval` does the same but better.
* Partially refresh notifications list (#35010)Anbraten2025-07-102-36/+9
| | | | | | | | | This PR prevents full reloads for the notifications list when changing a notifications status (read, unread, pinned). --------- Co-authored-by: Anton Bracke <anton.bracke@fastleansmart.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix various problems (#35012)wxiaoguang2025-07-096-19/+33
| | | | | * Fix #35011 * Fix incorrect log message for "Protocol" * Remove unnecessary styles, fix "comment-header" wrap, fix label height
* Tweak placement of diff file menu (#34999)silverwind2025-07-091-1/+8
| | | | | | | | | | | | | | | Small tweak for better visual placement. Before: <img width="175" alt="Screenshot 2025-07-08 at 18 16 51" src="https://github.com/user-attachments/assets/766cfc82-1382-4aaa-8e99-c254665a0480" /> After: <img width="134" alt="Screenshot 2025-07-08 at 18 16 34" src="https://github.com/user-attachments/assets/2653dfcc-29be-4922-a4de-3257db7b66fd" /> Placement matches the "..." button above.
* Refactor time tracker UI (#34983)wxiaoguang2025-07-082-0/+3
| | | | | | | | | | Although we decided to "reduce the button amount" on the side bar, not only one user reported that the "time tracker dropdown" is not easy to use. So the best we can do at the moment is: move the buttons to the sidebar again. Fix #34979
* Improve project & label color picker and image scroll (#34971)wxiaoguang2025-07-062-15/+23
| | | | Fix #34609 Fix #34967
* Merge index.js (#34963)wxiaoguang2025-07-066-196/+210
| | | Fix #34960
* Refactor "delete-button" to "link-action" (#34962)wxiaoguang2025-07-061-2/+3
|
* Refactor frontend unique id & comment (#34958)wxiaoguang2025-07-057-35/+30
| | | | | | | * there is no bug of the "unique element id", but duplicate code, this PR just merges the duplicate "element id" logic and move the function from "fomaintic" to "dom" * improve comments * make "git commit graph" page update pagination links correctly
* Fix git graph page (#34948)wxiaoguang2025-07-041-107/+36
| | | fix #34946
* Improve html escape (#34911)wxiaoguang2025-07-0122-53/+101
| | | drop "escape-goat"
* Fix PR toggle WIP (#34920)wxiaoguang2025-07-011-13/+9
| | | | | | | Fix #34919 --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix modal + form abuse (#34921)wxiaoguang2025-07-013-16/+41
| | | | | | | See the comment. And due to the abuse, there is a regression: when the modal is hidden, the form will be reset and it can't submit. This PR fixes all problems: keep the modal with form open, and add "loading" indicator.
* Add support for 3D/CAD file formats preview (#34794)Kerwin Bryant2025-06-307-26/+176
| | | | | | | Fix #34775 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve tags list page (#34898)wxiaoguang2025-06-302-26/+51
|
* Fix project column edit (#34890)wxiaoguang2025-06-281-1/+2
| | | Fix #34888
* Fix some log and UI problems (#34863)wxiaoguang2025-06-261-7/+12
| | | | | Remove the misleading error log, fix #34738 Make the "search" input auto-focused, fix #34807
* Update `uint8-to-base64`, remove type stub (#34844)silverwind2025-06-251-5/+0
| | | | | The module now ships type definitions so remove our type stub. Ref: https://github.com/WebReflection/uint8-to-base64/pull/4
* fix(issue): Replace stopwatch toggle with explicit start/stop actions (#34818)Junsik Kong2025-06-251-1/+1
| | | | | | | | | | | | | | | | This PR fixes a state de-synchronization bug with the issue stopwatch, it resolves the issue by replacing the ambiguous `/toggle` endpoint with two explicit endpoints: `/start` and `/stop`. - The "Start timer" button now exclusively calls the `/start` endpoint. - The "Stop timer" button now exclusively calls the `/stop` endpoint. This ensures the user's intent is clearly communicated to the server, eliminating the state inconsistency and fixing the bug. --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Use `shallowRef` instead of `ref` in `.vue` files where possible (#34813)Kilisei2025-06-229-51/+51
| | | | | | | | | | | This PR improves some `.vue` components by using `shallowRef instead of ref`, which `should improve performance`. It's probably not significant, but it's an improvement because Vue no longer deep watches the ref (shallowRef). Also i used `useTemplateRef` instead of `ref`. --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Edit file workflow for creating a fork and proposing changes (#34240)Brecht Van Lommel2025-06-221-14/+20
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When viewing a file that the user can't edit because they can't write to the branch, the new, upload, patch, edit and delete functionality is no longer disabled. If no user fork of the repository exists, there is now a page to create one. It will automatically create a fork with a single branch matching the one being viewed, and a unique repository name will be automatically picked. When a fork exists, but it's archived, a mirror or the user can't write code to it, there will instead be a message explaining the situation. If the usable fork exists, a message will appear at the top of the edit page explaining that the changes will be applied to a branch in the fork. The base repository branch will be pushed to a new branch to the fork, and then the edits will be applied on top. The suggestion to fork happens when accessing /_edit/, so that for example online documentation can have an "edit this page" link to the base repository that does the right thing. Also includes changes to properly report errors when trying to commit to a new branch that is protected, and when trying to commit to an existing branch when choosing the new branch option. Resolves #9017, #20882 --------- Co-authored-by: Brecht Van Lommel <brecht@blender.org> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add post-installation redirect based on admin account status (#34493)Kerwin Bryant2025-06-211-1/+1
| | | | | | | | | | | | | | | | This PR adds a feature to direct users to appropriate pages after system installation: - If no admin credentials were provided during installation, redirect to the registration page with a prominent notice about creating the first administrative account - If admin credentials were already set, redirect directly to the login page ![4d396ad132d9b57fc4f45a62117177f1](https://github.com/user-attachments/assets/3a5d8700-9194-4d3b-a862-e64c8c347932) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Rework delete org and rename org UI (#34762)Lunny Xiao2025-06-214-10/+40
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # What's the problem of the original implementation Renaming organization will mix with organization's information change make the operation difficult to keep consistent. This PR created a danger zone like what's repository setting. It also moved organization's `rename` and `delete` operations to this zone. The original updating repository will not change the name any more. This is also a step to extract the `updaterepository` function completely. Before: ![image](https://github.com/user-attachments/assets/d097dfdf-07be-4d79-8fcf-e78822515575) ![image](https://github.com/user-attachments/assets/42ee832c-cb44-41ec-9fe3-92a1c94747d2) After: ![image](https://github.com/user-attachments/assets/f7700ed7-f104-4302-a924-09e118f24be3) ![image](https://github.com/user-attachments/assets/4c49952a-578e-4d14-bd01-4a68c9e02412) ![image](https://github.com/user-attachments/assets/814829d3-00fe-4e87-ae05-625c129170d2) ![image](https://github.com/user-attachments/assets/b067b263-c909-4b48-b23c-73481c32d350) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor editor (#34780)wxiaoguang2025-06-212-16/+14
| | | A complete rewrite
* Improve img lazy loading (#34804)wxiaoguang2025-06-211-1/+1
| | | Related #32051 and #13526
* Add repo file tree item link behavior (#34730)bytedream2025-06-205-105/+86
| | | | | | | | | | Converts the repo file tree items into `<a>` elements to have default link behavior. Dynamic content load is still done when no special key is pressed while clicking on an item. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix readme path and markdown link paste (#34755)wxiaoguang2025-06-181-1/+1
|
* fix: prevent double markdown link brackets when pasting URL (#34745)MaxWebZ2025-06-172-7/+26
| | | | | | | | | | | | | | When adding a link using the "Add a link" button in comment editor, pasting a URL resulted in incorrect Markdown formatting (double brackets) instead of replacing the placeholder text. This fix adds a context check to prevent creating a new markdown link when we're already inside an existing one. Fixes #34740 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix JS error for "select" dropdown (#34743)wxiaoguang2025-06-171-2/+2
| | | Regression of recent dropdown filter change.
* Allow renaming/moving binary/LFS files in the UI (#34350)bytedream2025-06-161-23/+24
| | | | | | | | | | | | | | | | | | | Adds the ability to rename/move binary files like binary blobs or images and files that are too large in the web ui. This was purposed in #24722, along with the ability edit images via an upload of a new image, which I didn't implement here (could be done in a separate PR). Binary file content: ![binary](https://github.com/user-attachments/assets/61d9ff71-25d3-4832-9288-452cdefc7283) File too large: ![toolarge](https://github.com/user-attachments/assets/3b42dbd0-e76a-4c3c-92d2-52ebffedea64) GitHub does the same (I've copied the text from there): ![gh](https://github.com/user-attachments/assets/e1499813-fb71-4544-9d58-086046a5f13e)
* Fix various problems (#34708)wxiaoguang2025-06-122-6/+10
| | | | | * Fix #34707 * Fix dropdown filter handling * Fix #27014
* Hide href attribute of a tag if there is no target_url (#34556)Lunny Xiao2025-06-101-1/+1
| | | Relate #34450
* Fix footnote jump behavior on the issue page. (#34621)charles2025-06-091-11/+14
| | | | | | | | | | Close #34511 Close #34590 Add comment ID to the footnote item's id attribute to ensure uniqueness. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Update JS deps, regenerate SVGs (#34640)silverwind2025-06-071-1/+1
| | | Result of `make update-js svg`.
* Validate hex colors when creating/editing labels (#34623)Kemal Zebari2025-06-071-1/+1
| | | | | | | | Resolves #34618. --------- Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* fixed incorrect page navigation with up and down arrow on last item of ↵metiftikci2025-06-031-7/+9
| | | | | | | dashboard repos (#34570) Previously, pressing the down arrow key on the last item of a list would incorrectly load the latest page when not release key. This commit corrects the logic to ensure that the next page is loaded as intended.
* Fix some trivial problems (#34579)wxiaoguang2025-06-021-1/+2
|
* Fix line-button issue after file selection in file tree (#34574)Kerwin Bryant2025-06-022-10/+30
| | | | | | | | Fix the issue where the line-button fails to work after selecting a file from the file tree. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix actions skipped commit status indicator (#34507)badhezi2025-05-281-1/+2
| | | | | Addresses https://github.com/go-gitea/gitea/issues/34500 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix comment textarea scroll issue in Firefox (#34438)silverwind2025-05-131-0/+10
| | | | | | | | | | | | | | | | | | In the comment editor, there is a bug in Firefox where the scroll position unexpectedly moves up, which is annoying. This is not reproducible in Chrome and Safari. To reproduce here are some steps: - Go into an editable issue - Scroll page to bottom - Focus the textarea and press Return many times, causing the textarea to get a scrollbar - Scroll page to bottom again - Press Return once more - Page should not scroll up. This fixes the bug by adding a temporary margin, and I verified it works in all browsers. Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Merge and tweak markup editor expander CSS (#34409)silverwind2025-05-091-0/+1
| | | | | | | | | | | | | | | | | | | | | | | - Merge the CSS for the two expanders (text-expander-element and tribute.js) into one file - Fix overflow issues - Remove min-width - Various other tweaks like borders, colors, padding, gaps. text-expander: <img width="645" alt="Screenshot 2025-05-09 at 02 21 24" src="https://github.com/user-attachments/assets/33276dc4-38e8-45e1-8216-2a4baa9bc039" /> tribute: <img width="624" alt="Screenshot 2025-05-09 at 02 21 37" src="https://github.com/user-attachments/assets/91fbcd1a-9bfc-40fd-93f0-a05b4bd4c98d" /> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix autofocus behavior (#34397)wxiaoguang2025-05-085-41/+37
| | | | | | | | | | | | | | | | The "autofocus" was abused or misbehaved: 1. When users visit a page but they are not going to change a field, then the field shouldn't get "autofocus" * the "auth" / "user" page: in most cases, users do not want to change the names * see also the GitHub's "settings" page behavior. 2. There shouldn't be duplicate "autofocus" inputs in most cases, only the first one focuses 3. When a panel is shown, the "autofocus" should get focus * "add ssh key" panel This PR fixes all these problems and by the way remove duplicate "isElemHidden" function.
* Add a button editing action secret (#34348)NorthRealm2025-05-082-4/+33
| | | | | | | | Add a button editing action secret Closes #34190 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>