summaryrefslogtreecommitdiffstats
path: root/web_src/js/features/migration.js
diff options
context:
space:
mode:
Diffstat (limited to 'web_src/js/features/migration.js')
-rw-r--r--web_src/js/features/migration.js12
1 files changed, 12 insertions, 0 deletions
diff --git a/web_src/js/features/migration.js b/web_src/js/features/migration.js
index 09ab49b3e1..d41dc3c1cd 100644
--- a/web_src/js/features/migration.js
+++ b/web_src/js/features/migration.js
@@ -3,15 +3,21 @@ const $user = $('#auth_username');
const $pass = $('#auth_password');
const $token = $('#auth_token');
const $mirror = $('#mirror');
+const $lfs = $('#lfs');
+const $lfsSettings = $('#lfs_settings');
+const $lfsEndpoint = $('#lfs_endpoint');
const $items = $('#migrate_items').find('input[type=checkbox]');
export default function initMigration() {
checkAuth();
+ setLFSSettingsVisibility();
$user.on('keyup', () => {checkItems(false)});
$pass.on('keyup', () => {checkItems(false)});
$token.on('keyup', () => {checkItems(true)});
$mirror.on('change', () => {checkItems(true)});
+ $('#lfs_settings_show').on('click', () => { $lfsEndpoint.show(); return false });
+ $lfs.on('change', setLFSSettingsVisibility);
const $cloneAddr = $('#clone_addr');
$cloneAddr.on('change', () => {
@@ -46,3 +52,9 @@ function checkItems(tokenAuth) {
$items.attr('disabled', true);
}
}
+
+function setLFSSettingsVisibility() {
+ const visible = $lfs.is(':checked');
+ $lfsSettings.toggle(visible);
+ $lfsEndpoint.hide();
+}