aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
Commit message (Collapse)AuthorAgeFilesLines
...
* 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>
* Remove all "floated" CSS styles (#32691)wxiaoguang2024-12-032-18/+0
| | | | | | | | | | | | | | | | | | | | flex but don't float diff with ignoring spaces : https://github.com/go-gitea/gitea/pull/32691/files?diff=split&w=1 related pages: ### admin users ![image](https://github.com/user-attachments/assets/40dd4c46-3f5b-4a68-89b0-d0a9a806f1fc) ### milestone ![image](https://github.com/user-attachments/assets/e3efb630-f07c-4c9d-b877-71e28cddcdce) ### user account setting ![image](https://github.com/user-attachments/assets/d15609ee-016d-4aee-999a-b5455fe6185c)
* Refactor RepoBranchTagSelector (#32681)wxiaoguang2024-12-022-206/+177
|
* Fix JS error when reply comment on Conversation page (#32685)wxiaoguang2024-12-022-13/+19
| | | | Fix #32684, regression of #32596 (side-effect of jQuery removal: jQuery could tolerate non-existing elements) And fix another regression bug from #30453 (initCompReactionSelector double-init)
* Improve diff file tree (#32658)silverwind2024-11-282-2/+8
| | | | | | | | - 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">
* Allow cropping an avatar before setting it (#32565)Kerwin Bryant2024-11-288-9/+66
| | | | | | | | | | | | Provide a cropping tool on the avatar editing page, allowing users to select the cropping area themselves. This way, users can decide the displayed area of the image, rather than us deciding for them. --------- Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>
* Make frontend unit test code could know it is in testing (#32656)wxiaoguang2024-11-282-3/+10
| | | See the comment of isInFrontendUnitTest
* Add priority to protected branch (#32286)65432024-11-275-1/+112
| | | | | | | | | | | | | | | | | | | ## Solves Currently for rules to re-order them you have to alter the creation date. so you basicly have to delete and recreate them in the right order. This is more than just inconvinient ... ## Solution Add a new col for prioritization ## Demo WebUI Video https://github.com/user-attachments/assets/92182a31-9705-4ac5-b6e3-9bb74108cbd1 --- *Sponsored by Kithara Software GmbH*
* Regenerate fomantic package-lock.json (#32650)silverwind2024-11-271-329/+1083
| | | | | | Fixes: https://github.com/go-gitea/gitea/security/dependabot/83 Fixes: https://github.com/go-gitea/gitea/security/dependabot/84 Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix global form submit event (#32652)wxiaoguang2024-11-271-1/+1
|
* Fix: passkey login not working anymore (#32623)hiifong2024-11-263-14/+14
| | | | | | | Quick fix #32595, use authenticator auth flags to login --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Refactor some frontend problems (#32646)wxiaoguang2024-11-267-116/+106
| | | | | | | | | | | 1. correct the modal usage on "admin email list" page (then `web_src/js/features/admin/emails.ts` is removed) 2. use `addDelegatedEventListener` instead of `jQuery().on` 3. more jQuery related changes and remove jQuery from `web_src/js/features/common-button.ts` 4. improve `confirmModal` to make it support header, and remove incorrect double-escaping 5. fix more typescript related types 6. fine tune devtest pages and add more tests
* Bypass vitest bug (#32647)wxiaoguang2024-11-262-1/+12
|
* Fix race condition in mermaid observer (#32599)william-allspice2024-11-261-8/+11
| | | | | | | | | | | | | This Pull Request addresses a race condition in the updateIframeHeight function where it is sometimes called when the iframe is not fully loaded or accessible resulting in an alarming error message for the user. To address this we: 1. Add defensive programming within the updateIframeHeight function 2. Delay instantiating the intersection observer until the iframe has loaded Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fixed Issue of Review Menu Shown Behind (#32631)Kerwin Bryant2024-11-264-8/+22
| | | | | | | Fixed #31144 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* 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.