2018-03-09 20:18:59 +00:00
|
|
|
import $ from 'jquery';
|
2018-02-23 16:18:24 +00:00
|
|
|
import '~/profile/gl_crop';
|
|
|
|
import Profile from '~/profile/profile';
|
2021-02-09 12:09:48 +00:00
|
|
|
import initSearchSettings from '~/search_settings';
|
2021-09-29 12:11:22 +00:00
|
|
|
import initPasswordPrompt from './password_prompt';
|
2022-09-20 15:13:52 +00:00
|
|
|
import { initTimezoneDropdown } from './init_timezone_dropdown';
|
2018-02-23 16:18:24 +00:00
|
|
|
|
2021-03-03 21:11:13 +00:00
|
|
|
// 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-02-23 16:18:24 +00:00
|
|
|
|
2021-03-03 21:11:13 +00:00
|
|
|
// Extract the SSH Key title from its comment
|
|
|
|
if (comment && comment.length > 1) {
|
|
|
|
$title.val(comment[1]).change();
|
|
|
|
}
|
|
|
|
});
|
2018-02-23 16:18:24 +00:00
|
|
|
|
2021-03-03 21:11:13 +00:00
|
|
|
new Profile(); // eslint-disable-line no-new
|
2021-02-09 12:09:48 +00:00
|
|
|
|
2021-03-03 21:11:13 +00:00
|
|
|
initSearchSettings();
|
2021-09-29 12:11:22 +00:00
|
|
|
initPasswordPrompt();
|
2022-09-20 15:13:52 +00:00
|
|
|
initTimezoneDropdown();
|