summaryrefslogtreecommitdiff
path: root/app/assets/javascripts/badges/components/badge_form.vue
diff options
context:
space:
mode:
Diffstat (limited to 'app/assets/javascripts/badges/components/badge_form.vue')
-rw-r--r--app/assets/javascripts/badges/components/badge_form.vue28
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;
});
},