aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/components
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* 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-291-32/+1
| | | closes #16872
* Migrate vue components to setup (#32329)Anbraten2024-10-2811-710/+686
| | | | | | | | | | | | | | | | | | | | | | | | | 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 checkbox bug on private/archive filter (#32236)cloudchamb3r2024-10-111-3/+3
| | | | | | | fix #32235 --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* 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.
* 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>
* Fix overflowing content in action run log (#31842)Adrian Hirt2024-08-161-0/+1
| | | | | | | | | When a long line with characters such as dots is returned by a step in an action (e.g. by the output of the Ruby on Rails test runner), it overflows the log container, causing the page to scroll sideways. This PR adds the CSS `overflow-wrap: anywhere;` to the `.job-step-section .job-step-logs .job-log-line .log-msg` selector, which causes such lines to wrap as well
* fix the component of access token list not mounted (#31824)sillyguodong2024-08-161-13/+0
| | | try to fix #31771
* bump vue-bar-graph (#31705)techknowlogick2024-08-011-1/+1
|
* Fix "Filter by commit" Dropdown (#31695)wxiaoguang2024-07-251-45/+47
| | | | Regression of #31281 Fix #31673
* Convert frontend code to typescript (#31559)silverwind2024-07-0716-58/+58
| | | | | | | | | | | None of the frontend js/ts files was touched besides these two commands (edit: no longer true, I touched one file in https://github.com/go-gitea/gitea/pull/31559/commits/61105d0618e285d97e95044bfb64415f364a4526 because of a deprecation that was not showing before the rename). `tsc` currently reports 778 errors, so I have disabled it in CI as planned. Everything appears to work fine.
* Add typescript guideline and typescript-specific eslint plugins and fix ↵silverwind2024-07-031-1/+3
| | | | | | | | issues (#31521) 1. Add some general guidelines how to write our typescript code 2. Add `@typescript-eslint/eslint-plugin`, general typescript rules 3. Add `eslint-plugin-deprecation` to detect deprecated code 4. Fix all new lint issues that came up
* Add initial typescript config and use it for eslint,vitest,playwright (#31186)silverwind2024-06-282-23/+1
| | | | | | | | | | | | | | | | | | | | This enables eslint to use the typescript parser and resolver which brings some benefits that eslint rules now have type information available and a tsconfig.json is required for the upcoming typescript migration as well. Notable changes done: - Add typescript parser and resolver - Move the vue-specific config into the root file - Enable `vue-scoped-css/enforce-style-type` rule, there was only one violation and I added a inline disable there. - Fix new lint errors that were detected because of the parser change - Update `i/no-unresolved` to remove now-unnecessary workaround for the resolver - Disable `i/no-named-as-default` as it seems to raise bogus issues in the webpack config - Change vitest config to typescript - Change playwright config to typescript - Add `eslint-plugin-playwright` and fix issues - Add `tsc` linting to `make lint-js`
* Update JS dependencies, remove `eslint-plugin-jquery` (#31402)silverwind2024-06-181-1/+1
| | | | | | | | | | | | - Result of `make update-js` - Added 1 new eslint rule - Autofixed 1 new eslint issue - Remove `eslint-plugin-jquery` as `eslint-plugin-no-jquery` does all it does and is actually the maintained fork of it. - Tested all affected `dependencies` --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix navbar `+` menu flashing on page load (#31281)silverwind2024-06-121-1/+1
| | | | | | | | | | | Fixes https://github.com/go-gitea/gitea/pull/31273#issuecomment-2153771331. Same method as used in https://github.com/go-gitea/gitea/pull/30215. All left-opening dropdowns need to use it method. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Use `querySelector` over alternative DOM methods (#31280)silverwind2024-06-108-15/+15
| | | | | | | | | | | | | | | | As per https://github.com/go-gitea/gitea/pull/30115#discussion_r1626060164, prefer `querySelector` by enabling [`unicorn/prefer-query-selector`](https://github.com/sindresorhus/eslint-plugin-unicorn/blob/main/docs/rules/prefer-query-selector.md) and autofixing all except 10 issues. According to [this](https://old.reddit.com/r/learnjavascript/comments/i0f5o8/performance_of_getelementbyid_vs_queryselector/), querySelector may be faster as well, so it's a win-win. --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com> Co-authored-by: Giteabot <teabot@gitea.io>
* Fix Activity Page Contributors dropdown (#31264)wxiaoguang2024-06-061-11/+10
| | | Fix #31261
* Fix DashboardRepoList margin (#31121)silverwind2024-05-281-2/+0
| | | | | | Fixes: https://github.com/go-gitea/gitea/issues/31115 <img width="476" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/ba508ba9-b02d-47c6-ad9f-495101c81330">
* Fix some UI problems (dropdown/container) (#30849)wxiaoguang2024-05-061-2/+2
| | | | | | Follow #30345 Follow #30547 `ellipsis` / `white-space` shouldn't be put on the general dropdown components.
* Have time.js use UTC-related getters/setters (#30857)Kemal Zebari2024-05-063-3/+3
| | | | | | | | | | | | | | | | | | | | | Before this patch, we were using `Date` getter/setter methods that worked with local time to get a list of Sundays that are in the range of some start date and end date. The problem with this was that the Sundays are in Unix epoch time and when we changed the "startDate" argument that was passed to make sure it is on a Sunday, this change would be reflected when we convert it to Unix epoch time. More specifically, I observed that we may get different Unix epochs depending on your timezone when the returned list should rather be timezone-agnostic. This led to issues in US timezones that caused the contributor, code frequency, and recent commit charts to not show any chart data. This fix resolves this by using getter/setter methods that work with UTC since it isn't dependent on timezones. Fixes #30851. --------- Co-authored-by: Sam Fisher <fisher@3echelon.local>
* Improve context popup rendering (#30824)silverwind2024-05-022-8/+15
| | | | | | | | | | | | | | Before, lot of empty space when no labels or body: <img width="281" alt="Screenshot 2024-05-02 at 13 51 29" src="https://github.com/go-gitea/gitea/assets/115237/8a980ccd-d53c-43a3-a059-dc8c614621e1"> After, empty space collapsed: <img width="306" alt="Screenshot 2024-05-02 at 13 51 16" src="https://github.com/go-gitea/gitea/assets/115237/8d9c154d-5de1-43d0-8536-afd9194d99b3"> All `<p>` (unsuitable) and `<small>` (discouraged in favor of css) tags are removed.
* Fix activity heat map padding & locale (#30823)wxiaoguang2024-05-021-5/+7
| | | | | | | Fix #30808 --------- Co-authored-by: silverwind <me@silverwind.io>
* Fix branch selector UI (#30803)wxiaoguang2024-05-021-44/+4
| | | Fix #30802
* Fix dashboard commit status null access (#30771)wxiaoguang2024-04-301-2/+2
| | | Fix #30768
* Fix issue label rendering in the issue popup (#30763)wxiaoguang2024-04-301-21/+6
|
* Improve job commit description (#30579)yp053272024-04-261-5/+17
| | | | | | | | | | | | | | | | | | | | | Fix https://github.com/go-gitea/gitea/issues/30567 When job is a schedule: ![image](https://github.com/go-gitea/gitea/assets/18380374/b07e9d43-e8b7-4ee2-87b3-a7050c3a8ca5) When it is a normal one: ![image](https://github.com/go-gitea/gitea/assets/18380374/0d58dab9-74bb-421b-8952-0578cdf21a52) also add a 'space' behind `:` ![image](https://github.com/go-gitea/gitea/assets/18380374/4cebece0-bfe6-4ad9-b806-e5c49bb9be43) ![image](https://github.com/go-gitea/gitea/assets/18380374/02da7681-474b-4c0f-9dad-b6558f6cb484) --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix long branch name overflows (#30345)silverwind2024-04-161-2/+2
| | | | | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/27971 Fixes: https://github.com/go-gitea/gitea/pull/28010 <img width="689" alt="Screenshot 2024-04-09 at 00 19 57" src="https://github.com/go-gitea/gitea/assets/115237/7c895a47-274f-40a6-a126-290658f1982d"> Also fixes a similar issue in issue list where CSS was there but not active because of missing `display: block`. <img width="372" alt="Screenshot 2024-04-09 at 00 18 25" src="https://github.com/go-gitea/gitea/assets/115237/cfbee7cd-2e15-4ac7-96ce-020816f48798">
* Fix various overflows on actions view (#30344)silverwind2024-04-151-5/+11
| | | | | | | | | | | | | | | Fix a number of text overflow issues in actions view and run list. Also improve mobile view of run list. Fixes: https://github.com/go-gitea/gitea/issues/30328 <img width="782" alt="Screenshot 2024-04-08 at 23 10 16" src="https://github.com/go-gitea/gitea/assets/115237/3d9f9f88-3eab-44a0-8144-30c2b58b24cb"> <img width="935" alt="Screenshot 2024-04-08 at 23 17 46" src="https://github.com/go-gitea/gitea/assets/115237/581d73ea-a31d-416b-be3a-47313b879b12"> <img width="1008" alt="Screenshot 2024-04-08 at 23 49 05" src="https://github.com/go-gitea/gitea/assets/115237/c5d10565-f285-477f-8659-1caf94797647"> <img width="397" alt="Screenshot 2024-04-08 at 23 55 30" src="https://github.com/go-gitea/gitea/assets/115237/368aaa75-1903-4058-9d75-d1fe91c564d6">
* Remove fomantic button module (#30475)silverwind2024-04-141-1/+1
| | | | | | | | | | CSS-only module. Button colors are reduced to this: <img width="639" alt="Screenshot 2024-04-14 at 15 36 07" src="https://github.com/go-gitea/gitea/assets/115237/882d6c02-d1de-44f2-b707-db02a9f5070d"> --------- Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix and rewrite contrast color calculation, fix project-related bugs (#30237)silverwind2024-04-071-13/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | 1. The previous color contrast calculation function was incorrect at least for the `#84b6eb` where it output low-contrast white instead of black. I've rewritten these functions now to accept hex colors and to match GitHub's calculation and to output pure white/black for maximum contrast. Before and after: <img width="94" alt="Screenshot 2024-04-02 at 01 53 46" src="https://github.com/go-gitea/gitea/assets/115237/00b39e15-a377-4458-95cf-ceec74b78228"><img width="90" alt="Screenshot 2024-04-02 at 01 51 30" src="https://github.com/go-gitea/gitea/assets/115237/1677067a-8d8f-47eb-82c0-76330deeb775"> 2. Fix project-related issues: - Expose the new `ContrastColor` function as template helper and use it for project cards, replacing the previous JS solution which eliminates a flash of wrong color on page load. - Fix a bug where if editing a project title, the counter would get lost. - Move `rgbToHex` function to color utils. @HesterG fyi --------- Co-authored-by: delvh <dev.lh@web.de> Co-authored-by: Giteabot <teabot@gitea.io>