aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/features
Commit message (Collapse)AuthorAgeFilesLines
* Improve project & label color picker and image scroll (#34971)HEADmainwxiaoguang56 min.2-15/+23
| | | | Fix #34609 Fix #34967
* Refactor "delete-button" to "link-action" (#34962)wxiaoguang25 hours1-2/+3
|
* Refactor frontend unique id & comment (#34958)wxiaoguang25 hours2-10/+8
| | | | | | | * 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)wxiaoguang2 days1-107/+36
| | | fix #34946
* Improve html escape (#34911)wxiaoguang5 days12-43/+45
| | | drop "escape-goat"
* Fix PR toggle WIP (#34920)wxiaoguang5 days1-13/+9
| | | | | | | Fix #34919 --------- Signed-off-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix modal + form abuse (#34921)wxiaoguang5 days2-14/+15
| | | | | | | 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 Bryant6 days2-7/+83
| | | | | | | Fix #34775 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Improve tags list page (#34898)wxiaoguang7 days2-26/+51
|
* Fix project column edit (#34890)wxiaoguang8 days1-1/+2
| | | Fix #34888
* fix(issue): Replace stopwatch toggle with explicit start/stop actions (#34818)Junsik Kong12 days1-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>
* 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-211-2/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | # 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
* 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>
* 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
* 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>
* Fix line-button issue after file selection in file tree (#34574)Kerwin Bryant2025-06-021-3/+10
| | | | | | | | 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>
* 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-083-11/+12
| | | | | | | | | | | | | | | | 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>
* Grey out expired artifact on Artifacts list (#34314)NorthRealm2025-05-051-0/+1
| | | | | | | | | | | Grey out expired artifact on Artifacts list. ![1](https://github.com/user-attachments/assets/79c00e39-29f5-4264-b7b2-7ed638ab71c1) ![2](https://github.com/user-attachments/assets/686b745f-d6d7-4921-8e1b-3472ac8b6c17) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix some dropdown problems on the issue sidebar (#34308)wxiaoguang2025-04-302-12/+7
| | | Also fix #34300
* Option to delay conflict checking of old pull requests until page view (#27779)Brecht Van Lommel2025-04-245-74/+135
| | | | | | | | | | | | | | | | | | | | | | `[repository.pull-request] DELAY_CHECK_FOR_INACTIVE_DAYS` is a new setting to delay the mergeable check for pull requests that have been inactive for the specified number of days. This avoids potentially long delays for big repositories with many pull requests. and reduces system load overall when there are many repositories or pull requests. When viewing the PR, checking will start immediately and the PR merge box will automatically reload when complete. Accessing the PR through the API will also start checking immediately. The default value of `7` provides a balance between system load, and keeping behavior similar to what it was before both for users and API access. With `0` all conflict checking will be delayed, while `-1` always checks immediately to restore the previous behavior. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix various trivial frontend problems (#34263)wxiaoguang2025-04-242-2/+2
| | | | | | | | | | 1. Fix #20606 2. Fix #34246 3. Fix missing spaces, fix misspells, no visual change. 4. Fix missing "not-mobile", fix #34265 --------- Co-authored-by: silverwind <me@silverwind.io>
* Add fullscreen mode as a more efficient operation way to view projects (#34081)Kerwin Bryant2025-04-231-3/+21
| | | | | | | Maybe fix #33482, maybe fix #34015 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix various UI problems (#34243)wxiaoguang2025-04-191-6/+2
| | | Also fix #34242
* Optimize the calling code of queryElems (#34235)Kerwin Bryant2025-04-195-14/+7
|
* Fix: quoted replies incorrectly render user input as part of the quote (#34216)Hyungsub (Danny) Kim2025-04-161-1/+1
| | | | | | | Updated the quote insertion logic so that it adds one more line break (`\n`) work like Github. This way, the cursor lands on a new line and the user's reply is no longer interpreted as part of the quote. Fixes #34177
* Mark parent directory as viewed when all files are viewed (#33958)Kerwin Bryant2025-04-152-7/+4
| | | | | | | | Fix #25644 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* feat: Add sorting by exclusive labels (issue priority) (#33206)Thomas E Lackey2025-04-101-0/+10
| | | | | | | | | | | | | Fix #2616 This PR adds a new sort option for exclusive labels. For exclusive labels, a new property is exposed called "order", while in the UI options are populated automatically in the `Sort` column (see screenshot below) for each exclusive label scope. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* [Fix] Resolve the problem of commit_statuses not being loaded at the top - ↵Kerwin Bryant2025-03-311-8/+8
| | | | | right when switching files from the file tree (#34079) Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add toggleClass function in dom.ts (#34063)Kerwin Bryant2025-03-301-13/+5
| | | | | | | | This PR adds a toggleClass function in dom.ts, aiming to implement DOM class toggling functionality. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* fix org repo creation being limited by user limits (#34030)TheFox0x72025-03-271-7/+21
| | | | | | | | | | | 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 some migration and repo name problems (#33986)wxiaoguang2025-03-244-8/+51
| | | | | | 1. Ignore empty inputs in `UnmarshalHandleDoubleEncode` 2. Ignore non-existing `stateEvent.User` in gitlab migration 3. Enable `release` and `wiki` units when they are selected in migration 4. Sanitize repo name for migration and new repo
* Simplify secure context check (#33906)silverwind2025-03-161-7/+4
| | | | As discussed in https://github.com/go-gitea/gitea/pull/33820/files#r1997532169.
* Update JS and PY deps, misc tweaks (#33903)silverwind2025-03-161-2/+4
| | | | | | | | | - Update all updateable dependencies - Add a few more unupgradable ones to updates blocklist - Adapt to breaking changes - Update to typescript 5.8, enable `erasableSyntaxOnly` which necessitated a change because of forbidden syntax - Misc cleanups - Tested htmx, easymde, swagger, chart.js
* Add file tree to file view page (#32721)Kerwin Bryant2025-03-151-0/+37
| | | | | | | | | | | 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>
* Fix various Fomantic UI and htmx problems (#33851)wxiaoguang2025-03-111-1/+3
| | | Also fix #31328, fix #33854
* Drop fomantic build (#33845)wxiaoguang2025-03-112-2/+2
| | | | | | | | | | | | We would never update or build fomantic again, we have forked it as a private library long time ago. So just put the JS and CSS files in "fomantic/build" into git. And use "import" to use them. Remove "form.js", rewrite "tab" component. All source code is from official Fomantic UI build. Will apply patches in separate PRs.
* Do not show passkey on http sites (#33820)wxiaoguang2025-03-071-1/+10
| | | Fix #33615
* Update TypeScript types (#33799)Kerwin Bryant2025-03-051-1/+1
| | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor repo-issue.ts (#33784)wxiaoguang2025-03-042-135/+108
| | | And remove jQuery
* Refactor repo-settings.ts (#33785)wxiaoguang2025-03-051-39/+39
| | | and remove jQuery
* Refactor admin/common.ts (#33788)wxiaoguang2025-03-041-87/+112
| | | Only remove jQuery
* Refactor initRepoBranchTagSelector to use new init framework (#33776)Kerwin Bryant2025-03-031-4/+5
| | | | | | | | 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-25/+27
| | | | | | | | | | 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>