summaryrefslogtreecommitdiffstats
path: root/web_src/js/features
diff options
context:
space:
mode:
authorLunny Xiao <xiaolunwen@gmail.com>2020-09-10 02:29:10 +0800
committerGitHub <noreply@github.com>2020-09-09 14:29:10 -0400
commite153cf07c34b1497906348df84a556851693c77f (patch)
tree79c642c2d04a907b0700c369108825d0b53085b9 /web_src/js/features
parent6483dbc8ec780dda22e21b605d1dc409826baff1 (diff)
downloadgitea-e153cf07c34b1497906348df84a556851693c77f.tar.gz
gitea-e153cf07c34b1497906348df84a556851693c77f.zip
Add a migrate service type switch page (#12697)
* Add a migrat service type switch page * Improve translations * remove images * Fix images * remove extra create repo button on dashboard * Follow reviewers' opinions * Fix frontend lint * Remove wrong submit file * Fix tests * Adjust the size of image * Apply suggestions from code review Co-authored-by: 赵智超 <1012112796@qq.com> * Remove username and password from migration of github/gitlab * Improve docs * Improve interface docs Co-authored-by: 赵智超 <1012112796@qq.com> Co-authored-by: techknowlogick <techknowlogick@gitea.io>
Diffstat (limited to 'web_src/js/features')
-rw-r--r--web_src/js/features/migration.js14
1 files changed, 1 insertions, 13 deletions
diff --git a/web_src/js/features/migration.js b/web_src/js/features/migration.js
index e4c306307f..7a406616fd 100644
--- a/web_src/js/features/migration.js
+++ b/web_src/js/features/migration.js
@@ -7,7 +7,6 @@ const $items = $('#migrate_items').find('.field');
export default function initMigration() {
checkAuth();
- $service.on('change', checkAuth);
$user.on('keyup', () => {checkItems(false)});
$pass.on('keyup', () => {checkItems(false)});
$token.on('keyup', () => {checkItems(true)});
@@ -23,19 +22,8 @@ export default function initMigration() {
function checkAuth() {
const serviceType = $service.val();
- const tokenAuth = $(`#service-${serviceType}`).data('token');
- if (tokenAuth) {
- $user.parent().addClass('disabled');
- $pass.parent().addClass('disabled');
- $token.parent().removeClass('disabled');
- } else {
- $user.parent().removeClass('disabled');
- $pass.parent().removeClass('disabled');
- $token.parent().addClass('disabled');
- }
-
- checkItems(tokenAuth);
+ checkItems(serviceType !== 1);
}
function checkItems(tokenAuth) {