aboutsummaryrefslogtreecommitdiffstats
path: root/web_src
Commit message (Collapse)AuthorAgeFilesLines
...
* 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.
* Move web globals to `web_src/js/globals.d.ts` (#31943)silverwind2024-08-301-0/+61
| | | This file serves exclusively to support `web_src/js`, so move it there.
* Fix a number of Typescript issues (#31877)silverwind2024-08-2815-68/+100
| | | | Typescript error count is reduced from 633 to 540 with this. No runtime changes except in test code.
* Update mermaid to v11 (#31913)silverwind2024-08-251-0/+1
| | | | | | | | | | | | Update mermaid to [v11](https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0) and enable the new [`suppressErrorRendering` option](https://github.com/mermaid-js/mermaid/pull/4359) to ensure mermaid never renders error elements into the DOM (we have per-chart error rendering, so don't need it). Tested various chart types. BTW, I was unable to reproduce that error rendering from mermaid with `suppressErrorRendering: false` and I thought we had some CSS to hide the error element, but I could not find it, not even in git history.
* Actions support workflow dispatch event (#28163)胖梁2024-08-182-8/+15
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | fix #23668 My plan: * In the `actions.list` method, if workflow is selected and IsAdmin, check whether the on event contains `workflow_dispatch`. If so, display a `Run workflow` button to allow the user to manually trigger the run. * Providing a form that allows users to select target brach or tag, and these parameters can be configured in yaml * Simple form validation, `required` input cannot be empty * Add a route `/actions/run`, and an `actions.Run` method to handle * Add `WorkflowDispatchPayload` struct to pass the Webhook event payload to the runner when triggered, this payload carries the `inputs` values and other fields, doc: [workflow_dispatch payload](https://docs.github.com/en/webhooks/webhook-events-and-payloads#workflow_dispatch) Other PRs * the `Workflow.WorkflowDispatchConfig()` method still return non-nil when workflow_dispatch is not defined. I submitted a PR https://gitea.com/gitea/act/pulls/85 to fix it. Still waiting for them to process. Behavior should be same with github, but may cause confusion. Here's a quick reminder. * [Doc](https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch) Said: This event will `only` trigger a workflow run if the workflow file is `on the default branch`. * If the workflow yaml file only exists in a non-default branch, it cannot be triggered. (It will not even show up in the workflow list) * If the same workflow yaml file exists in each branch at the same time, the version of the default branch is used. Even if `Use workflow from` selects another branch ![image](https://github.com/go-gitea/gitea/assets/3114995/4bf596f3-426b-48e8-9b8f-0f6d18defd79) ```yaml name: Docker Image CI on: workflow_dispatch: inputs: logLevel: description: 'Log level' required: true default: 'warning' type: choice options: - info - warning - debug tags: description: 'Test scenario tags' required: false type: boolean boolean_default_true: description: 'Test scenario tags' required: true type: boolean default: true boolean_default_false: description: 'Test scenario tags' required: false type: boolean default: false environment: description: 'Environment to run tests against' type: environment required: true default: 'environment values' number_required_1: description: 'number ' type: number required: true default: '100' number_required_2: description: 'number' type: number required: true default: '100' number_required_3: description: 'number' type: number required: true default: '100' number_1: description: 'number' type: number required: false number_2: description: 'number' type: number required: false number_3: description: 'number' type: number required: false env: inputs_logLevel: ${{ inputs.logLevel }} inputs_tags: ${{ inputs.tags }} inputs_boolean_default_true: ${{ inputs.boolean_default_true }} inputs_boolean_default_false: ${{ inputs.boolean_default_false }} inputs_environment: ${{ inputs.environment }} inputs_number_1: ${{ inputs.number_1 }} inputs_number_2: ${{ inputs.number_2 }} inputs_number_3: ${{ inputs.number_3 }} inputs_number_required_1: ${{ inputs.number_required_1 }} inputs_number_required_2: ${{ inputs.number_required_2 }} inputs_number_required_3: ${{ inputs.number_required_3 }} jobs: build: runs-on: ubuntu-latest steps: - uses: actions/checkout@v3 - run: ls -la - run: env | grep inputs - run: echo ${{ inputs.logLevel }} - run: echo ${{ inputs.boolean_default_false }} ``` ![image](https://github.com/go-gitea/gitea/assets/3114995/a58a842d-a0ff-4618-bc6d-83a9596d07c8) ![image](https://github.com/go-gitea/gitea/assets/3114995/44a7cca5-7bd4-42a9-8723-91751a501c88) --------- Co-authored-by: TKaxv_7S <954067342@qq.com> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: Denys Konovalov <kontakt@denyskon.de> Co-authored-by: Lunny Xiao <xiaolunwen@gmail.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-163-14/+21
| | | try to fix #31771
* Scroll images in project issues separately from the remaining issue (#31683)Simon Priet2024-08-132-2/+7
| | | | | | | | | As discussed in #31667 & #26561, when a card on a Project contains images, they can overflow the card on its containing column. This aims to fix this issue via snapping scrollbars. --- Issue #31667 is open to discussion as there should be room for improvement.
* Add `:focus-visible` style to buttons (#31799)silverwind2024-08-121-0/+4
| | | | | | | | | | | Buttons now show a focus style via [`:focus-visible`](https://developer.mozilla.org/en-US/docs/Web/CSS/:focus-visible) when the browser deems the focus to be important, like for example when the button is focused via keyboard navigation. <img width="492" alt="Screenshot 2024-08-07 at 22 12 51" src="https://github.com/user-attachments/assets/060568b1-1599-4c56-bafb-b36ebb1bec35"> <img width="479" alt="image" src="https://github.com/user-attachments/assets/885f4e10-f496-47f0-8ae5-45827ded09f8">
* Add types to various low-level functions (#31781)silverwind2024-08-1010-73/+95
| | | | | | | | Adds types to various low-level modules. All changes are type-only, no runtime changes. `tsc` now reports 38 less errors. One problem was that `@types/sortablejs` does not accept promise return in its functions which triggered the linter, so I disabled the rules on those line.
* Fix createElementFromAttrs bug (#31751)wxiaoguang2024-08-012-2/+4
| | | | | The "false" value was not handled correctly, it would cause bugs in the future (fortunately, this behavior is not used in code yet).
* bump vue-bar-graph (#31705)techknowlogick2024-08-011-1/+1
|
* Enable `no-jquery/no-parse-html-literal` and fix violation (#31684)silverwind2024-07-271-4/+8
| | | Tested it, path segment creation works just like before.
* Add types to fetch,toast,bootstrap,svg (#31627)silverwind2024-07-255-33/+52
| | | | Reduce `tsc` error count by 53. None of the changes has any runtime effect.
* Run `detectWebAuthnSupport` only if necessary (#31691)Jason Song2024-07-251-3/+3
| | | | | | Follow #31676, which is not correct, see https://github.com/go-gitea/gitea/pull/31676#issuecomment-2246658217 Fix #31675, regression of #31504.
* Fix "Filter by commit" Dropdown (#31695)wxiaoguang2024-07-251-45/+47
| | | | Regression of #31281 Fix #31673
* Run `detectWebAuthnSupport` only on sign-in page (#31676)Jason Song2024-07-231-0/+4
| | | Fix #31675, regression of #31504.
* add skip secondary authorization option for public oauth2 clients (#31454)Denys Konovalov2024-07-192-0/+8
|
* Remove unneccessary uses of `word-break: break-all` (#31637)silverwind2024-07-172-2/+1
| | | | | | | | | | Fixes: https://github.com/go-gitea/gitea/issues/31636 1. Issue sidebar topic is disussed in https://github.com/go-gitea/gitea/issues/31636 2. Org description already has `overflow-wrap: anywhere` to ensure no overflow. Co-authored-by: Giteabot <teabot@gitea.io>
* Enable `no-jquery/no-class-state` (#31639)silverwind2024-07-161-4/+4
| | | | | | Just 4 validations and I specifically tested this by selecting/unselecting issue labels. Co-authored-by: Giteabot <teabot@gitea.io>
* Code editor theme enhancements (#31629)silverwind2024-07-144-13/+4
| | | | | | | | | | | | | | | | | | | | | | | 1. Fixed border-radius 2. Monaco ignores the alpha channel on the shadow color, introduce `color-shadow-opaque` 3. Remove scrollbar color which follows https://github.com/go-gitea/gitea/pull/29800 Before: <img width="34" alt="Screenshot 2024-07-13 at 15 38 18" src="https://github.com/user-attachments/assets/042d9bde-6db9-4467-a2a4-8f61ecc773eb"> <img width="35" alt="Screenshot 2024-07-13 at 15 38 31" src="https://github.com/user-attachments/assets/04146ee0-551c-4ff2-9636-bd119b33595a"> After: <img width="45" alt="Screenshot 2024-07-13 at 15 38 06" src="https://github.com/user-attachments/assets/1f58fa5a-1289-4e45-83c9-18ca82a5e266"> <img width="39" alt="Screenshot 2024-07-13 at 21 16 56" src="https://github.com/user-attachments/assets/e12ebe22-b29b-4798-9f0d-4c100f311562">
* Add types for js globals (#31586)silverwind2024-07-112-2/+25
| | | | Adds types for `window.config` and jQuery/htmx globals, eliminating 48 `tsc` errors.
* Convert frontend code to typescript (#31559)silverwind2024-07-07160-369/+369
| | | | | | | | | | | 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.
* Refactor login page (#31530)Anbraten2024-07-051-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | As requested in https://github.com/go-gitea/gitea/pull/31504#issuecomment-2196196646. This PR refactor the login page: ![Screenshot from 2024-07-04 19-23-10](https://github.com/go-gitea/gitea/assets/6918444/c45700f4-6747-473c-bdee-2156718a7953) ![Screenshot from 2024-07-04 19-23-21](https://github.com/go-gitea/gitea/assets/6918444/b1bf71cf-85f9-4517-a409-cc6d72e6af8f) ![Screenshot from 2024-06-30 09-35-20](https://github.com/go-gitea/gitea/assets/6918444/728cc37e-0cca-4883-afec-a43663d2c666) # Changes - [x] use separate box for passkey login and go to registration - [x] move forgot passoword next to password label - [x] fix password required label `*` and padding - [x] remove tabs from login page --------- Co-authored-by: silverwind <me@silverwind.io>
* Add typescript guideline and typescript-specific eslint plugins and fix ↵silverwind2024-07-035-10/+12
| | | | | | | | 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 Passkey login support (#31504)Anbraten2024-06-291-7/+70
| | | | | | | | | | | | | | | | closes #22015 After adding a passkey, you can now simply login with it directly by clicking `Sign in with a passkey`. ![Screenshot from 2024-06-26 12-18-17](https://github.com/go-gitea/gitea/assets/6918444/079013c0-ed70-481c-8497-4427344bcdfc) Note for testing. You need to run gitea using `https` to get the full passkeys experience. --------- Co-authored-by: silverwind <me@silverwind.io>
* Always use HTML attributes for avatar size (#31509)silverwind2024-06-286-52/+4
| | | | | | | | | | Many avatars were rendered in HTML with certain width/height but then resized again in CSS. This was pointless so I removed all these cases and made the HTML size match the previous render size. Also did a few CSS cleanups in the tribute rendering: <img width="648" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/cb2fafb3-5e20-46e9-814f-07df20038beb">
* Add initial typescript config and use it for eslint,vitest,playwright (#31186)silverwind2024-06-284-26/+4
| | | | | | | | | | | | | | | | | | | | 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`
* Fix JS error with disabled attachment and easymde (#31511)silverwind2024-06-281-1/+3
| | | | | | Not sure if this is a regression from https://github.com/go-gitea/gitea/pull/30513, but when attachments are disabled, `this.dropzone` is null and the code had failed in `initEasyMDEPaste` trying to access `dropzoneEl.dropzone`.
* Fix avatar radius problem on the new issue page (#31506)charles2024-06-271-1/+1
| | | | | | | | | | | | | | | Close #31502 Related to #31419. In this PR, the avatar width is set to 3em, but the height is not set, so the image is not squared. When object-fit is set to contain, it can't maintain the radius of the image. Result: ![圖片](https://github.com/go-gitea/gitea/assets/30816317/bceb98aa-b0f7-4753-bc8b-3b9c41dfd55a)