debian-mirror-gitlab/app/assets/javascripts/pages/profiles/index.js

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

28 lines
826 B
JavaScript
Raw Normal View History

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';
2023-05-27 22:25:52 +05:30
import LengthValidator from '~/validators/length_validator';
2021-11-18 22:05:49 +05:30
import initPasswordPrompt from './password_prompt';
2022-11-25 23:54:43 +05:30
import { initTimezoneDropdown } from './init_timezone_dropdown';
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
2023-05-27 22:25:52 +05:30
new LengthValidator(); // 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();
2022-11-25 23:54:43 +05:30
initTimezoneDropdown();