aboutsummaryrefslogtreecommitdiffstats
path: root/web_src/js/vendor
Commit message (Collapse)AuthorAgeFilesLines
* Fix areYouSure confirm (#32941)wxiaoguang44 hours1-0/+6
| | | See the comment
* show warning on navigation if currently editing comment or title (#32920)Tim3 days1-4/+9
| | | | | | | | | | This PR fixes the issue https://github.com/go-gitea/gitea/issues/32223 Make the browser to show the confirm popup, as it does with other forms. --------- Co-authored-by: Tim Wundenberg <tim@wundenbergs.de> Co-authored-by: wxiaoguang <wxiaoguang@gmail.com>
* Fix file editor & preview (#32706)wxiaoguang2024-12-041-2/+2
| | | | | | Fix a regression caused by jQuery removal (`renderPreviewPanelContent`) And simplify the file editor, it doesn't need to be that complex. And remove jQuery code.
* Remove jQuery import from some files (#32512)wxiaoguang2024-11-151-0/+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-0/+1
| | | | | | | | | | | | | | - 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.
* Convert frontend code to typescript (#31559)silverwind2024-07-071-0/+0
| | | | | | | | | | | 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 image diff (#31444)wxiaoguang2024-06-221-4/+5
| | | And remove some jQuery functions
* Vendor `jquery.are-you-sure` with strict mode fixes (#26901)silverwind2023-09-061-0/+195
| | | | | | | | | | | | | | Extract from https://github.com/go-gitea/gitea/pull/25940 and because https://github.com/go-gitea/gitea/pull/26743 does seem to need more work. This will be required if we are to run our JS in [strict mode](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Strict_mode). Previously, the two variables `$fields` and `$dirtyForms` polluted `window`: <img width="1145" alt="image" src="https://github.com/go-gitea/gitea/assets/115237/e0270a0e-b881-4ed7-9cc4-e9ab25c0a2bc">
* Remove customized (unmaintained) dropdown, improve aria a11y for dropdown ↵wxiaoguang2022-06-031-4338/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | (#19861) * Remove customized (unmaintained) dropdown, improve aria a11y for dropdown * fix repo permission * use action instead of onChange * re-order the CSS selector * fix dropdown behavior for repo permissions, make elements inside menu item non-focusable * use menu/menuitem instead of combobox/option. use tooltip(data-content) for aria-label, prevent from repeated attaching * click menu item when pressing Enter * code format * fix repo permission * repo setting: prevent from misleading users when error occurs * fine tune the repo collaboration access mode dropdown (in case the access mode is undefined in the template) Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Restore Accessibility for Dropdown (#16576)zeripath2021-08-061-0/+4338
| | | | | | | | | | | | | | | | | | | | | | | | | | | * Restore #10096/#8638 and re-fix #15172 This PR restores the vendored and patched dropdow from #8638. It however, abandons the calls to `click()` using instead the default dropdown click calls instead. This prevents the issue of the dropdown grabbing focus permanently however, this may have negative effects on the effect of focus on the dropdowns. Of note, the behaviour of the template selector dropdown on the repo creation page is slightly odd - I don't believe that this odd behaviour is caused by this PR but rather by the feed source for this. I suspect that the dropdown should be adding a delete button to its selection. Fix #15172 References: #7057 Signed-off-by: Andrew Thornton <art27@cantab.net> * leverage fomantic-build instead Signed-off-by: Andrew Thornton <art27@cantab.net> * as per jookia Signed-off-by: Andrew Thornton <art27@cantab.net>
* Remove vendored copy of fomantic-dropdown (#15193)silverwind2021-03-301-4300/+0
| | | | | | | | | | | | | | | jQuery 3.6.0 seems to have broke the dropdown focus handling (focus would get stuck on the dropdown) in this module which we have vendored on top of fomantic for accessibility improvements. Either downgrading jQuery to 3.5.1 or removing the vendor copy seems to resolve the issue and I opted for removing the copy because I think such changes should be done upstream and the removal also lightens the JS by 155kB before minify/gzip. Fixes: https://github.com/go-gitea/gitea/issues/15172 Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Rewrite GitGraph.js (#12137)zeripath2020-07-051-432/+0
| | | | | | | | | | | | | | | | | | | The current vendored gitgraph.js is no longer maintained and is difficult to understand, fix and maintain. This PR completely rewrites its logic - hopefully in a clearer fashion and easier to maintain. It also includes @silverwind's improvements of coloring the commit dots and preventing the flash of incorrect content. Further changes to contemplate in future will be abstracting out of the flows to an object, storing the involved commit references on the flows etc. However, this is probably a required step for this. Replaces #12131 Fixes #11981 (part 3) Signed-off-by: Andrew Thornton <art27@cantab.net>
* Fix gitgraph branch continues after merge (#12044)zeripath2020-06-251-0/+7
| | | | | | | | | | | | | | | | | | | * Fix gitgraph branch continues after merge After fixing the initial problem in #11981 another problem has come to light... Fix #11981 (part 2) Signed-off-by: Andrew Thornton <art27@cantab.net> * Update web_src/js/vendor/gitgraph.js * Apply suggestions from code review Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: silverwind <me@silverwind.io> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
* Handle multiple merges in gitgraph.js (#11996)zeripath2020-06-201-7/+8
| | | | | | | | | | | | | * Handle multiple merges in gitgraph.js There is a bug in web_src/js/vendor/gitgraph.js whereby it fails to handle multiple merges in a single commit correctly. This PR adds changes to make this work. Fix #11981 Signed-off-by: Andrew Thornton <art27@cantab.net> * Update web_src/js/vendor/gitgraph.js
* Misc JS linting and naming tweaks (#10652)silverwind2020-03-112-0/+0
| | | | | | | | - lowercase all js filenames except Vue components - enable new lint rules, mostly focused on shorter code - autofix new lint violations - apply misc transformations indexOf -> includes and onevent-> addEventListener Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>
* Reorganize frontend files and tooling (#10168)silverwind2020-02-072-0/+4724
- move "vendor" files to js/vendor and less/vendor - move swagger to js/standalone (meant for standalone pages) - move gitgraph to features and streamline its loading - add linting configs to webpack dependencies in make - set ignored files for eslint/stylelint directly in their configs Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com> Co-authored-by: zeripath <art27@cantab.net> Co-authored-by: Antoine GIRARD <sapk@users.noreply.github.com>