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/components/badge_form.vue | |
parent | d16b2e8639e99961de6ddc93909f3bb5c1445ba1 (diff) |
Add latest changes from gitlab-org/gitlab@14-0-stable-eev14.0.0-rc42
Diffstat (limited to 'app/assets/javascripts/badges/components/badge_form.vue')
-rw-r--r-- | app/assets/javascripts/badges/components/badge_form.vue | 28 |
1 files changed, 19 insertions, 9 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; }); }, |