2018-05-09 12:01:36 +05:30
|
|
|
import $ from 'jquery';
|
2018-03-27 19:54:05 +05:30
|
|
|
import '~/profile/gl_crop';
|
|
|
|
import Profile from '~/profile/profile';
|
2021-03-11 19:13:27 +05:30
|
|
|
import initSearchSettings from '~/search_settings';
|
2021-11-18 22:05:49 +05:30
|
|
|
import initPasswordPrompt from './password_prompt';
|
2018-03-27 19:54:05 +05:30
|
|
|
|
2021-04-17 20:07:23 +05:30
|
|
|
// eslint-disable-next-line func-names
|
|
|
|
$(document).on('input.ssh_key', '#key_key', function () {
|
|
|
|
const $title = $('#key_title');
|
|
|
|
const comment = $(this)
|
|
|
|
.val()
|
|
|
|
.match(/^\S+ \S+ (.+)\n?$/);
|
2018-03-27 19:54:05 +05:30
|
|
|
|
2021-04-17 20:07:23 +05:30
|
|
|
// Extract the SSH Key title from its comment
|
|
|
|
if (comment && comment.length > 1) {
|
|
|
|
$title.val(comment[1]).change();
|
|
|
|
}
|
|
|
|
});
|
2018-03-27 19:54:05 +05:30
|
|
|
|
2021-04-17 20:07:23 +05:30
|
|
|
new Profile(); // eslint-disable-line no-new
|
2021-03-11 19:13:27 +05:30
|
|
|
|
2021-04-17 20:07:23 +05:30
|
|
|
initSearchSettings();
|
2021-11-18 22:05:49 +05:30
|
|
|
initPasswordPrompt();
|