aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
Commit message (Collapse)AuthorAgeFilesLines
...
* Fix PR diff review form submit (#32596)wxiaoguang2024-11-214-70/+79
| | | | Fix #31622, there is a longstanding bug in #19612, it doesn't handle submit event, correctly.
* Fix some typescript issues (#32586)silverwind2024-11-2123-72/+88
| | | Fixes around 30 or so typescript errors. No runtime changes.
* Improve issue sidebar UI (#32587)wxiaoguang2024-11-212-10/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 1. remove duplicate dividers 2. align reviewer items 3. merge & remove unused CSS styles Before: <details> ![image](https://github.com/user-attachments/assets/1b3121ee-b5fa-4fe9-b0f2-344d96dc5fbc) ![image](https://github.com/user-attachments/assets/ba8b97e6-114d-488c-adee-48f6c7a3b580) </details> After: <details> ![image](https://github.com/user-attachments/assets/978eab3e-a5d7-4b68-90ce-079b61994d25) ![image](https://github.com/user-attachments/assets/a8b58a27-dd05-4c8d-be60-816439ce77c6) ![image](https://github.com/user-attachments/assets/b7e6a16c-bf98-4465-a805-9f4a642d366e) </details>
* make search box in issue sidebar dropdown list always show when scrolling ↵a10121127962024-11-211-0/+6
| | | | | | | | | (#32576) as title, replace #31597 after #32460 --------- Signed-off-by: a1012112796 <1012112796@qq.com>
* Fix some places which doesn't repsect org full name setting (#32243)Lunny Xiao2024-11-181-1/+1
| | | Partially fix #31345
* Fix large image overflow in comment page (#31740)charles2024-11-151-0/+1
| | | | | | | | | | | | | | | | | | | | | | Close #31709 52px is calculate by avatar size in templates\repo\issue\view_content\comments.tmpl ```html <img src="{{.Poster.AvatarLink $.Context}}" width="40" height="40"> ``` + ```css .ui.comments .comment > .avatar ~ .content { margin-left: 12px; } ``` ![圖片](https://github.com/user-attachments/assets/bf15f4d4-1574-46f6-9f5e-1fbdbf1a98b0) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add avif image file support (#32508)wxiaoguang2024-11-152-2/+2
| | | | | | | | | Most modern browsers support it now ` Update ALLOWED_TYPES #96 ` https://gitea.com/gitea/docs/pulls/96 --------- Co-authored-by: silverwind <me@silverwind.io>
* Remove jQuery import from some files (#32512)wxiaoguang2024-11-1511-24/+27
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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'; ```
* Refactor render system (#32492)wxiaoguang2024-11-142-6/+1
| | | | | | | | | | | | | | | | | | | There were too many patches to the Render system, it's really difficult to make further improvements. This PR clears the legacy problems and fix TODOs. 1. Rename `RenderContext.Type` to `RenderContext.MarkupType` to clarify its usage. 2. Use `ContentMode` to replace `meta["mode"]` and `IsWiki`, to clarify the rendering behaviors. 3. Use "wiki" mode instead of "mode=gfm + wiki=true" 4. Merge `renderByType` and `renderByFile` 5. Add more comments ---- The problem of "mode=document": in many cases it is not set, so many non-comment places use comment's hard line break incorrectly
* Fix a number of typescript issues (#32459)silverwind2024-11-1114-113/+109
| | | | | | | Fixes 69 typescript errors found in the `admin` and `markup` folders. --------- Co-authored-by: Giteabot <teabot@gitea.io>
* Refactor sidebar assignee&milestone&project selectors (#32465)wxiaoguang2024-11-114-281/+116
| | | | | | | | | | | | | | | | | | | Follow #32460 Now the code could be much clearer than before and easier to maintain. A lot of legacy code is removed. Manually tested. This PR is large enough, that fine tunes could be deferred to the future if there is no bug found or design problem. Screenshots: <details> ![image](https://github.com/user-attachments/assets/35f4ab7b-1bc0-4bad-a73c-a4569328303c) </details>
* Refactor sidebar label selector (#32460)wxiaoguang2024-11-109-55/+83
| | | Introduce `issueSidebarLabelsData` to handle all sidebar labels related data.
* Fix mermaid diagram height when initially hidden (#32457)silverwind2024-11-091-1/+12
| | | | | | | | | | | In a hidden iframe, `document.body.clientHeight` is not reliable. Use `IntersectionObserver` to detect the visibility change and update the height there. Fixes: https://github.com/go-gitea/gitea/issues/32392 <img width="885" alt="image" src="https://github.com/user-attachments/assets/a95ef6aa-27e7-443f-9d06-400ef27919ae">
* Add reviewers selection to new pull request (#32403)Calvin K2024-11-095-42/+110
| | | | | | | | | | Users could add reviewers when creating new PRs. --------- Co-authored-by: splitt3r <splitt3r@users.noreply.github.com> Co-authored-by: Sebastian Sauer <sauer.sebastian@gmail.com> Co-authored-by: bb-ben <70356237+bboerben@users.noreply.github.com> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix issue sidebar (#32455)wxiaoguang2024-11-091-17/+0
| | | | | | | | | | | | | | | | | | | | | Fix #32453 Major changes: * revert the `<div class="divider"></div>` in `templates/repo/issue/branch_selector_field.tmpl` (it was removed by mistake in ##32444) * remove incorrect `<div class="inline field">` in `templates/repo/issue/sidebar/allow_maintainer_edit.tmpl` * use `gt-ellipsis` to replace the "title" class in the dependency list, then `.repository .issue-content-right .ui.list .title` could be removed * remove the "relaxed" from dependency list, then there is no padding, then `.repository .issue-content-right .ui.list .dependency` could be removed (`white-space` doesn't have effect either because there is `gt-ellipsis`) * remove dead code `.repository .issue-content-right #deadlineForm input ` The fixed UI should be the same as before.
* Refactor language menu and dom utils (#32450)wxiaoguang2024-11-089-58/+66
| | | | | 1. Make `queryElem*` functions could correctly handle TS types 2. Remove some legacy jQuery $ calls (introduce fomanticQuery for Fomantic UI only) 3. Fix some TS typing problems
* Refactor issue page info (#32445)wxiaoguang2024-11-084-13/+27
| | | Fix a longstanding TODO since 2021 (#14826) / 2018 (#2531)
* Support quote selected comments to reply (#32431)wxiaoguang2024-11-073-31/+196
| | | | | | | | | Many existing tests were quite hacky, these could be improved later. <details> ![image](https://github.com/user-attachments/assets/93aebb4f-9de5-4cb8-910b-50c64cbcd25a) </details>
* Correctly query the primary button in a form (#32438)wxiaoguang2024-11-074-10/+34
| | | | | | | | | | | | | | | | | The "primary button" is used at many places, but sometimes they might conflict (due to button switch, hidden panel, dropdown menu, etc). Sometimes we could add a special CSS class for the buttons, but sometimes not (see the comment of QuickSubmit) This PR introduces `querySingleVisibleElem` to help to get the correct primary button (the only visible one), and prevent from querying the wrong buttons. Fix #32437 --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix milestone deadline and date related problems (#32339)Lunny Xiao2024-11-054-57/+22
| | | | | | | | | Use zero instead of 9999-12-31 for deadline Fix #32291 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Add some handy markdown editor features (#32400)wxiaoguang2024-11-047-21/+120
| | | | | | | | | There were some missing features from EasyMDE: 1. H1 - H3 style 2. Auto add task list 3. Insert a table And added some tests
* Refactor repo legacy (#32404)wxiaoguang2024-11-039-362/+383
| | | | | | Only move code, no unnecessary logic change. (There are many problems in old code, but changing them is not in this PR's scope) Co-authored-by: Giteabot <teabot@gitea.io>
* Fix a number of typescript issues (#32308)silverwind2024-10-319-26/+36
| | | | | | | | | | | | | | - 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.
* Update JS and PY dependencies (#32388)silverwind2024-10-311-2/+2
| | | | | | | | | | | | | - Update all JS dependencies excluding stylelint (because of https://github.com/AndyOGo/stylelint-declaration-strict-value/issues/379). - Update all PY dependencies. - Replace `eslint-plugin-deprecation` with `@typescript-eslint/no-deprecated` rule. - Enabled `unicorn/prefer-math-min-max` and autofixed issues. - Tested all dependencies. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix suggestions for issues (#32380)wxiaoguang2024-10-3010-69/+74
|
* Fix toAbsoluteLocaleDate and add more tests (#32387)wxiaoguang2024-10-312-14/+20
|
* Fix absolute-date (#32375)wxiaoguang2024-10-302-17/+21
|
* Fix undefined errors on Activity page (#32378)cloudchamb3r2024-10-301-3/+3
| | | | | close #32377 Co-authored-by: Giteabot <teabot@gitea.io>
* Suggestions for issues (#32327)Anbraten2024-10-294-38/+90
| | | closes #16872
* Migrate vue components to setup (#32329)Anbraten2024-10-2815-714/+708
| | | | | | | | | | | | | | | | | | | | | | | | | Migrated a handful Vue components to the `setup` syntax using composition api as it has better Typescript support and is becoming the new default in the Vue ecosystem. - [x] ActionRunStatus.vue - [x] ActivityHeatmap.vue - [x] ContextPopup.vue - [x] DiffFileList.vue - [x] DiffFileTree.vue - [x] DiffFileTreeItem.vue - [x] PullRequestMergeForm.vue - [x] RepoActivityTopAuthors.vue - [x] RepoCodeFrequency.vue - [x] RepoRecentCommits.vue - [x] ScopedAccessTokenSelector.vue Left some larger components untouched for now to not go to crazy in this single PR: - [ ] DiffCommitSelector.vue - [ ] RepoActionView.vue - [ ] RepoContributors.vue - [ ] DashboardRepoList.vue - [ ] RepoBranchTagSelector.vue
* Fix broken image when editing comment with non-image attachments (#32319)yp053272024-10-231-2/+4
| | | Fix #32316
* Prevent from submitting issue/comment on uploading (#32263)박상철2024-10-237-56/+109
| | | | | | | | fix #32262 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Add `DISABLE_ORGANIZATIONS_PAGE` and `DISABLE_CODE_PAGE` settings for ↵Zettat1232024-10-221-15/+12
| | | | | | | | | | | | explore pages and fix an issue related to user search (#32288) These settings can allow users to only display the repositories explore page. Thanks to yp05327 and wxiaoguang ! --------- Co-authored-by: Giteabot <teabot@gitea.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Warn users when they try to use a non-root-url to sign in/up (#32272)wxiaoguang2024-10-173-2/+16
|
* Fix null errors on conversation holder (#32258) (#32266)cloudchamb3r2024-10-161-7/+10
| | | | | | | | | | | | | | | | | | | | fix #32258 Errors in the issue was due to unhandled null check. so i fixed it. ### Detailed description for Issue & Fix To reproduce that issue, the comment must be deleted on Conversation tab. #### Before Delete <img width="1032" alt="image" src="https://github.com/user-attachments/assets/72df61ba-7db6-44c9-bebc-ca1178dd27f1"> #### After Delete (AS-IS) <img width="1010" alt="image" src="https://github.com/user-attachments/assets/36fa537e-4f8e-4535-8d02-e538c50f0dd8"> gitea already have remove logic for `timeline-item-group`, but because of null ref exception the later logic that removes `timeline-item-group` could be not be called correctly.
* make `show stats` work when only one file changed (#32244)a10121127962024-10-142-1/+4
| | | | | | | | | | | | | | | | fix https://github.com/go-gitea/gitea/issues/32226 in https://github.com/go-gitea/gitea/pull/27775 , it do some changes to only show diff file tree when more than one file changed. But looks it also break the `diff-file-list` logic, which looks not expected change. so try fix it. /cc @silverwind example view: ![image](https://github.com/user-attachments/assets/281e9c4f-a269-4d36-94eb-a132058aea87) Signed-off-by: a1012112796 <1012112796@qq.com>
* Fix dropdown content overflow (#31610)charles2024-10-131-0/+4
| | | | | | | | | close #31602 ![圖片](https://github.com/go-gitea/gitea/assets/30816317/43722917-bc5e-4e06-b0de-db52552a20df) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix checkbox bug on private/archive filter (#32236)cloudchamb3r2024-10-111-3/+3
| | | | | | | fix #32235 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Move admin routers from /admin to /-/admin (#32189)Lunny Xiao2024-10-102-2/+2
| | | | | | | Resolve #32181 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Add null check for responseData.invalidTopics (#32212)cloudchamb3r2024-10-091-1/+1
| | | | | | <img width="553" alt="Screenshot 2024-10-08 at 10 49 10 AM" src="https://github.com/user-attachments/assets/faeef64d-684a-4aba-b7fc-c7c6a0301abe"> `responseData.invalidTopics` can be null but it wasn't handled.
* Fix javascript error when an anonymous user visiting migration page (#32144)Lunny Xiao2024-10-021-5/+3
| | | | | | | | | | | | This PR fixes javascript errors when an anonymous user visits the migration page. It also makes task view checking more restrictive. The router moved from `/user/task/{id}/status` to `/username/reponame/-/migrate/status` because it's a migrate status. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Notify the user when the file path contains leading or trailing spaces and ↵charles2024-09-241-5/+44
| | | | | fix the error message for invalid file names. (#31507) close #31478
* Include collaboration repositories on dashboard source/forks/mirrors list ↵Lunny Xiao2024-09-241-1/+0
| | | | | | | | | | | | (#31946) Fix #13489 In the original implementation, only `All` will display your owned and collaborated repositories. For other filters like `Source`, `Mirrors` and etc. will only display your owned repositories. This PR removed the limitations. Now except `collbrations`, other filters will always display your owned and collaborated repositories.
* Set manual `tabindex`es on login page (#31689)silverwind2024-09-201-1/+0
| | | | | | | | | | | Fixes https://github.com/go-gitea/gitea/issues/31686. A more elborate manual tabindex numbering could be done, but I think it's not really worth the extra effort and such stuff could easily break during refactors. Includes another small tweak to un-stretch the`<a>` element so it's only as large as it needs to be and this change also made the margin unneeded.
* feat(#31666): Set the columns height to hug all its contents (#31726)Simon Pistache2024-09-161-3/+5
| | | | | | | | In Projects, columns heights are defined by the sum of all contents height of the biggest column, rather than a fraction of the viewport height. It default to 60vh when there is no cards to display. Fix #31666
* Add option to filter board cards by labels and assignees (#31999)Lauris BH2024-09-121-0/+12
| | | | | | | | | | | | | | | Works in both organization and repository project boards Fixes #21846 Replaces #21963 Replaces #27117 ![image](https://github.com/user-attachments/assets/1837ace8-3de2-444f-a153-e166bd0da2c0) **Note** that implementation was made intentionally to work same as in issue list so that URL can be bookmarked for quick access with predefined filters in URL
* Support migration from AWS CodeCommit (#31981)Zettat1232024-09-111-0/+6
| | | | | | | | | | | | | | | | | | | | This PR adds support for migrating repos from [AWS CodeCommit](https://docs.aws.amazon.com/codecommit/latest/userguide/welcome.html). The access key ID and secret access key are required to get repository information and pull requests. And [HTTPS Git credentials](https://docs.aws.amazon.com/codecommit/latest/userguide/setting-up-gc.html) are required to clone the repository. <img src="https://github.com/user-attachments/assets/82ecb2d0-8d43-42b0-b5af-f5347a13b9d0" width="680" /> The AWS CodeCommit icon is from [AWS Architecture Icons](https://aws.amazon.com/architecture/icons/). <img src="https://github.com/user-attachments/assets/3c44d21f-d753-40f5-9eae-5d3589e0d50d" width="320" />
* Add automatic light/dark option for the colorblind theme (#31997)Luca Söthe2024-09-071-0/+2
| | | | | The normal themes already have a variant which automatically chooses light/dark mode based on the browser. This PR adds the same variant, but for the colorblind themes.
* Replace v-html with v-text in search inputbox (#31966)Lunny Xiao2024-09-041-4/+2
| | | | | Credit for @techknowlogick Co-authored-by: techknowlogick <techknowlogick@noreply.gitea.com>
* Improve textarea paste (#31948)silverwind2024-09-012-8/+6
| | | | | | | | | - When pasting a URL over another URL, replace the URL instead of creating a useless `[url](url)`. This is the 1-line change [here](https://github.com/go-gitea/gitea/pull/31948/files#diff-be8e94d7e3da33b187381f53d28095107bd0cf29ae9a9e997e4f422f4a54479cR122). - Always run `initTextareaEvents`, previously it was not run when `dropzoneEl` was not present like when attachements are disabled on the server. Refactored the function to gracefully handle absent `dropzoneEl` and rename the function to a better name.