mirror of https://sc.cryxtal.org/crystal/forgejo
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
522 B
18 lines
522 B
import $ from 'jquery';
|
|
|
|
export function initUserSettings() {
|
|
if ($('.user.settings.profile').length > 0) {
|
|
$('#username').on('keyup', function () {
|
|
const $prompt = $('#name-change-prompt');
|
|
const $prompt_redirect = $('#name-change-redirect-prompt');
|
|
if ($(this).val().toString().toLowerCase() !== $(this).data('name').toString().toLowerCase()) {
|
|
$prompt.show();
|
|
$prompt_redirect.show();
|
|
} else {
|
|
$prompt.hide();
|
|
$prompt_redirect.hide();
|
|
}
|
|
});
|
|
}
|
|
}
|