diff options
author | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
---|---|---|
committer | Robert Speicher <rspeicher@gmail.com> | 2021-01-20 22:34:23 +0300 |
commit | 6438df3a1e0fb944485cebf07976160184697d72 (patch) | |
tree | 00b09bfd170e77ae9391b1a2f5a93ef6839f2597 /app/assets/javascripts/profile | |
parent | 42bcd54d971da7ef2854b896a7b34f4ef8601067 (diff) |
Add latest changes from gitlab-org/gitlab@13-8-stable-eev13.8.0-rc42
Diffstat (limited to 'app/assets/javascripts/profile')
5 files changed, 12 insertions, 14 deletions
diff --git a/app/assets/javascripts/profile/account/components/update_username.vue b/app/assets/javascripts/profile/account/components/update_username.vue index 5feac7485ad..869fdccc800 100644 --- a/app/assets/javascripts/profile/account/components/update_username.vue +++ b/app/assets/javascripts/profile/account/components/update_username.vue @@ -84,12 +84,12 @@ Please update your Git repository remotes as soon as possible.`), return axios .put(this.actionUrl, putData) - .then(result => { + .then((result) => { Flash(result.data.message, 'notice'); this.username = username; this.isRequestPending = false; }) - .catch(error => { + .catch((error) => { Flash(error.response.data.message); this.isRequestPending = false; throw error; diff --git a/app/assets/javascripts/profile/add_ssh_key_validation.js b/app/assets/javascripts/profile/add_ssh_key_validation.js index ab6a6c1896c..5c78de7ffb0 100644 --- a/app/assets/javascripts/profile/add_ssh_key_validation.js +++ b/app/assets/javascripts/profile/add_ssh_key_validation.js @@ -12,7 +12,7 @@ export default class AddSshKeyValidation { } register() { - this.form.addEventListener('submit', event => this.submit(event)); + this.form.addEventListener('submit', (event) => this.submit(event)); this.confirmSubmitElement.addEventListener('click', () => { this.isValid = true; diff --git a/app/assets/javascripts/profile/gl_crop.js b/app/assets/javascripts/profile/gl_crop.js index ecb69422287..afc78cbe78a 100644 --- a/app/assets/javascripts/profile/gl_crop.js +++ b/app/assets/javascripts/profile/gl_crop.js @@ -61,7 +61,7 @@ import { loadCSSFile } from '../lib/utils/css_utils'; bindEvents() { const _this = this; - this.fileInput.on('change', function(e) { + this.fileInput.on('change', function (e) { _this.onFileInputChange(e, this); this.value = null; }); @@ -69,7 +69,7 @@ import { loadCSSFile } from '../lib/utils/css_utils'; this.modalCrop.on('shown.bs.modal', this.onModalShow); this.modalCrop.on('hidden.bs.modal', this.onModalHide); this.uploadImageBtn.on('click', this.onUploadImageBtnClick); - this.cropActionsBtn.on('click', function() { + this.cropActionsBtn.on('click', function () { const btn = this; return _this.onActionBtnClick(btn); }); @@ -184,8 +184,8 @@ import { loadCSSFile } from '../lib/utils/css_utils'; const cropModal = document.querySelector('.modal-profile-crop'); if (cropModal) loadCSSFile(cropModal.dataset.cropperCssPath); - $.fn.glCrop = function(opts) { - return this.each(function() { + $.fn.glCrop = function (opts) { + return this.each(function () { return $(this).data('glcrop', new GitLabCrop(this, opts)); }); }; diff --git a/app/assets/javascripts/profile/preferences/profile_preferences_bundle.js b/app/assets/javascripts/profile/preferences/profile_preferences_bundle.js index bcca3140717..744e0174a4e 100644 --- a/app/assets/javascripts/profile/preferences/profile_preferences_bundle.js +++ b/app/assets/javascripts/profile/preferences/profile_preferences_bundle.js @@ -18,6 +18,6 @@ export default () => { el, name: 'ProfilePreferencesApp', provide, - render: createElement => createElement(ProfilePreferences), + render: (createElement) => createElement(ProfilePreferences), }); }; diff --git a/app/assets/javascripts/profile/profile.js b/app/assets/javascripts/profile/profile.js index 4755a4aa9ba..bfeeff47163 100644 --- a/app/assets/javascripts/profile/profile.js +++ b/app/assets/javascripts/profile/profile.js @@ -20,7 +20,7 @@ export default class Profile { this.timezoneDropdown = new TimezoneDropdown({ $inputEl: this.$inputEl, $dropdownEl: $('.js-timezone-dropdown'), - displayFormat: selectedItem => formatTimezone(selectedItem), + displayFormat: (selectedItem) => formatTimezone(selectedItem), }); } @@ -33,15 +33,13 @@ export default class Profile { uploadImageBtn: '.js-upload-user-avatar', modalCropImg: '.modal-profile-crop-image', }; - this.avatarGlCrop = $('.js-user-avatar-input') - .glCrop(cropOpts) - .data('glcrop'); + this.avatarGlCrop = $('.js-user-avatar-input').glCrop(cropOpts).data('glcrop'); } bindEvents() { $('.js-preferences-form').on('change.preference', 'input[type=radio]', this.submitForm); $('.js-group-notification-email').on('change', this.submitForm); - $('#user_notification_email').on('select2-selecting', event => { + $('#user_notification_email').on('select2-selecting', (event) => { setTimeout(this.submitForm.bind(event.currentTarget)); }); $('#user_notified_of_own_activity').on('change', this.submitForm); @@ -91,7 +89,7 @@ export default class Profile { // Enable submit button after requests ends self.form.find(':input[disabled]').enable(); }) - .catch(error => flash(error.message)); + .catch((error) => flash(error.message)); } updateHeaderAvatar() { |