aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/components
Commit message (Collapse)AuthorAgeFilesLines
* Improve img lazy loading (#34804)wxiaoguang30 hours1-1/+1
| | | Related #32051 and #13526
* Add repo file tree item link behavior (#34730)bytedream3 days4-105/+81
| | | | | | | | | | 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>
* Hide href attribute of a tag if there is no target_url (#34556)Lunny Xiao12 days1-1/+1
| | | Relate #34450
* Update JS deps, regenerate SVGs (#34640)silverwind2025-06-071-1/+1
| | | Result of `make update-js svg`.
* 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 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>
* Grey out expired artifact on Artifacts list (#34314)NorthRealm2025-05-051-12/+19
| | | | | | | | | | | 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>
* support the open-icon of folder (#34168)Kerwin Bryant2025-04-281-12/+4
| | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix button alignments (#34276)Kerwin Bryant2025-04-272-2/+3
| | | | | | | | Continue with #34206. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
* Add fullscreen mode as a more efficient operation way to view projects (#34081)Kerwin Bryant2025-04-231-15/+2
| | | | | | | Maybe fix #33482, maybe fix #34015 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix various misalignments and overflows (#34227)Kerwin Bryant2025-04-171-2/+2
| | | | | --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix button alignments and remove unnecessary styles (#34206)Kerwin Bryant2025-04-162-3/+3
| | | | Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Mark parent directory as viewed when all files are viewed (#33958)Kerwin Bryant2025-04-152-41/+34
| | | | | | | | Fix #25644 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Update RepoContributors.vue (#34194)Kerwin Bryant2025-04-141-2/+2
|
* Fix vertical centering of file tree icons and use entryIcon for ↵Kerwin Bryant2025-04-096-22/+13
| | | | | | | | | | | | | | | | | | | | | | submodules/symlinks (#34137) In the file tree, the icons are not vertically centered, which affects the overall visual consistency. Currently, the icons of submodules and symlinks do not adopt the value of entryIcon, resulting in inconsistent icon display. before: ![3000-gogitea-gitea-y4ulxr46c4k ws-us118 gitpod io_test_test gitea_src_branch_main_README md (3)](https://github.com/user-attachments/assets/d521b89f-909a-43f9-8f39-787b0243b159) after: ![3000-gogitea-gitea-y4ulxr46c4k ws-us118 gitpod io_test_test gitea_src_branch_main_README md (2)](https://github.com/user-attachments/assets/4866807f-c890-4709-b595-7086011e5231) --------- Co-authored-by: silverwind <me@silverwind.io>
* Keep file tree view icons consistent with icon theme (#33921)Kerwin Bryant2025-04-062-2/+17
| | | | | | | | | | | | | | | | | Fix #33914 before: ![3000-gogitea-gitea-y4ulxr46c4k ws-us118 gitpod io_test_test gitea_src_branch_main_ gitmodules](https://github.com/user-attachments/assets/ca50eeff-cc44-4041-b01f-c0c5bdd3b6aa) after: ![3000-gogitea-gitea-y4ulxr46c4k ws-us118 gitpod io_test_test gitea_src_branch_main_README md](https://github.com/user-attachments/assets/3b87fdbd-81d0-4831-8a74-4dbfcd5b6d91) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Use `overflow-wrap: anywhere` to replace `word-break: break-all` (#34126)wxiaoguang2025-04-061-1/+0
|
* Refactor dropdown ellipsis (#34123)wxiaoguang2025-04-051-1/+1
| | | Remove legacy `truncated-item-container` and `truncated-item-name`.
* Add file tree to file view page (#32721)Kerwin Bryant2025-03-152-0/+218
| | | | | | | | | | | 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>
* Use `git diff-tree` for `DiffFileTree` on diff pages (#33514)Alexander McRae2025-02-283-163/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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>
* Improve "generate new access token" form (#33730)Guillaume2025-02-271-81/+0
| | | | | | | | | | | | | | | | | | | | | Fix: https://github.com/go-gitea/gitea/issues/33519 As discussed in [PR #33614](https://github.com/go-gitea/gitea/pull/33614), the ScopedAccessTokenSelector Vue component is not particularly useful. This PR removes the component and reverts to using HTML templates. It also introduces some (hopefully) useful refactoring. The Vue component was causing the UX bug reported in the linked issue. Required form fields are now properly working, as expected (see screenshot). ![Screenshot from 2025-02-25 22-00-28](https://github.com/user-attachments/assets/41167854-0718-48b0-a3ee-75ca3a7b8b20) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Always show the "rerun" button for action jobs (#33692)wxiaoguang2025-02-241-9/+3
| | | And improve the mock code.
* Fix typo in HTML attribute (#33599)silverwind2025-02-141-1/+1
|
* Optimize the dashboard (#32990)Kerwin Bryant2025-02-111-6/+29
| | | | | | | | | | | | | | | | | | | | | before: ![image](https://github.com/user-attachments/assets/d0b432e4-a521-4540-a489-d18b9c265674) after: ![image](https://github.com/user-attachments/assets/dbb8b387-d150-41e2-b12b-f9d8450e36d7) ----- ![image](https://github.com/user-attachments/assets/40dcd71e-344b-4043-9811-77227c71aed9) ----- Optimize the dashboard by adding welcoming messages or quick action entry points (such as adding a new repository or organization) to ensure that new users are not greeted by a blank page upon logging in. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Remove "class-name" from svg icon (#33540)wxiaoguang2025-02-093-18/+18
| | | Only use "class" attribute
* Enable Typescript `noImplicitAny` (#33322)silverwind2025-01-2211-69/+98
| | | | | | | Enable `noImplicitAny` and fix all issues. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Enable Typescript `noImplicitThis` (#33250)silverwind2025-01-1610-153/+116
| | | | | | | | | | | | - Enable https://www.typescriptlang.org/tsconfig/#noImplicitThis - Wrap Vue Template-Syntax SFCs in [`defineComponent`](https://vuejs.org/api/general#definecomponent) which makes type inference and linter work better - Move `createApp` calls outside the SFCs into separate files - Use [`PropType`](https://vuejs.org/api/utility-types#proptype-t) where appropriate - Some top-level component properties changed order as dictated by the linter - Fix all tsc and lint issues that popped up during these refactors
* Automerge supports deleting branch automatically after merging (#32343)Lunny Xiao2025-01-101-1/+1
| | | | | | | | | | | | Resolve #32341 ~Depends on #27151~ - [x] It will display a checkbox of deleting the head branch on the pull request view page when starting an auto-merge task. - [x] Add permission check before deleting the branch - [x] Add delete branch comment for those closing pull requests because of head branch or base branch was deleted. - [x] Merge `RetargetChildrenOnMerge` and `AddDeletePRBranchComment` into `service.DeleteBranch`.
* add submodule diff links (#33097)Rowan Bohde2025-01-081-1/+9
| | | | | | | | | | | | This adds links to submodules in diffs, similar to the existing link when viewing a repo at a specific commit. It does this by expanding diff parsing to recognize changes to submodules, and find the specific refs that are added, deleted or changed. Related #25888 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* 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
* 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-221-3/+2
| | | | | | | | 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`.
* Move RepoBranchTagSelector init outside the SFC (#32890)silverwind2024-12-181-45/+30
| | | | | 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-162-7/+10
| | | fix #32857
* 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-121-4/+23
| | | | | | | | | | | | 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>
* Make RepoActionView.vue support `##[group]` (#32770)wxiaoguang2024-12-101-11/+36
|
* 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-085-36/+54
| | | | | | | | | | | (#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 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)
* 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>
* Refactor RepoBranchTagSelector (#32681)wxiaoguang2024-12-021-206/+175
|
* Improve diff file tree (#32658)silverwind2024-11-281-2/+6
| | | | | | | | - Unfolded directories now show a "open" icon - Prevent accidential text selection while toggling directories - Increase vertical item padding from 3px to 6px <img width="257" alt="image" src="https://github.com/user-attachments/assets/d5372306-a666-4732-827e-3ddeee3c711e">
* Fix some places which doesn't repsect org full name setting (#32243)Lunny Xiao2024-11-181-1/+1
| | | Partially fix #31345
* Remove jQuery import from some files (#32512)wxiaoguang2024-11-152-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Many files do not directly depend on jQuery now. To clarify the usage: use `fomanticQuery` to operate Fomantic components. Then developers could focus on removing the remaining jQuery usages by searching `import $` globally. 21 files now: ``` ./components/RepoBranchTagSelector.vue:3:import $ from 'jquery'; ./features/admin/common.ts:1:import $ from 'jquery'; ./features/admin/emails.ts:1:import $ from 'jquery'; ./features/common-button.ts:1:import $ from 'jquery'; ./features/comp/ComboMarkdownEditor.ts:3:import $ from 'jquery'; (I am working on it, there will be a new PR) ./features/comp/LabelEdit.ts:1:import $ from 'jquery'; ./features/notification.ts:1:import $ from 'jquery'; ./features/org-team.ts:1:import $ from 'jquery'; ./features/repo-code.ts:1:import $ from 'jquery'; ./features/repo-common.ts:1:import $ from 'jquery'; ./features/repo-diff.ts:1:import $ from 'jquery'; ./features/repo-editor.ts:1:import $ from 'jquery'; ./features/repo-issue-content.ts:1:import $ from 'jquery'; ./features/repo-issue-list.ts:1:import $ from 'jquery'; ./features/repo-issue-sidebar.ts:1:import $ from 'jquery'; ./features/repo-issue.ts:1:import $ from 'jquery'; ./features/repo-legacy.ts:1:import $ from 'jquery'; ./features/repo-new.ts:1:import $ from 'jquery'; ./features/repo-projects.ts:1:import $ from 'jquery'; ./features/repo-settings.ts:1:import $ from 'jquery'; ./features/repo-template.ts:1:import $ from 'jquery'; ```
* Fix a number of typescript issues (#32308)silverwind2024-10-311-6/+6
| | | | | | | | | | | | | | - Prefer [window.location.assign](https://developer.mozilla.org/en-US/docs/Web/API/Location/assign) over assigning to [window.location](https://developer.mozilla.org/en-US/docs/Web/API/Window/location) which typescript does not like. This works in all browsers including PaleMoon. - Fix all typescript issues in `web_src/js/webcomponents`, no behaviour changes. - ~~Workaround bug in `@typescript-eslint/no-unnecessary-type-assertion` rule.~~ - Omit vendored file from type checks. - `tsc` error count is reduce by 53 with these changes.
* Fix suggestions for issues (#32380)wxiaoguang2024-10-301-3/+4
|