Commit Graph

8 Commits (3e4fe009e729d2facec48f93ffcffc72b4bb359c)

Author SHA1 Message Date
wxiaoguang 694441fec5
Remove customized (unmaintained) dropdown, improve aria a11y for dropdown ()
* 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>
Lunny Xiao 783a021889
Never use /api/v1 from Gitea UI Pages ()
Reusing `/api/v1` from Gitea UI Pages have pros and cons.
Pros:
1) Less code copy

Cons:
1) API/v1 have to support shared session with page requests.
2) You need to consider for each other when you want to change something about api/v1 or page.

This PR moves all dependencies to API/v1 from UI Pages.

Partially replace 
silverwind 19b017f398
Use explicit jQuery import, remove unused eslint globals ()
- Don't rely on globals (window.$) for jQuery import
- Remove eslint globals no longer in use
wxiaoguang 4d0a72a271
Revert "Prevent possible XSS when using jQuery ()" ()
This reverts commit 661d3d28e9.
Gusted 661d3d28e9
Prevent possible XSS when using jQuery ()
In the case of misuse or misunderstanding from a developer whereby,
if `sel` can receive user-controlled data, jQuery `$(sel)` can lead to the
creation of a new element. Current usage is using hard-coded selectors
in the templates, but nobody prevents that from expanding to
user-controlled somehow.
wxiaoguang bb71ceeeb2
Improve async/await usage, and sort init calls in `index.js` ()
* clean up async/await, and sort init calls in `index.js
* use `const _promise` to indicate that we do not need await an async function
wxiaoguang 2add8fe9be
Frontend refactor, PascalCase to camelCase, remove unused code ()
* Frontend refactor, PascalCase to camelCase, remove unused code

* fix
wxiaoguang 1a7473ff45
Split `index.js` to separate files ()
* split `index.js` to separate files

* tune clipboard

* fix promise

* fix document

* remove intermediate empty file

* fix async event listener

* use `export function` instead of `export {}`, add more comments

Co-authored-by: Lunny Xiao <xiaolunwen@gmail.com>
Co-authored-by: 6543 <6543@obermui.de>