diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2021-06-16 21:25:58 +0300 |
commit | a5f4bba440d7f9ea47046a0a561d49adf0a1e6d4 (patch) | |
tree | fb69158581673816a8cd895f9d352dcb3c678b1e /app/assets/javascripts/badges | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'app/assets/javascripts/badges')
-rw-r--r-- | app/assets/javascripts/badges/components/badge_form.vue | 28 | ||||
-rw-r--r-- | app/assets/javascripts/badges/components/badge_settings.vue | 11 |
2 files changed, 27 insertions, 12 deletions
diff --git a/app/assets/javascripts/badges/components/badge_form.vue b/app/assets/javascripts/badges/components/badge_form.vue index b65a8b4fa9c..7c4ff830a9d 100644 --- a/app/assets/javascripts/badges/components/badge_form.vue +++ b/app/assets/javascripts/badges/components/badge_form.vue @@ -3,7 +3,7 @@ import { GlLoadingIcon, GlFormInput, GlFormGroup, GlButton } from '@gitlab/ui'; import { escape, debounce } from 'lodash'; import { mapActions, mapState } from 'vuex'; -import { deprecatedCreateFlash as createFlash } from '~/flash'; +import createFlash from '~/flash'; import { s__, sprintf } from '~/locale'; import createEmptyBadge from '../empty_badge'; import Badge from './badge.vue'; @@ -134,26 +134,36 @@ export default { if (this.isEditing) { return this.saveBadge() .then(() => { - createFlash(s__('Badges|Badge saved.'), 'notice'); + createFlash({ + message: s__('Badges|Badge saved.'), + type: 'notice', + }); this.wasValidated = false; }) .catch((error) => { - createFlash( - s__('Badges|Saving the badge failed, please check the entered URLs and try again.'), - ); + createFlash({ + message: s__( + 'Badges|Saving the badge failed, please check the entered URLs and try again.', + ), + }); throw error; }); } return this.addBadge() .then(() => { - createFlash(s__('Badges|New badge added.'), 'notice'); + createFlash({ + message: s__('Badges|New badge added.'), + type: 'notice', + }); this.wasValidated = false; }) .catch((error) => { - createFlash( - s__('Badges|Adding the badge failed, please check the entered URLs and try again.'), - ); + createFlash({ + message: s__( + 'Badges|Adding the badge failed, please check the entered URLs and try again.', + ), + }); throw error; }); }, diff --git a/app/assets/javascripts/badges/components/badge_settings.vue b/app/assets/javascripts/badges/components/badge_settings.vue index 8d5bd216367..825807e833e 100644 --- a/app/assets/javascripts/badges/components/badge_settings.vue +++ b/app/assets/javascripts/badges/components/badge_settings.vue @@ -1,7 +1,7 @@ <script> import { GlSprintf, GlModal } from '@gitlab/ui'; import { mapState, mapActions } from 'vuex'; -import { deprecatedCreateFlash as createFlash } from '~/flash'; +import createFlash from '~/flash'; import { s__ } from '~/locale'; import Badge from './badge.vue'; import BadgeForm from './badge_form.vue'; @@ -40,10 +40,15 @@ export default { onSubmitModal() { this.deleteBadge(this.badgeInModal) .then(() => { - createFlash(s__('Badges|The badge was deleted.'), 'notice'); + createFlash({ + message: s__('Badges|The badge was deleted.'), + type: 'notice', + }); }) .catch((error) => { - createFlash(s__('Badges|Deleting the badge failed, please try again.')); + createFlash({ + message: s__('Badges|Deleting the badge failed, please try again.'), + }); throw error; }); }, |